Terraria has outlived just about every multiplayer sandbox game released alongside it, and the January 2026 launch of update 1.4.5 gave the fourteen-year-old game its biggest content drop in years. That update also renewed interest in a much older question: how do you actually run your own Terraria server instead of relying on one player’s PC staying online all night? A properly configured dedicated server keeps your world running around the clock, survives a host’s PC restarting, and gives you access to admin tools that in-client “Host & Play” sessions simply don’t offer.
This tutorial walks through setting up a Terraria dedicated server from a clean Windows or Linux machine to a fully secured, always-on world with admin tools — in 12 steps, in about 30 minutes. We’ll cover SteamCMD installation, serverconfig.txt, port forwarding, systemd auto-restart, and TShock for moderation, plus 10 troubleshooting scenarios and the security settings a public-facing game server actually needs.
None of this requires programming experience or an expensive machine. The entire server install is a few hundred megabytes, the official documentation is free, and — unlike some of the more resource-hungry survival-game servers we’ve covered — Terraria will run acceptably on hardware most people already have sitting in a closet. What it does require is getting a handful of small details right: the correct port, the correct config keys, and a password before you go public. Get those wrong and the two most common outcomes are “nobody can connect” or, worse, “anybody can connect.”
What Is a Terraria Dedicated Server, and Why Run One
When you start a multiplayer world from inside the Terraria client using “Host & Play,” your own game is doing double duty: rendering your screen and simulating the world for every connected player. Close the client, and the world goes down with it. A Terraria dedicated server is a separate, headless process — TerrariaServer.exe on Windows or TerrariaServer.bin.x86_64 on Linux — that does nothing but run the world simulation. No graphics, no player character, no dependency on anyone’s gaming PC staying powered on.
That distinction matters for three practical reasons. First, uptime: a dedicated server on a VPS or a spare machine keeps running whether or not you’re playing, which matters for long-running Journey Mode worlds with base-building projects that take weeks. Second, performance: because the process isn’t also rendering a scene for a local player, more of the CPU and RAM budget goes to simulating NPCs, projectiles, and world events, which shows up as less lag once you get past 8-10 concurrent players. Third, tooling: dedicated servers are the only way to run TShock, the admin/moderation layer covered in Step 12, which adds permissions, bans, region protection, and anti-grief commands that vanilla hosting doesn’t have.
If you’ve already set up a Minecraft server or any of the other survival-game dedicated servers we’ve covered, the overall shape of this process will feel familiar: download server binaries, edit a config file, open a port, and (optionally) layer admin software on top. Terraria’s version is lighter-weight than most — the whole install is well under a gigabyte, and a small world will run comfortably on hardware that would choke running a modded Minecraft or ARK server.
Prerequisites: Hardware, Software, and Versions You’ll Need
Before starting, confirm you’re targeting the current release. Re-Logic shipped Terraria 1.4.5 “Bigger and Bolder” on Tuesday, January 27, 2026, simultaneously across PC, console, and mobile, followed by incremental patches (Switch build 1.4.5.6.4 landed in late March 2026). Your server binary, your client, and — if you’re using it — your TShock build all need to be on compatible 1.4.5.x versions, or clients will get a version-mismatch error at the connection screen.
You’ll need: a Windows, Linux, or macOS machine (a low-cost Linux VPS is plenty for a small server); the Terraria server files, available free via terraria.org or through Steam’s SteamCMD tool under app ID 105600 (the same ID as the base game — no separate purchase or paid Steam account required to download server-only files); a router you can access to forward a port, or a VPS provider that exposes ports directly; and, optionally, a TShock build if you want admin commands, or tModLoader if you want mods (PC-only, and it changes the client requirement too — everyone connecting needs the same mod loader and mod list).
You can confirm your installed client version from Steam by right-clicking Terraria in your library, opening Properties, and checking the installed build, or simply by watching the version number printed in the bottom corner of the game’s main menu. The official Terraria Wiki’s server documentation is worth bookmarking too — it’s the canonical reference for config keys and console commands if this guide’s tables ever fall behind a future patch.
Hardware needs scale with player count and world size more than almost any other survival game on this list — Terraria is genuinely light. The table below is a practical starting point; you can always raise maxplayers later if the box has headroom.
| Scenario | Players | World Size | RAM | CPU |
|---|---|---|---|---|
| Solo / LAN testing | 1-2 | Small | 512 MB | 1 core |
| Small friend group | 4-8 | Medium | 1 GB | 1-2 cores |
| Public vanilla server | 8-16 | Medium/Large | 2 GB | 2 cores |
| TShock + plugins | 16-32 | Large | 3-4 GB | 2-4 cores |
| Modded (tModLoader, PC-only) | 4-8 | Medium | 2-3 GB | 2 cores |
Step 1-2: Install SteamCMD and Download the Server Files
On Linux, SteamCMD is the fastest path to a headless install because it skips the GUI entirely and can be scripted. Step 1 is installing SteamCMD itself; Step 2 is using it to pull down Terraria’s server files under the anonymous login (no Steam account needed, since the dedicated server files ship with the base game’s free redistributable license).
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update && sudo apt install -y steamcmd unzip
mkdir -p ~/terraria/server
steamcmd +login anonymous +force_install_dir ~/terraria/server +app_update 105600 validate +quit
SteamCMD downloads Windows, macOS, and Linux binaries into the same folder, sorted into subfolders. Once the download finishes, move into the Linux build and mark the binary executable:
cd ~/terraria/server/Linux
chmod +x TerrariaServer.bin.x86_64
That’s the entire Linux install — no compiling, no dependencies beyond what SteamCMD itself needs (32-bit library support, handled by the dpkg --add-architecture i386 line above on Debian/Ubuntu systems).
Windows Setup: The Built-In Server Wizard
On Windows, you don’t need SteamCMD at all if you already own Terraria: the dedicated server binary installs alongside the regular game. Open your Steam library, find Terraria’s install folder (typically steamapps\common\Terraria), and run TerrariaServer.exe directly. It launches a text-based setup wizard in a console window that walks you through choosing or creating a world, setting max players, and picking a port — the same values you’ll set manually in serverconfig.txt on Linux in the next step. If you’d rather not own a Steam copy on the host machine, the standalone dedicated server package is also downloadable free from terraria.org.
Step 3-5: Configure serverconfig.txt
Everything about how your Terraria server behaves — port, password, player cap, world, difficulty — lives in one plain-text file: serverconfig.txt. It doesn’t exist by default on a fresh SteamCMD install, so Step 3 is creating it, Step 4 is filling in the connection basics, and Step 5 is setting world and difficulty options. Create the file in your server’s root folder with the contents below as a starting template:
# serverconfig.txt
world=/home/youruser/terraria/server/Linux/Worlds/MyWorld.wld
autocreate=2
worldname=MyWorld
difficulty=0
maxplayers=16
port=7777
password=ChangeThisPassword
motd=Welcome to my Terraria server!
upnp=1
secure=1
language=en-US
banlist=banlist.txt
journeypermission_godmode=false
journeypermission_difficulty_master=false
Save it, then launch the server pointing at that config with ./TerrariaServer.bin.x86_64 -config serverconfig.txt. The most important keys, and what they actually do, are in the reference table below.
| Key | Example | What It Does |
|---|---|---|
| port | 7777 | TCP/UDP port clients connect to |
| maxplayers | 16 | Player cap; valid range is 1-255 |
| password | string | Required password to join (leave blank for open server) |
| worldname | MyWorld | Name used when auto-generating a new world |
| world | /path/to/World.wld | Full path to an existing world file to load instead |
| autocreate | 2 | World size on auto-generate: 1=small, 2=medium, 3=large |
| difficulty | 0 | 0=normal, 1=expert, 2=master, 3=journey |
| upnp | 1 | Attempts automatic router port forwarding |
| motd | string | Message shown to players on connect |
| secure | 1 | Enables additional cheat-protection checks |
A quick warning that catches a lot of first-time hosts: autocreate (world size) and difficulty (game mode) are both small integers, and it’s easy to transpose them and end up with a Master-difficulty world when you wanted Large. Double-check both values before your first boot, since autocreate only applies when generating a brand-new world — it’s ignored once a .wld file already exists at that path.
Step 6-7: Open Port 7777 on Your Router and Firewall
Terraria’s default port is 7777, and — unlike some games that only need TCP — Terraria uses both TCP and UDP on that port. Step 6 is forwarding it on your router (skip this step entirely if you’re on a VPS with a public IP, since there’s no NAT to traverse); Step 7 is allowing it through the host’s own OS firewall.
Router-side, log into your router’s admin panel (commonly 192.168.1.1 or 192.168.0.1) and add a port-forwarding rule sending both TCP and UDP on port 7777 to your server machine’s local IP. If your router supports UPnP and you left upnp=1 in serverconfig.txt, the server will attempt to open this automatically on startup — but manual forwarding is more reliable and the only option on routers with UPnP disabled for security reasons.
On the host itself, if you’re running Ubuntu or Debian with ufw:
sudo ufw allow 7777/tcp
sudo ufw allow 7777/udp
sudo ufw reload
sudo ufw status
On Windows, Windows Defender Firewall will usually prompt you to allow TerrariaServer.exe the first time it runs — accept it for both private and public networks if you’re hosting for friends outside your LAN. If you’re on a cloud VPS (AWS, DigitalOcean, Hetzner, etc.), remember there’s a second firewall layer at the provider level — a security group or cloud firewall — that also needs a 7777 TCP+UDP rule, separate from the OS-level one.
Step 8: Choose World Size, Seed, and Difficulty
If you’re generating a new world rather than uploading an existing one, this is the step where size and game mode decisions actually take effect. World size trades off exploration space against RAM, disk, and generation time: Small worlds generate in seconds and are ideal for quick co-op runs; Large worlds can take several minutes to generate and give you room for sprawling multi-biome bases, at the cost of more RAM per connected player as the world simulates a wider active area.
Difficulty is a separate axis entirely. Classic (normal) and Expert scale enemy stats and loot tables; Master pushes both further and adds permadeath-adjacent stakes many groups don’t want on a shared server. Journey Mode is the mode most public/co-op servers actually pick, since it supports the journeypermission_* config keys shown earlier — you can grant or restrict individual Journey powers (like difficulty scaling, godmode, or item duplication) per-server rather than leaving them wide open, which matters if you don’t want any random player toggling godmode mid-boss-fight.
If you want a specific seed (including one of the special secret seeds Terraria has shipped since 1.4), pass it at first launch with the -seed command-line flag rather than editing the config file, since serverconfig.txt itself has no dedicated seed key — for example: ./TerrariaServer.bin.x86_64 -config serverconfig.txt -seed "your seed here".
Step 9-10: First Boot and Connecting From the Terraria Client
Step 9 is starting the server for real. Run the binary with your config file, and — if you didn’t set a world path to an existing file — it’ll generate a new world using your autocreate and worldname settings first, which can take anywhere from a few seconds (Small) to a few minutes (Large). A healthy startup looks like this in the console:
Terraria Server v1.4.5.6
Loading world data...
Type 'help' for a list of commands.
Listening on port 7777
Server started
That “Listening on port 7777” line confirms the process bound to the port successfully — if you don’t see it, the port is likely already in use by another process, which you can check on Linux with sudo lsof -i :7777.
Step 10 is connecting from a player’s machine. Open the regular Terraria client, choose Multiplayer → Join via IP, and enter either the server’s public IP (for internet play) or its LAN IP (for same-network testing), followed by the port if it’s not the default 7777 — for example 203.0.113.10:7777. If you set a password, the client prompts for it before dropping the player into the world. Test this from outside your own network (mobile data works well) before telling friends it’s ready — connecting successfully from the same LAN as the host doesn’t guarantee it’s reachable from the internet, since some routers don’t support NAT hairpinning.
Step 11: Keep the Server Running 24/7 with systemd
Running the server in a terminal works for testing, but it dies the moment you close SSH. For anything long-running on Linux, wrap it in a systemd service so it survives reboots and restarts automatically if it crashes. Create /etc/systemd/system/terraria.service with the following content:
[Unit]
Description=Terraria Dedicated Server
After=network.target
[Service]
Type=simple
User=terraria
WorkingDirectory=/home/terraria/server/Linux
ExecStart=/home/terraria/server/Linux/TerrariaServer.bin.x86_64 -config /home/terraria/server/Linux/serverconfig.txt
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Then enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable terraria
sudo systemctl start terraria
sudo systemctl status terraria
Note the User=terraria line — create a dedicated non-root user for this (sudo adduser terraria) rather than running the game server as root. It’s a one-time setup cost that closes off an entire category of risk if the server process is ever compromised. To stop the server cleanly for maintenance, use sudo systemctl stop terraria rather than killing the process directly — Terraria saves world state on a clean shutdown, and an abrupt kill mid-autosave is one of the more common causes of corrupted world files.
Step 12: Install TShock for Admin Commands and Anti-Grief Tools
Vanilla TerrariaServer gives you almost no moderation tools beyond kick and ban by name. TShock is the community-standard admin layer that adds permissions, groups, region protection, item/tile bans, a plugin API, and remote console access — essential if you’re opening your world to strangers rather than a closed friend group. The current release is TShock 6.1.0, built for Terraria 1.4.5.6, published March 11, 2026, and licensed under GPL-3.0.
mkdir -p ~/terraria/tshock && cd ~/terraria/tshock
wget https://github.com/Pryaxis/TShock/releases/download/v6.1.0/TShock-6.1.0-for-Terraria-1.4.5.6-linux-x64-Release.zip
unzip TShock-6.1.0-for-Terraria-1.4.5.6-linux-x64-Release.zip
chmod +x TShockLauncher
./TShockLauncher -world /home/terraria/server/Linux/Worlds/MyWorld.wld -port 7777
TShock replaces the vanilla binary as your server process entirely (point your systemd ExecStart at TShockLauncher instead of TerrariaServer.bin.x86_64 once you’ve confirmed it runs), and layers Terraria’s own network protocol underneath its own command system. First boot creates a SQLite database (tshock.sqlite) that stores accounts, permissions, and bans — back this file up alongside your world file, since it holds all your moderation history.
TShock vs. tModLoader vs. Vanilla: Which Do You Need?
These solve different problems and aren’t mutually exclusive in concept, though running all three together is an advanced, fragile setup. Vanilla TerrariaServer is the baseline — lightest weight, zero admin tooling, fine for a small trusted group. TShock adds moderation and permissions without changing gameplay; it’s a server-side-only install, so clients connect with the completely unmodified Terraria client. tModLoader is the opposite: it changes gameplay by adding mods, but every connecting player needs the same mod loader and mod list installed client-side too, and it’s PC-only — mobile and console players can’t join a modded server at all. If your goal is “keep griefers out and give trusted friends admin powers,” go TShock. If your goal is “add new content,” go tModLoader. Most public servers that want both run TShock for administration and skip mods entirely to stay compatible with the widest range of clients.
Once TShock is running, moderation happens through in-game chat commands rather than editing config files. A handful cover most day-to-day needs: /group add <name> owner promotes a player to full admin, /ban add <name> <reason> removes someone permanently, /kick <name> <reason> disconnects them for the session, /region protects builds from griefing by other players, and /god toggles the god-mode permission on a per-player basis rather than server-wide. New accounts register automatically on first connection and start with minimal permissions until you promote them into a group — nobody gets admin powers by accident.
Securing a Public Terraria Server
A Terraria server with an open port and no password is discoverable and joinable within minutes of going live — there’s no matchmaking gate protecting it. A few settings close most of the realistic risk. Set a password in serverconfig.txt for anything not fully public; it’s the single highest-value setting on this list and the one most first-time hosts skip. If you do want a genuinely public server, use TShock’s whitelist and group/permission system instead of relying on obscurity — an unlisted IP is not a security control, since port scanners find open game ports on residential and cloud IP ranges constantly.
Keep TShock current: the 6.1.0 release specifically patched a bug that allowed a connecting client’s UUID to be modified after the initial handshake, which TShock uses to track accounts and bans — running an older build means a banned player could potentially work around identity-based bans. Beyond version hygiene, run the server process under its own unprivileged system user (covered in Step 11), avoid exposing the TShock REST API or remote console to the open internet without a firewall rule limiting it to your own IP, and keep regular off-host backups of both your world file and TShock’s SQLite database — a compromised or corrupted server is a much smaller problem when you can restore from yesterday’s backup instead of losing the world entirely.
If you’re hosting on a VPS rather than a home connection, treat the box like any other internet-facing Linux server: keep the OS patched, restrict SSH to key-based auth, and don’t reuse that machine’s credentials anywhere sensitive. None of this is Terraria-specific — it’s the same baseline hygiene that applies to any self-hosted game server exposed to the public internet.
One thing vanilla Terraria and TShock genuinely don’t handle: volumetric DDoS traffic. Application-layer protections like passwords, whitelists, and bans stop unwanted players from joining, but they can’t stop a flood of junk UDP packets aimed at your IP from ever reaching the box in the first place — that’s a network-layer problem, not a game-server one. If uptime for a public community matters to you, that’s the actual argument for a commercial game-hosting provider or a VPS provider with built-in DDoS scrubbing over hosting from a home connection, where your ISP is very unlikely to offer any mitigation at all.
Backing Up and Restoring Your World
Every risk covered so far — a bad update, a killed process mid-autosave, a compromised box, a corrupted .wld file — has the same fix: a recent backup. Terraria makes this easy, because a world is just one file (plus a .bak automatically kept by the game itself as a one-generation safety net) rather than a sprawling database or save-state structure. The simplest reliable approach is a scheduled copy of your Worlds folder and, if you’re running TShock, its SQLite database, to somewhere other than the server itself.
A daily cron job handles this with almost no ongoing effort. Edit your crontab with crontab -e and add a line like:
# Back up world files and TShock DB every day at 4am
0 4 * * * tar -czf /home/terraria/backups/terraria-$(date +\%Y\%m\%d).tar.gz /home/terraria/server/Linux/Worlds /home/terraria/tshock/tshock.sqlite
# Optional: delete local backups older than 14 days
0 4 * * * find /home/terraria/backups -name "terraria-*.tar.gz" -mtime +14 -delete
For anything beyond a casual friends-only world, copy those archives off the host entirely — rsync to a second machine, or sync the backups folder to cloud storage. A backup that lives on the same disk as the server protects you from a corrupted save, but not from a failed drive or a compromised host, which is exactly the scenario where you’d need it most. Restoring is just the reverse: stop the server, extract the archive over the existing Worlds folder (or the TShock database file), and start the server back up.
Common Pitfalls When Setting Up a Terraria Server
Most failed Terraria server setups trace back to one of these six mistakes:
- Forwarding only TCP, not UDP, on port 7777. Terraria needs both — TCP-only forwarding is the single most common reason “it works locally but not for friends.”
- Running the server process as root on a VPS. It works, but it’s unnecessary exposure with no upside — create a dedicated low-privilege user instead.
- Publishing a server with no password. An open port on a public IP gets found and joined by strangers faster than most hosts expect.
- Editing serverconfig.txt while the server is already running. Changes are read at startup only — you need to stop and restart the process for edits to apply.
- Confusing autocreate and difficulty values. Both are small integers (1-3 and 0-3 respectively) sitting right next to each other in the config file — it’s an easy typo with annoying consequences.
- Skipping a backup before a major version upgrade. World files generally carry forward across Terraria updates cleanly, but “generally” isn’t “always” — back up before updating the server binary, not after something goes wrong.
Troubleshooting: 10 Issues and Fixes
Ten of the most common problems hosts run into, and how to actually resolve each one:
| Symptom | Likely Cause | Fix |
|---|---|---|
| “Terraria is not compatible” on connect | Client/server version mismatch | Update both to the same 1.4.5.x build |
| Friends can’t connect from outside your LAN | Port 7777 not forwarded, or blocked by firewall | Forward TCP+UDP 7777 on router; allow it in the OS firewall |
| Console shows “Listening on port 7777” but nobody can join | ISP uses CGNAT — you have no real public IP | Host on a VPS instead, or use a tunneling service |
| Server crashes immediately on Linux | Missing 32-bit libraries or incomplete SteamCMD download | Re-run +app_update 105600 validate; confirm i386 architecture is enabled |
| “World file corrupted” on load | Process was killed mid-autosave | Restore the last backup; always stop via console exit or systemctl stop, never kill -9 |
| TShock won’t start after a Terraria patch | TShock/OTAPI build predates the new client version | Update TShock to the release matching your new Terraria version |
| Correct password gets rejected | Stray quotes or trailing spaces around the value in serverconfig.txt | Remove quotes/whitespace so the line reads exactly password=yourpassword |
| Rubber-banding / lag with many players | CPU or RAM budget exceeded for NPC and projectile count | Lower maxplayers, reduce world size, or move to a larger instance |
upnp=1 set, but the port still isn’t open | Router has UPnP disabled or unsupported | Forward the port manually in the router’s admin panel |
| Works over LAN, fails over public IP from the same network | Router doesn’t support NAT hairpinning/loopback | Test from an external network (e.g., mobile data) instead |
Performance Tuning and Advanced Tips
Once the basics are running, a few adjustments squeeze out meaningfully better performance and reliability. World size is the biggest lever: a Large world with 16 concurrent players simulating NPCs, projectiles, and liquids across a wide active area will use noticeably more RAM and CPU than the same player count on a Medium world — if you’re on a budget VPS, sizing down is usually a better trade than upgrading hardware. Reducing maxplayers on underpowered hardware helps more than most config tweaks.
For hosts running more than one game server on the same box — say, this alongside a Valheim or Palworld instance — Terraria’s light footprint makes it a good candidate to co-locate, as long as each instance gets its own port (7777, 7778, and so on, set via each config’s port key) and its own world/config directory.
- Use tmux or screen for manual sessions. If you’re not ready to set up systemd, running the server inside a detachable terminal session at least survives an SSH disconnect, even though it won’t survive a reboot.
- Automate backups with cron. A nightly rsync of your world file and TShock’s SQLite database to separate storage costs nothing and saves you when a corrupted save or bad update hits.
- Use TShock’s REST API for monitoring. TShock exposes a local REST API that can feed a Discord bot with player counts or trigger alerts — useful if you’re running this for a community rather than a handful of friends, but keep it firewalled to localhost or your own IP.
World File Sizes and Save Times
World files scale roughly with map size: Small worlds typically land in the low single-digit megabytes, Medium worlds in the low double digits, and Large worlds commonly reach 40MB or more once a world has been explored and built on extensively, since Terraria only stores generated/modified tile data rather than a fixed-size grid. Autosaves happen periodically during play — plan for a brief hitch every so often on Large worlds with many players, which is normal and not a sign of a misconfigured server.
What Terraria 1.4.5 “Bigger and Bolder” Changes for Server Hosts
The January 27, 2026 release of Terraria 1.4.5 is significant for anyone hosting long-term, because Re-Logic has characterized it as the game’s last major content update — meaning the current server protocol, config format, and TShock compatibility target are likely to stay stable for a long stretch rather than churning through another multi-year update cycle. The update itself added crossover content, including items tied to Dead Cells and a summonable mount from the Palworld collaboration, and Re-Logic has continued shipping smaller follow-up patches since, including 1.4.5.7, which was in development as of the most recent public “State of the Game” update.
The other change worth knowing before you set up cross-platform play: crossplay is not part of 1.4.5 at launch. Re-Logic has since rolled out what it describes as “Phase 1” — PC-hosted servers accepting mobile clients — with console-side crossplay support still being finalized. If your friend group spans PC and console, don’t assume they can drop into a PC-hosted dedicated server yet; verify current platform support before promising crossplay to your group, since it’s a moving target that’s still being rolled out platform by platform rather than a single feature that shipped complete.
Updating Your Terraria Server to a New Version
With patches like 1.4.5.7 still in active development, your server will need updating again at some point, and the order of operations matters more than the update itself. Back up first — the pitfall from earlier in this guide applies directly here. World files carry forward across Terraria patches reliably in practice, but “reliably” is not a guarantee, and a five-second tar backup before updating costs you nothing if everything goes fine and saves the world if it doesn’t.
On Linux with SteamCMD, updating is the same command you used for the initial install — it downloads only what changed rather than the full package again:
sudo systemctl stop terraria
steamcmd +login anonymous +force_install_dir ~/terraria/server +app_update 105600 validate +quit
sudo systemctl start terraria
If you’re running TShock, update it separately and in the right order: update the vanilla server files first, then grab the matching TShock release from its GitHub releases page — the filename tells you exactly which Terraria version it targets (for example, TShock-6.1.0-for-Terraria-1.4.5.6-linux-x64-Release.zip). Running a TShock build older than your Terraria client version is the single most common cause of a modded server refusing to start after a patch, since TShock’s OTAPI layer hooks directly into the game’s networking code and breaks when that code changes underneath it. On Windows, the built-in wizard handles the vanilla update automatically through Steam; only TShock needs a manual re-download.
The Complete Setup: One Script to Do It All
For a fresh Ubuntu/Debian VPS, this script combines Steps 1, 2, and 7 into a single run — install SteamCMD, pull the server files, and open the firewall. You’ll still need to create serverconfig.txt yourself (Step 3-5 above) before starting the server for the first time, since password and world settings shouldn’t live in a shared script.
#!/bin/bash
set -e
# Step 1: SteamCMD
sudo add-apt-repository -y multiverse
sudo dpkg --add-architecture i386
sudo apt update && sudo apt install -y steamcmd unzip
# Step 2: download Terraria server files (anonymous login, app 105600)
mkdir -p ~/terraria/server
steamcmd +login anonymous +force_install_dir ~/terraria/server +app_update 105600 validate +quit
cd ~/terraria/server/Linux
chmod +x TerrariaServer.bin.x86_64
# Step 7: open the firewall
sudo ufw allow 7777/tcp
sudo ufw allow 7777/udp
sudo ufw reload
echo "Server files installed at ~/terraria/server/Linux"
echo "Next: create serverconfig.txt, then run:"
echo "./TerrariaServer.bin.x86_64 -config serverconfig.txt"
Run it with chmod +x setup.sh && ./setup.sh. Once it finishes and you’ve written your config file, you have a complete, working project: a downloaded server binary, an open firewall port, and a config file away from a live world — at which point Steps 8 through 12 above (world generation, first boot, systemd, and optionally TShock) take you the rest of the way to a fully managed, always-on server.
Frequently Asked Questions
What port does a Terraria server use by default?
Port 7777, over both TCP and UDP. You can change it in serverconfig.txt if you’re running multiple instances on the same machine.
How many players can join a Terraria dedicated server?
The engine supports up to 255, though the stock serverconfig.txt template ships with maxplayers=8. Most public vanilla servers run somewhere between 4 and 16 for realistic performance.
Do I need a powerful PC or VPS to host Terraria?
No — it’s one of the lighter dedicated servers you can run. A small world with a handful of players is comfortable on 512MB-1GB of RAM and a single CPU core.
Can I run a Terraria server on Linux?
Yes. SteamCMD (app ID 105600) downloads a native Linux binary, TerrariaServer.bin.x86_64, alongside the Windows and macOS builds.
What’s the difference between TShock and a vanilla dedicated server?
Vanilla gives you a working world with basic kick/ban. TShock adds accounts, permissions, region protection, item/tile bans, and a plugin ecosystem — it’s what most public or semi-public servers run.
Can mobile or console players join a PC-hosted Terraria server?
Partially. As of the most recent update, “Phase 1” crossplay allows mobile clients to join PC-hosted servers; console-side crossplay is still being rolled out and shouldn’t be assumed to work yet.
Is Terraria 1.4.5 really the last major update?
Re-Logic has described 1.4.5 “Bigger and Bolder” as its last big content step for the game, while continuing to ship smaller follow-up patches like 1.4.5.7 for bug fixes and refinements.
How do I make my Terraria server more secure?
Set a password, run the process under a non-root user, keep TShock updated, avoid exposing its REST API to the open internet, and keep regular backups of your world file and TShock database.
Can I move my existing “Host & Play” world to a dedicated server?
Yes. Your world file lives in Documents/My Games/Terraria/Worlds (Windows) or the equivalent Terraria folder on other platforms. Copy the .wld file into your dedicated server’s Worlds directory and point the world= key in serverconfig.txt at its full path instead of using autocreate.
Related Coverage
- Minecraft Server Setup: 12 Steps, 30 Min
- ARK Dedicated Server: 12 Steps, 30 Min
- Valheim Dedicated Server: 11 Steps, 30 Min
- Palworld Dedicated Server: 12 Steps, 30 Min
- Project Zomboid Dedicated Server: 12 Steps, 30 Min
- Enshrouded Dedicated Server: 16 Slots in 12 Steps
For more gaming hardware, platform, and server coverage, visit the Gaming section.




