This guide covers setting up your Terraria dedicated server, including world configuration, serverconfig.txt settings, and connecting from the game client.
Server Configuration: serverconfig.txt
The primary configuration file for your Terraria server is serverconfig.txt, located in the server root directory. This file controls world selection, network settings, player limits, and more. Changes take effect on the next server restart.
Key Settings
| Setting | Example Value | Description |
|---|---|---|
world |
/home/container/saves/Worlds/MyWorld.wld |
Absolute path to the world file to load. Must match an existing .wld file in the saves/Worlds/ directory. |
worldpath |
/home/container/saves/Worlds |
Directory where world files are stored. This value is managed by the panel — do not change it. |
worldname |
MyWorld |
Name of the world. Used when auto-creating a new world (see autocreate). |
autocreate |
1 |
Automatically creates a new world if the specified world file does not exist. Values: 1 = Small (default), 2 = Medium, 3 = Large. |
seed |
12345 |
World generation seed. Leave blank for a random seed. Only applies when a new world is created via autocreate. You can set this in GPanel. |
port |
— | Network port the server listens on. Do not change — your panel assigns this automatically. |
maxplayers |
8 |
Maximum number of simultaneous players allowed on the server. |
password |
mysecretpass |
Optional join password. Leave blank for no password. Players must enter this when connecting. |
difficulty |
0 |
World difficulty. 0 = Normal, 1 = Expert, 2 = Master, 3 = Journey. Set at world creation — changing after creation has no effect. |
Example serverconfig.txt
world=/home/container/saves/Worlds/MyWorld.wld
worldpath=/home/container/saves/Worlds
worldname=MyWorld
autocreate=1
seed=
maxplayers=8
password=
difficulty=0
motd=Welcome to the server!
difficulty setting only applies when a new world is being created via autocreate. It cannot change the difficulty of an existing world file.
World Files and Sizes
World files use the .wld extension and are stored in the saves/Worlds/ directory on your server. When a world is created, Terraria generates this file automatically.
World Size Options (autocreate)
| Value | Size | Approximate Dimensions |
|---|---|---|
1 |
Small (default) | 4200 x 1200 tiles |
2 |
Medium | 6400 x 1800 tiles |
3 |
Large | 8400 x 2400 tiles |
To use an existing world, upload your .wld file to the saves/Worlds/ directory via SFTP (see How to Upload Files via SFTP), then update the world setting in serverconfig.txt to the full absolute path of the file.
Connecting to Your Server
Before connecting, make sure you have your server's IP address and port. You can find these in your GPanel dashboard — see How to Find Your Server IP and Port.
Steps to Connect
- Launch Terraria on your PC.
- From the main menu, click Multiplayer.
- Select a character to play with.
- Click Join via IP.
- Enter your server's IP address in the first field.
- Enter the port in the second field (shown in your GPanel dashboard).
- If a password is set, enter it when prompted.
File and Directory Reference
| Path | Contents |
|---|---|
serverconfig.txt |
Main server configuration (world, port, password, maxplayers, etc.) |
saves/Worlds/ |
World save files (.wld format) |
Related Articles
- Terraria Mod Installation (tModLoader) — Installing and managing mods with tModLoader
- Terraria Troubleshooting — Common issues and fixes
- How to Find Your Server IP and Port
- How to Upload Files via SFTP