Cheats & Console Commands: Server Config, -autocreate, -port
Cheats are configuration options, command-line parameters, and server settings used to customize or bypass normal gameplay limits for Terraria servers and dedicated server instances. They matter for administrators who want to automate server startup, control access, or troubleshoot why a server won't start.
Configuration file basics
- Terraria server accepts a plain-text configuration file. The syntax and available options are the same on all operating systems.
- An example configuration file named in the Terraria folder can be opened in any text editor (Notepad, Notepad++, etc.). If no example exists, you can create a plain text file and populate it with the parameters below.
- To use a configuration file, run the server with:
- TerrariaServer.exe -config serverconfig.txt
- (Or call your start script with that parameter.)
Common configuration options and command-line parameters
Include the desired parameter name and value pairs in the config file or pass them directly on the command line. Common parameters:
- -config
- Specifies which configuration file to use.
- -port
- Sets the TCP port the server listens on.
- -players or -maxplayers
- Sets the maximum number of players allowed.
- -pass or -password
- Sets the server password for protected servers.
- -world
- Loads a specific world file and automatically starts the server with it.
- -autocreate
- Creates a world if none is found at the path provided to -world. World size is specified by numeric values: 1 (small), 2 (medium), 3 (large).
- -banlist
- Specifies the path to the banlist file. Defaults to "banlist.txt" in the working directory.
- -worldname
- Sets the name assigned to a world when creating or loading it via command-line options.
Other parameters are available; consult the example config file for the full list and syntax.
Creating and editing the config file
- The config file is plain text. Lines beginning with # are treated as comments and are commonly used in the example file to document options.
- If you do not see a config file, create a new text file and save it with an appropriate name (e.g., serverconfig.txt). Use the -config switch to point the server to that file.
- Ensure each option is correctly typed. Typos in option names or values will prevent the server from recognizing them.
Troubleshooting server startup
If the server does not start, follow these steps:
- Check for typos in command-line parameters and in the configuration file. Typing mistakes are a very common cause of failure.
- Verify the port specified is free and not blocked by another application or by a firewall.
- Confirm file paths (world file, banlist file) are correct and accessible by the server process.
- Review any console output or crashlog.txt for error messages and include that information when seeking help.
- If problems persist after verifying configuration and command-line correctness, search server forums for similar issues or known bugs.
- As a last resort, reinstall Terraria to restore missing or corrupted server files.
Best practices for server administrators
- Keep a copy of the example configuration file and comment your customizations so you can revert changes easily.
- Test configuration changes by starting the server locally before deploying it publicly.
- Back up world files and banlists before altering server settings that affect saved data.
- Use descriptive world names with -worldname to make administration easier.
- Restrict access with -pass/-password and manage banned players via -banlist.
This guide covers the configuration and quick troubleshooting items used to control Terraria server behavior. Use precise option names and correct syntax; incorrect typing is the most frequent cause of configuration-related failures.