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
- Step 2: Start the Server
- Step 3: Download and Upload Mods
- Step 4: Starting The Server With Mods
- Step 5: Upload world (Optional)
- Conclusion
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:
- Use steam server (y/n): press n and enter.
- Choose World: press n key to generate a new world.
- Choose size: select the world size you want for example 3 for a large world.
- Choose difficulty: select the difficulty.
- Choose world evil: select the biome you need.
- Enter world name: type your world name.
- 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:
- Click workshop.
- Manage mods.
- 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).
- Click back to load the mods.
- Go back to the workshop and click mod packs.
- Click “Save Enabled as New Mod Pack” then type a name.
- 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.
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.
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
after uploading the world file start the server by selecting the single player world.
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.
thanks
This question is not related to this post but How can i know if my server needs a reboot ?
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.how can upload my world file to the server ?
i just update the post please check Step 5
thanks! but how can i start the server after adding the world file ?
if you are inside the screen run
./start-tModLoaderServer.sh
if not runscreen -r
and./start-tModLoaderServer.sh
remember to exit the server console by pressing CTRL+A then D.thank you so much !!!