![]() |
tModLoader v2025.07
A mod to make and play Terraria mods
|
This directory contains utilities for a dedicated server on Linux or Docker
Currently ARM support does not exist for TML. While both the Docker container and the management script can install and update tModLoader and any mods, there are a few key differences. Docker isolates tModLoader from your host system, allowing for less manual management and increased security. The management script allows for direct access to your server and increased control as a result
Docker Installation (recommended)
Management Script Installation
Installing Mods
Example Folder Structure
Server Configuration
Updating the Management Script
The 1.4.4 script is a backwards-incompatible update that introduces a new folder structure that both the management script and the Docker container need to conform to. Additionally, the management script has moved from flags to commands for installing, updating and starting the server. Run ./manage-tModLoaderServer.sh -h
to see a list of available commands and flags
To install and run the container:
docker
from your package manager or Docker's Official Pagedocker compose version
. If the command errors, your manager still uses V1 and will need to additionally install the docker-compose
package. All commands below assume Compose V2 is installed, so if you have V1 replace any docker compose
commands with docker-compose
tModLoader
. This is required. If you would like to install mods or use existing worlds then setup a proper folder structure in that directorydocker-compose.yml
with your GID and UID. These can be found by running id
, and generally default to 1000TML_VERSION
arg to your compose file to set a specific tModLoader version. Read about how to set build arguments hererestart
line to have the server automatically restart if it crashesdocker compose up
tModLoader
directory add -d
to the end to run without interactivity. To attach to the server console run docker attach tml
. To detach from the console press Ctrl-P Ctrl-Q
to avoid shutting down or Ctrl-C
to detach and shutdown the serverMods
and Worlds
directories if they don't already existTo update, download the newest container and rebuild it using docker compose build
to update tModLoader. Mods will be updated as well. If the container doesn't rebuild you can force rebuilding by running docker compose build --no-cache
The manage-tModLoaderServer.sh
script can be used to install tModLoader either directly from the GitHub release or from SteamCMD. The script is made to run fully standalone, so just download it to your server and run it. No other files from the repo are needed
steamcmdpath
to the management script./manage-tModLoaderServer.sh install-tml --username your_steam_username
and enter any password/2fa if necessary. tModLoader will install to the server
directory in your installation folder./manage-tModLoaderServer.sh install-tml --github
. This will install the latest GitHub release, which is the same version as released on Steam.tmlversion.txt
file from a modpack or pass the --tml-version
flag with a specified version, ex. v2022.06.96.4
Mods will be automatically installed during the tModLoader installation step, but can also be installed separately by running ./manage-tModLoaderServer.sh install-mods
. No mods will be installed if install.txt
is missing, and no mods will be enabled if enabled.json
is missing. You will need a Mods/enabled.json
to contain all Mods that you want enabled.
To start a server, run ./manage-tModLoaderServer.sh start
. Be sure to pass in --folder
again if you used a custom location during installation
./manage-tModLoaderServer.sh install
will update both TML and your mods. To update just mods, run the install-mods
command. To only update TML, run the install-tml
command
Both the Docker and Management script use the same folder structure, so make sure it's setup properly before installing. Here is an example:
The server
, steamapps
and logs
folders are created by the management script and do not need to be edited unless you want to clear your installation. manage-tModLoaderServer.sh
is not necessary in the Docker version
Because the steam workshop does not use mod names to identify mods, you must create a modpack to install mods from the workshop. To get an install.txt
file and its accompanying enabled.json
Save Enabled as New Mod Pack
Open Mod Pack Folder
Mods
folder and copy install.txt
and enabled.json
file into it./manage-tModLoaderServer.sh install-mods
to install the mods on your server. This is not necessary if you are using Docker, it will be done automaticallyIf you want to run tModLoader without needing any input on startup (such as from an init system), copy the example serverconfig.txt and change the settings how you like. Key options are defined below, and other options can be found on the Terraria wiki
worldname
changes the default world name when creating a new world using autocreate You do not need to include .wld in your world name. This setting will not work with an existing world, see the world
option for an existing worldworld
sets the exact path to an existing or new terraria world, ex. worldpath/to/your/world.wld
. For Docker installations, the world path must follow /home/tml/.local/share/Terraria/tModLoader/Worlds/your_world.wld
autocreate=1
will enable autocreating, which creates a new world at your provided location if one does not already existIf an update for manage-tModLoaderServer.sh
is available, a message will be printed letting you know one is available. It can be updated using ./manage-tModLoaderServer.sh update-script
. An outdated script may contain bugs or lack features, so it is usually a good idea to update