Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsThe correct password setting depends on the server software. A vanilla Terraria server reads a plain-text serverconfig.txt file; TShock reads tshock/config.json. Add the password to the file or control panel that actually starts your server, save it, and restart the server process so the new value is loaded. An empty password value leaves the server open.
Godlike.Host offers hosted Terraria servers with its own game panel, SFTP access and free DDoS protection, if you would rather not host it yourself.
First identify which Terraria server you are running
Do not put a TShock setting in a vanilla configuration file, or a vanilla password= line in TShock’s JSON. The server software determines both the file format and the setting name.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
505 Games Terraria 71501866 | $17.37 | Buy on Amazon |
| 2 |
|
Terraria Boss Rush: Hardmode Edition T-Shirt | $19.99 | Buy on Amazon |
| 3 |
|
Terraria Bunny Plush | $17.78 | Buy on Amazon |
| 4 |
|
Terraria PS Vita Game | $40.99 | Buy on Amazon |
| 5 |
|
CyberPowerPC Gamer Xtreme VR Gaming PC, Intel Core i5-13400F 2.5GHz, GeForce RTX 5060 8GB, 16GB... | $1,285.00 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
Free tools Windows power users keep installed
One-click scans. No signup required.
| Server setup | Where the password is set | Format | Important qualification |
|---|---|---|---|
| Vanilla Terraria dedicated server | serverconfig.txt |
password=yourpassword |
The line may be commented out in an example configuration; remove the comment marker before saving. |
| TShock | tshock/config.json |
The ServerPassword JSON setting |
The file is created on the first TShock start. An empty string means no password. |
| Managed hosting panel | The panel’s TShock or startup settings | Panel-specific controls | A startup value can override the file on some hosts, so check both places. |
| Docker-style deployment | Container environment variables or the mounted configuration | Host-specific; one documented example uses TERRARIA_PASSWORD |
Environment-variable names are not universal across images. |
The TShock setting and its meaning are documented in the TShock configuration settings reference. For vanilla servers, the syntax is also shown in the Skynode vanilla-server guide and a Terraria Wiki server-configuration draft. The draft is a user page rather than a confirmed current official reference, so check the configuration generated by your installed game version if labels differ.
Restart is part of the change
Terraria and TShock read their server settings when the process starts. Editing a file while the server is running does not reliably change the live server. Stop the server cleanly, save the password, then start the same server executable or panel instance again. If a host panel automatically restarts after a save, wait for that operation to finish before testing.
#1 Best Overall
- In Terraria, every world is unique-from the floating islands in the sky to the deepest level of The Underworld. Adventure to the ends of the earth, and defeat villainous bosses along the way. The world is your canvas!
Keep a copy of the original configuration before editing. If the server fails to start afterward, restore the copy and inspect the syntax for a missing quotation mark, comment character, or accidental change to another setting.
Set a password on a vanilla Terraria server
1. Locate the configuration file
Find the serverconfig.txt file used by the server launch command. It is often in the same server directory as the dedicated-server executable, but the decisive clue is the path supplied to the launch command or hosting panel. A server can have several text files, so edit the one the running instance actually loads.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →2. Add or uncomment the password line
Open the file in a plain-text editor and add this line, replacing the example value:
password=yourpassword
If the file already contains a line such as #password=, remove the leading comment character and enter the value:
password=yourpassword
Use the exact spelling password, an equals sign with no extra setting name, and the password on the same line. Do not save the file as rich text or as a document with an extra extension such as serverconfig.txt.txt. Keep the rest of the generated options unchanged unless you intend to modify them.
Rank #2
- Gaming Boss Battles design. Boss Rush: Hardfashion Edition items are perfect for fans of Terraria or anyone who likes cool video game clothes! These Terraria items feature the hardmode bosses and is a great way to show your enthusiasm for Terraria!
- Part of the official Terraria merchandise line from Re-Logic, the creators of Terraria! If you are a terraria fan or should know one, get this design to give yourself or others who play terraria a great gift.
- Lightweight, Classic fit, Double-needle sleeve and bottom hem
3. Save and restart the vanilla server
Save the text file, stop the current server process, and start it again with the same configuration-file argument. If you use a script, service, or panel, restart that managed instance rather than launching a second copy manually; two processes competing for the same port can make a correct password change appear not to work.
Recommended Free Tools
4. Test from a client
Connect using the server’s address and port. A client that supplies the new password should enter the world; a client that leaves it blank or uses an older value should be rejected. Test from a second account or device if possible, and disconnect the test client before changing the password again.
Set a password on a TShock server
1. Start TShock once so its configuration exists
TShock creates tshock/config.json on its first start. If the directory or file is missing, launch the server once, allow initialization to finish, stop it cleanly, and then edit the generated file. Do not create a different JSON file elsewhere unless your startup command explicitly points there.
2. Edit the ServerPassword value
Open tshock/config.json in a text editor that preserves JSON. Find the ServerPassword property and replace its value with the password you want. A typical entry has this shape:
"ServerPassword": "yourpassword"
Keep the quotation marks, comma placement, and capitalization used by the generated file. JSON is stricter than a line-oriented text configuration: a missing comma or quote can prevent TShock from parsing the file. Avoid smart quotes inserted by word processors.
Rank #3
- Product Type:Toy Figure
- Item Package Dimension:11.6 cm L X 14.4 cm W X 15.8 cm H
- Item Package Weight:0.1 kg
- Country Of Origin: China
An empty value means that TShock does not require a password:
"ServerPassword": ""
That is useful for a deliberately public server, but it is not a protected configuration. The TShock settings reference identifies ServerPassword as the relevant setting.
3. Save, validate, and restart TShock
Save the file without changing its .json extension. Stop the TShock process and start it again. Watch the startup log for a JSON parsing error or a message indicating that a different configuration path is being used. If the process will not start, restore the backup and reapply only the password edit with valid JSON syntax.
4. Confirm the protected connection
Join with the new password, then deliberately try a wrong password. This distinguishes a working password from a client that was already authenticated or a panel that has not restarted the instance you edited.
Use a hosted server control panel
Panels vary, but a TShock installation commonly exposes a Tshock Settings page. Open the server’s settings, search the page for Password, enter the value, save it, and use the panel’s restart control. A step-by-step hosting example is available from Kinetic Hosting’s TShock password guide.
Rank #4
- 14 Different environments (including dungeons, floating islands, jungles) that go to the extremities of the earth, up in the sky and all the way down to the very deepest depths of the world.
- Hundreds of weapons, armour and other items to craft, with character advancement.
- Explore to find different materials and make exotic potions, laser guns, magic wands, flamethrower, diving gear, speed boots, grappling hooks, chainsaws, magic mirrors, etc.
- 29 Different block types to build whatever you imagine!
- NPCs and a swarm of enemies (over 150 types) including goblins, wyverns, unicorns, and-GASP-clowns!
Check for a startup override
Some panels provide a password field in a Startup or launch-parameter section as well as an editable config.json. One hosting guide reports that a Startup value may take priority over the JSON file, although that behavior is host-specific and the attribution is not independently confirmed here. If your saved file keeps reverting or the old password remains active:
- Stop the server.
- Inspect the panel’s Startup, Variables, or Launch Parameters page for a password field.
- Remove an old startup value or change it to the same password as the configuration file.
- Save the panel settings and restart the managed server.
- Reopen the file after the restart to see whether the panel rewrote it.
Do not assume that a panel’s file browser points to the same directory used by the live process. The startup command, working directory, or selected server instance determines which configuration is active.
Docker-style deployments and environment variables
Container images sometimes translate an environment variable into the Terraria or TShock configuration at startup. A Cloudron forum discussion mentions TERRARIA_PASSWORD for one TShock deployment (Cloudron TShock thread). Treat this as an image- or host-specific convention, not a universal Terraria variable.
For a containerized server, inspect the image documentation and deployment definition first. If it documents TERRARIA_PASSWORD, set the variable in the container’s environment, redeploy or restart the container, and confirm that the generated configuration contains the expected value. If the image does not document that variable, editing it will have no effect; use the mounted configuration file or the image’s own documented setting instead.
- Keep secrets out of public compose files, screenshots, and support posts.
- Remember that changing an environment variable normally requires recreating or restarting the container, not merely reconnecting a game client.
- Check container logs for a startup message, configuration parse error, or indication that an environment variable was ignored.
How to change, remove, or rotate the password
Change a password
Edit the same source that currently controls the server: the vanilla password= line, TShock’s ServerPassword, or the panel or container variable. Save and restart, then distribute the new value only to players who should retain access. Existing connections may remain connected until they disconnect; test a fresh connection to verify the new value.
Best Value
- System: Intel Core i5-13400F 2.5GHz 10 Cores | Intel B760 Chipset | 16GB DDR5 | 1TB PCIe 4.0 NVMe SSD | Windows 11 Home
- Graphics: NVIDIA GeForce RTX 5060 8GB Graphics | 1x HDMI | 2x DisplayPort
- Connectivity: 1 x USB-C 3.2 | 2 x USB-A 3.2 | 6 x USB-A 2.0 | 1 x LAN | WiFi 6 | Bluetooth 5.3 | 7.1 Channel Audio
- Tempered Side Case Panel | Custom RGB Lighting | Keyboard and Mouse
- 1 Year Parts & Labor Warranty, Free Lifetime Tech Support
Remove the password
For vanilla, remove the password value or use the server’s documented empty setting. For TShock, set ServerPassword to an empty string, "". Restart and test from a client with no password. An empty value makes the server open, so use it only when that is intentional.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rotate after disclosure
If the password appeared in a public chat, log, screenshot, or repository, treat it as compromised. Replace it with a new value rather than relying on secrecy, and update every panel or startup variable that could overwrite the file.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting: when the password does not work
| Symptom | Likely cause | What to check |
|---|---|---|
| The server still accepts anyone | The value is empty, the wrong file was edited, or the process was not restarted. | Confirm the active startup path, verify a non-empty value, and perform a full stop/start. |
| The new password is rejected | A panel or startup variable is overriding the file, or the client is using an old saved value. | Inspect Startup or Variables settings, then reconnect with the exact new value. |
| TShock will not start | Invalid JSON, such as a missing quote or comma. | Restore the backup and edit only the string after ServerPassword. |
| Vanilla server ignores the line | The line remains commented, the setting is misspelled, or another configuration file is active. | Use an uncommented password=... line and verify the launch command’s file path. |
| Container changes disappear | The image regenerates configuration from environment variables at startup. | Set the documented variable or persistent mount, then recreate or restart the container. |
| Players can connect without being prompted | They are already connected, or they joined a different server instance or address. | Disconnect completely, test a fresh client, and verify the endpoint and process. |
Check which process is actually running
A common source of confusion is editing one installation while a service, script, panel, or container launches another. Stop the managed service and confirm that the game server process exits. Then start it through the same mechanism normally used by players. If the old process remains, it can continue serving the old password while the edited instance never receives connections.
Check for file-format damage
Use a plain-text editor, preserve UTF-8 or the encoding created by the server, and look for accidental extension changes. In JSON, inspect commas and quotation marks. In the vanilla file, ensure the password is on its own line and that a comment marker has not disabled it.
Choose a password that is practical for a shared game server
- Use a unique phrase that is not reused for email, hosting, or administrator accounts.
- Share it through a private channel; a password posted in a public community channel is no longer a gate.
- Keep the value easy enough for invited players to type accurately, but not predictable from the server name or owner.
- Change it when the player group changes or when anyone with access is no longer trusted.
- Back up the configuration without exposing the secret in a public repository or support ticket.
The server password controls entry to the game server; it does not replace operating-system account security, panel authentication, firewall rules, or TShock permissions. Protect those layers separately.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallQuick Recap
Quick decision checklist
- Identify whether the server is vanilla, TShock, hosted through a panel, or running in a container.
- Locate the configuration source used by the active startup command.
- Set the matching value:
password=yourpasswordfor vanilla orServerPasswordfor TShock. - Check for a panel Startup or environment-variable override.
- Save a backup, restart the actual server process, and test both the new password and an incorrect one.
- Document who has the password and rotate it if it is disclosed.
Reference guides
- TShock Config Settings
- Kinetic Hosting: how to set a TShock server password
- Skynode: vanilla Terraria password guide
- Terraria Wiki user server-configuration draft
- XGamingServer Terraria server configuration guide
- Cloudron forum TShock discussion
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




