How to set up a Terraria dedicated server

Verified by HostValues engineers Updated: September 2026

Terraria is a 2D sandbox filled with adventure, building and boss fights. A dedicated server lets you and your friends play together without the host needing to be online. The server is lightweight and runs well on modest hardware.

Server requirements

  • RAM: 1 GB is enough for a small server (up to 8 players). For larger groups or heavy mod usage, 2 GB is recommended.
  • Storage: the server files are only a few hundred megabytes. Worlds grow as players explore, but remain compact compared to other games.
  • CPU: Terraria relies on a single thread. A fast clock speed matters more than core count.

Installation

  1. Download the Terraria dedicated server from the official Re-Logic website (terraria.org). The archive contains server files for Windows, Linux and macOS.
  2. Extract the archive on your VPS or game server and navigate to the folder for your operating system, for example Linux.
  3. Make the server binary executable: chmod +x TerrariaServer.bin.x86_64
  4. Start the server: ./TerrariaServer.bin.x86_64 -config serverconfig.txt

Configuring serverconfig.txt

The most important settings in serverconfig.txt:

  • world: the path to the world file, for example world=/home/terraria/worlds/myworld.wld
  • autocreate: automatically generate a world if it does not exist. Use 1 for small, 2 for medium and 3 for large.
  • worldname: the name of the world.
  • maxplayers: the maximum number of players, default 8. Terraria supports up to 255, but keep performance in mind.
  • port: the server port, default 7777.
  • password: optional password to restrict access.
  • difficulty: 0 for classic, 1 for expert, 2 for master, 3 for journey.
  • secure: set to 1 to block Cheat Sheet and similar tools.

Port forwarding

Terraria uses TCP port 7777 by default. Make sure this port is open in your firewall:

ufw allow 7777/tcp

If you run multiple Terraria servers on the same machine, give each instance its own port.

TShock: mods and server management

TShock is the most popular server framework for Terraria. It adds permissions, region protection, anti-cheat and hundreds of plugins. Installation:

  1. Download TShock from its official GitHub page.
  2. Extract the archive into a separate folder and start TShock.Server instead of the standard server.
  3. On the first start, TShock creates a configuration file and database. Set up an administrator account through the console.

With TShock plugins you can add warps, an economy system, anti-grief measures and automatic backups.

Server management and commands

  • say <message> sends a message to all players.
  • kick <player> removes a player from the server.
  • ban <player> permanently blocks a player.
  • save manually saves the world.
  • exit saves and shuts down the server gracefully.

With TShock you also get in-game commands such as /region for area protection and /user for user management.

A whitelist can be set up through TShock using the RequireLogin option, so only registered players can join.

Tips for HostValues customers

  • Terraria is light enough to run on the smallest game hosting plans. Start small and scale up as your player count grows.
  • Use the game panel to manage server files and monitor the console.
  • Make regular backups through the panel, especially before major updates or when adding TShock plugins.
  • Need help setting things up? Open a support ticket or ask on Discord.

Still stuck? Open a support ticket, our team is happy to help.

Back to the knowledge base