How to Set Up a tModLoader Dedicated Server

A tModLoader server runs modded Terraria for your whole group, whoever is online. The server software is free, needs no Steam account and no Terraria licence of its own, and runs on Linux and Windows. The work is in the mods: downloading them, their dependencies, and keeping them updated.

Option 1: by hand

  1. Download tModLoader.zip from the tModLoader GitHub releases (the stable one, not a preview) and unpack it. The server comes from there: an anonymous SteamCMD download of tModLoader installs nothing.
  2. Install the .NET 8 runtime, or let start-tModLoaderServer.sh download it into the folder on its first run.
  3. Copy serverconfig.txt, set world (the .wld to load), autocreate (1, 2 or 3 for a small, medium or large new world), worldname, difficulty, maxplayers, port (7777) and password.
  4. Download the mods: SteamCMD, +login anonymous, +workshop_download_item 1281930 <id> for each mod AND each mod it requires. tModLoader does not fetch dependencies: a mod without them is disabled at load.
  5. List the mods to load in Mods/enabled.json, then start it with ./start-tModLoaderServer.sh -nosteam -steamworkshopfolder <the workshop folder>.
  6. Open TCP 7777 to the internet.
Tip:A modpack made in your own game (Workshop, Mod Packs, Save Enabled as New Mod Pack) gives you install.txt and enabled.json: the Workshop IDs and the mod names, ready for a server.

Option 2: Docker

runonflux/tmodloader-server-flux, our image, installs the tModLoader release you name (stable by default), downloads the Workshop mods in TML_MODS and every mod they require, writes serverconfig.txt from environment variables (TML_WORLD_NAME, TML_WORLD_SIZE, TML_DIFFICULTY, TML_SEED, TML_MAX_PLAYERS...), saves every 10 minutes and on stop, restarts onto new tModLoader releases and mod updates after warning players in chat, and keeps backups. Its source is on GitHub, RunOnFlux/tmodloader-server-flux.

  • Mount /mnt/tml/data on a volume: the worlds, the mod list, the mods' configs and the ban list live there.
  • Mount /mnt/tml/server too, or every start downloads tModLoader and every mod again.
  • Publish 7777/tcp.

Option 3: managed on Flux

Deploy a tModLoader server on the Flux decentralized cloud, on that same image, with the port opened for you, DDoS protection included, and a dashboard with a Workshop search, mod configs, worlds, a live server console, a file browser and backups. Plans start at $4.49 a month.

  1. Pick a plan by your mods: Light Mods, Calamity or Big Modpacks.
  2. Choose a region close to your players.
  3. Name the world, pick its size and difficulty, list your Workshop mods (or add them later in the Mods tab), and deploy.
  4. Give your friends the address: tModLoader downloads the server's mods for them when they join.

Frequently asked questions

Does a tModLoader server need Terraria?

No. The server is free from tModLoader's GitHub releases, with no Steam account and no Terraria licence on the server. Every player needs Terraria and tModLoader (free on Steam) to join.

Does a tModLoader server download mod dependencies?

Not by itself: a mod whose dependencies are missing is disabled when the server loads. Our image adds every mod a Workshop mod requires automatically.

What port does a tModLoader server use?

7777, TCP. Terraria's protocol has no UDP and no query port.

Related tModLoader guides