Setup Terraria TShock Server


How to setup a Terraria Server on a Raspberry Pi.


  • A Raspberry Pi
    • This guide was written using a Raspberry Pi 4 Model B 4GB
    • Other models may have varying performance, or be unable to support Terraria at all
  • TShock for Terraria
  • Familiarity with the command line


  1. Setup the Raspberry Pi

  2. (Optional) Setup remote access to the Pi

  3. Install screen

    sudo apt install screen

  4. Install mono:

  5. Download and extract TShock on the Pi

    • Visit: and download the official release (recommended over the experimental release)
    • We recommend extracting to an easily manageable directory like /opt/tshock
  6. Perform these setup steps based on your environment:

    • In this case, following Linux specific remarks
  7. Exit the server program

  8. (Optional) Create a script to enable automatic startup of the Terraria server

    • Inside the TShock directory, create a new script file with any preferred name

      $ vi

      • Inside the script file: paste and edit the following commands and parameters

        /usr/bin/screen -dmS Terraria-Server mono TerrariaServer.exe -configpath /opt/tshock/config -logpath /opt/tshock/logs -world /opt/terraria-worlds/myWorld.wld -maxplayers 16

    • Test the script by running it


      • If you cannot run the script, add execute permissions

        chmod +x

        screen -list

        • If no screens are available, check to see if TerrariaServer.exe has execute permissions

          ls -l

        • If necessary, grant permissions

          chmod +x TerrariaServer.exe

    • Schedule the script to run on startup with the crontab program

      crontab -e

    • Paste the following as a new entry:

      @reboot /home/pi/Downloads/terraria/

    • Save and quit