1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

[Guide] How to host TShock on Linux

Discussion in 'Linux Support' started by Ryozuki, Aug 28, 2016.

  1. Ryozuki

    Plugin Developer

    Joined:
    Dec 25, 2014
    Messages:
    51
    This guide was tested on Ubuntu 16.04.1 LTS

    Note: I've made this tutorial for really (really) newbie users in Linux (Ubuntu)

    First, don't run the server as root:
    Code:
    adduser terraria
    Now, install mono, screen and unzip:
    Code:
    sudo apt-get install mono-complete screen unzip
    Go as terraria user:
    Code:
    su terraria
    Go to your home folder:
    Code:
    cd
    Download latest TShock (Zip file):
    Code:
    wget https://github.com/NyxStudios/TShock/releases/download/v4.3.17/tshock_release.zip
    This could be outdated, search for latest version here: TShock

    Unzip it:
    Code:
    unzip tshock_release.zip
    Delete zip file (not needed anymore):
    Code:
    rm tshock_release.zip
    Execute the server one time to create the map:
    Code:
    mono-sgen TerrariaServer.exe
    Then, close it and make a start.sh script:
    Code:
    touch start.sh && chmod +x start.sh
    You can use nano or vim if you have it, to edit the script: (i'll use nano, because it's more "user friendly")
    Code:
    nano start.sh
    Code:
    #!/bin/sh
    screen -S terrarias-A -m \
        mono-sgen TerrariaServer.exe \
        -world "My Games/Terraria/Worlds/YourWorldName.wld" \
    Remember to change YourWorldName.wld to your world name!
    Control+x, then press y and then enter.

    Now, everytime you want to start the server you need to run these 2 commands (and be terraria user..):
    Code:
    script /dev/null
    Code:
    ./start.sh
     
  2. ipaqmaster

    ipaqmaster Level 1

    Joined:
    Sep 7, 2016
    Messages:
    5
    Using these steps on the latest release/upgrade of CentOS 7, my generated or imported worlds are empty except when you swing a small 10x20 island where the player is standing will appear (Even if you login as superadmin this isn't rectifying)

    NPCs fall infinitely with you to the void (But are often teleported back in place serverside sometimes)

    Is there anything I can do about this? Literally stock install with Mono 4.4.2


    Is there a debug mode I could be toggling to see any errors etc?

    EDIT: Made a stock Ubuntu 16.01 VM. Seems to work in there. Going to let it live on the Ubuntu VM for now.
     
    #2 ipaqmaster, Sep 8, 2016
    Last edited: Sep 8, 2016