Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The correct password setting depends on the server software. For TShock, edit tshock/config.json and set ServerPassword. For a vanilla Terraria server, add or uncomment password=yourpassword in serverconfig.txt. Save the file, restart the server process, and then test a new connection. An empty password leaves the server open.

Choose the instructions for your server

Terraria does not use one universal password file. First identify whether the server is running the unmodified (vanilla) dedicated-server software, TShock, or a hosting platform that manages one of those installations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Server setup Where the password is set Setting What applies after saving
Vanilla Terraria serverconfig.txt password=yourpassword Restart the server process
TShock tshock/config.json "ServerPassword": "yourpassword" Restart the server process
Hosted TShock panel The panel’s TShock settings, usually a field found by searching for “Password” Panel-specific password field Save the setting and use the panel’s restart control
Docker or Cloudron-style deployment Deployment environment settings Some images expose TERRARIA_PASSWORD Restart or redeploy the container

The TShock documentation describes the JSON setting in its configuration-settings reference. Vanilla examples are documented in a Terraria Wiki server rewrite draft and a vanilla-server guide. File names and labels can change between game, server, and hosting versions, so confirm that you are editing the configuration used by the process you actually start.

Prepare before editing

  • Identify the software. A tshock directory and config.json indicate TShock. A plain serverconfig.txt indicates the vanilla configuration format.
  • Find the active installation. Hosts often create several folders, and a panel may launch a different copy from the one you opened in a file manager.
  • Back up the file. Keep a copy of the original configuration so you can restore it if the server fails to start.
  • Choose a password that is not used elsewhere. Anyone who has it can attempt to join the server, so do not paste it into public chat, screenshots, issue reports, or a public repository.
  • Plan a restart. These settings are read when the server starts; changing a file while the process is running does not make the new value active.

Set a password on a TShock server

TShock stores its server password in JSON. The config.json file is created in the tshock directory on first startup. If you have never launched TShock successfully, start it once so the directory and default configuration can be generated, then stop it before editing.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Step 1: Open the TShock configuration

  1. Stop the TShock server process from your terminal, service manager, or hosting panel.
  2. Open the installation’s tshock/config.json in a text editor that preserves plain text.
  3. Search for the property named ServerPassword. In an unmodified file it normally has an empty value.

Step 2: Enter the password as a JSON string

Change the value while leaving the property name, quotation marks, commas, and surrounding braces intact:

"ServerPassword": "yourpassword"

For example, a password containing letters, numbers, and punctuation remains inside the two quotation marks. Do not remove the comma if another property follows it, and do not add a trailing comma if this is the final property. Invalid JSON can prevent TShock from loading its configuration.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 3: Save and restart

Save config.json, then start the same TShock installation again. A restart is required because the password is read during startup. If a panel controls the process, use its restart action rather than launching a second copy manually.

Step 4: Confirm the result

Disconnect a test client and connect again. The client should be asked for the server password. Try the password once exactly as saved; if it is rejected, work through the troubleshooting section below instead of repeatedly changing several files at once.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Remove the TShock password

To make the server open again, set the value to an empty string:

"ServerPassword": ""

Save the file and restart the server. An empty value means that no password is required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set a password on a vanilla Terraria server

Vanilla servers use a plain-text configuration file rather than TShock’s JSON. The relevant file is usually named serverconfig.txt. The available vanilla references describe a password= line that may already be present but commented out.

Step 1: Stop the vanilla server and locate its active config

  1. Stop the dedicated-server process.
  2. Open the serverconfig.txt file used by that process. If the installation contains more than one copy, use the one referenced by your launch setup or hosting panel.
  3. Search for password=.

Step 2: Add or uncomment the password line

Use one active line in this form:

password=yourpassword

If the file contains a commented password example, remove only the comment marker used by that file and put the password after the equals sign. If no line exists, add the line on its own. Keep the value on one line and avoid accidentally adding leading or trailing spaces.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Step 3: Save, restart, and test

Save the text file and restart the vanilla server. Then connect from a client that is not already connected and enter the password when prompted. If the server still accepts connections without asking, verify that the launch process is reading this exact file and that the value is not empty.

Remove the vanilla password

Clear the value so the line has no password after the equals sign, or remove the line according to the format of your configuration file:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
password=

Restart before testing. A blank password leaves the server open.

Use a hosting control panel

Managed Terraria hosts commonly expose configuration fields instead of expecting you to edit files over FTP or a file manager. In a TShock installation, look for a page labeled Tshock Settings (the capitalization varies) and search that page for Password. A hosting walkthrough shows this workflow in its TShock password guide.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
  1. Stop the server from the panel if the panel offers a stop control.
  2. Open the TShock settings page and locate the password field.
  3. Enter the new value, save the settings, and use the panel’s restart button.
  4. Connect with a test client and verify that a password prompt appears.

A hosting guide reports that a Startup setting can take priority over the value in config.json. That behavior is panel-specific and the attribution is not independently confirmed, so treat it as a precedence check: if the file contains the expected value but the server behaves differently, inspect startup variables and panel fields for another password and change the setting that the panel applies at launch.

Some panels regenerate configuration files when a server starts. If your manual edit disappears, make the change in the panel first, then restart from the panel. Do not run a second server process merely to test a file; that can leave you connecting to the wrong instance.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Docker and Cloudron-style deployments

Container images do not share one universal Terraria environment-variable interface. A Cloudron forum discussion mentions TERRARIA_PASSWORD for a particular TShock deployment. That variable is host- and image-specific, not a guarantee for every Docker image.

Safe procedure for an environment variable

  1. Read the documentation for the exact image or Cloudron application you installed and confirm that it supports TERRARIA_PASSWORD.
  2. Set the variable in the deployment’s environment or application settings, not in a public image file.
  3. Save the deployment, then restart or redeploy the container so the process receives the new environment.
  4. Test a fresh client connection. If there is no password prompt, inspect the container’s startup configuration and logs and confirm that the image actually maps the variable to the server’s password setting.

If the image documents a different variable or a mounted configuration file, follow that image’s method. Do not assume that an environment variable used by one host will work on another.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why a restart is necessary

Terraria server settings are loaded when the server process starts. Editing a file, saving it, and leaving the process running does not reload the password. The reliable sequence is: stop the process, edit the active setting, save it, start the process, and then test a new connection. A panel’s “restart” action should perform the stop-and-start cycle; if it only reloads a web page, use the panel’s actual server restart control.

Verify that the password is really active

  1. Use a client that is disconnected from the server.
  2. Connect using the server address and port you normally use.
  3. Confirm that the client requests a password before joining.
  4. Enter the exact value you saved, including capitalization and punctuation.
  5. Try one deliberately incorrect value to confirm that it is rejected, then reconnect with the correct value.

If you test from an already connected session, you may not exercise the login check at all. Always perform the verification with a new connection after the restart.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot a password that does not work

The server still lets everyone in

  • Check that the value is not empty. In TShock, "ServerPassword": "" explicitly means no password; in vanilla, password= is likewise blank.
  • Confirm that you restarted the server process after saving.
  • Verify the active installation. A second Terraria folder, a different service definition, or a panel-managed copy can make an otherwise correct edit ineffective.
  • For hosted TShock, inspect the panel’s TShock and Startup settings for a value that is applied over config.json.

The server rejects the password

  • Re-enter the value exactly as stored; passwords are sensitive to capitalization and punctuation.
  • In TShock, validate the JSON around ServerPassword. Missing quotation marks, a deleted comma, or an extra trailing comma can cause the configuration to fail or revert.
  • In vanilla, make sure the line is active rather than still commented and that there is only one effective password= line in the file.
  • Check that the client is connecting to the same server instance you restarted. A panel may expose multiple instances or ports.

TShock will not start after editing

Restore the backup, start the server to confirm that the installation works, and then reapply only the password change with valid JSON syntax. Compare the edited line with the TShock configuration format in the TShock settings reference. Do not paste a vanilla password= line into a JSON file.

The password resets after every restart

  • The hosting panel may regenerate config.json; set the value in the panel’s own settings.
  • A Startup field or environment variable may be taking precedence. Remove the conflicting value or update the setting that is applied at launch.
  • In a container, confirm that the environment variable belongs to the image you are running and that the deployment saved the change before restarting.

Changing the password later

Use the same setting you used originally rather than mixing formats. Edit ServerPassword for TShock, or the password= line for vanilla, save, restart, and test a new connection. When using a panel or container, change the panel field or supported environment variable instead of editing a generated file that will be overwritten. Tell trusted players the new value through a private channel and avoid leaving the old password in public logs or screenshots.

Keep the configuration secure

  • Use a unique passphrase long enough that it cannot be guessed from the server name, owner name, or world name.
  • Do not commit config.json, serverconfig.txt, or deployment environment files containing the password to a public repository.
  • Limit access to the machine, panel account, and file manager because anyone who can edit the setting can change the join password.
  • Rotate the password when someone who should no longer join has received it, and restart immediately after the change.
  • Keep a private backup of the configuration, but remove the password from backups that will be shared for support.

Quick reference

Question TShock Vanilla
Configuration format JSON Plain text
File tshock/config.json serverconfig.txt
Password syntax "ServerPassword": "yourpassword" password=yourpassword
Open-server value "ServerPassword": "" password=
Activation Restart the server process Restart the server process
Common override Hosting-panel TShock or Startup setting Hosting-panel startup configuration

The essential rule is to match the password method to the software that launches your server, then restart that exact process. A TShock JSON edit cannot configure a vanilla server, and a vanilla password= line cannot configure TShock.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.