Advertisements

How to Install tModLoader Server on Linux Server

  • Post last modified:October 21, 2023
  • Post category:Gaming / Linux
  • Post comments:8 Comments
  • Reading time:9 mins read

Hello, This is the second post I’m writing about Terraria you can check my first post that covers installing a vanilla Terraria server. in this post, I will show you how to install tmodloader server on a Linux server. with tmodloader you can play modded terraria, find more about TML from this GitHub page. If you want a place to buy Linux servers try Linode with 100$ free credit.

Table of Contents:

Step 1: Download tModLoader

Open the server terminal and run this command to update the system packages:

sudo apt-get update && apt-get upgrade -y

Download the tModLoader files to your server:

wget https://github.com/tModLoader/tModLoader/releases/download/v2023.08.3.4/tModLoader.zip

Advertisements

you can find the latest versions from this page and replace the download URL with the new version link.

Install unzip and extract files to a directory called TML:

sudo apt install unzip
mkdir TML && unzip tModLoader.zip -d TML

Step 2: Start the Server

To start the server go inside the TML directory:

cd TML

give permissions to start-tModLoaderServer.sh:

chmod 770 start-tModLoaderServer.sh

start the server:

./start-tModLoaderServer.sh

after running ./start-tModLoaderServer.sh command you have to answer some questions:

  1. Use steam server (y/n): press n and enter.
  2. Choose World: press n key to generate a new world.
  3. Choose size: select the world size you want for example 3 for a large world.
  4. Choose difficulty: select the difficulty.
  5. Choose world evil: select the biome you need.
  6. Enter world name: type your world name.
  7. Enter Seed: if you have a seed type it or press enter key for the random world generation.

within a few minutes, your world will generate. then select the world by pressing 1 and set max players, server port (recommended 7777), forward port yes and enter server password if you need one.

Step 3: Download and Upload Mods

first, you have to stop the server. to do that type this command:

exit

open tmodloader client on Steam and follow these steps:

  1. Click workshop.
  2. Manage mods.
  3. Enable the mods that you want to upload (if you don’t have any mods you can download mods by going to the workshop, Download mods).
  4. Click back to load the mods.
  5. Go back to the workshop and click mod packs.
  6. Click “Save Enabled as New Mod Pack” then type a name.
  7. Click Open mod pack folder and you will see a folder with the name you enter.

Log into your Linux server using an SFTP client such as WinSCP. After downloading and installing Winscp log in to your server. then press CTRL + O this will open Window. enter this directory /root/.local/share/Terraria/tModLoader/Mods and upload all the mods from your local machine with the enabled.json file.

WinSCP SFTP Client
WinSCP Open Directory
Uploading mods to server from local windows machine

Step 4: Starting The Server With Mods

install screen and start the server with mods:

sudo apt-get install screen -y
screen -S TML
./start-tModLoaderServer.sh

These commands start your TML server with the mods.

open TML Client and go to multiplayer, click “join via IP” button, enter server IP, then join your TML server and start playing with your friends.

Playing TML

to exit from the server console press CTRL+A then D. To reopen the console enter:

screen -r

Step 5: Upload world (Optional)

if you want to upload single player world file to your server follow these steps. you can find the world file inside the Documents\My Games\Terraria\Worlds.

Advertisements

stop the tml server and log in to sftp and go to /root/.local/share/Terraria/tModLoader/Worlds and upload the world file that ends with .wld

World File Directory in TML Server

after uploading the world file start the server by selecting the single player world.

Selecting World File

Conclusion

By following the steps I have showed you in this post.. you can easily setup a TML server to play with your friends. If you have any questions about this post, please leave a comment.

This Post Has 8 Comments

  1. Davii

    thanks

  2. Sunrise00

    This question is not related to this post but How can i know if my server needs a reboot ?

    1. Udara Kalana

      cat /var/run/reboot-required or [ -f /var/run/reboot-required ] && echo "Reboot is required" || echo "No reboot is required" If the system needs a reboot 2 files are created inside /var/run/ reboot-required,reboot-required.pkgs.

  3. jelmer

    how can upload my world file to the server ?

      1. jelmer

        thanks! but how can i start the server after adding the world file ?

        1. Udara Kalana

          if you are inside the screen run ./start-tModLoaderServer.sh if not run screen -r and ./start-tModLoaderServer.sh remember to exit the server console by pressing CTRL+A then D.

          1. jelmer

            thank you so much !!!

Leave a Reply