Articles on: Project Zomboid

How to Remove an Old Project Zomboid Server

If you have an old Project Zomboid server that you no longer need, it's a good idea to remove it to free up system resources and keep your system organized. This guide will walk you through the steps to safely remove an old Project Zomboid server from your system.

Looking for a Project Zomboid server? Visit our Project Zomboid Server Hosting and use coupon code GETSTARTED for 50% off your first month.

Steps to Remove an Old Project Zomboid Server



1. Stop the Server



Before removing the server, make sure it is not running. Stopping the server ensures that no files are in use and prevents potential issues during the removal process.

How to Stop the Server:


- Windows: If you are running the server via a command prompt, simply close the command window or press Ctrl + C to stop the server.
- Linux: If the server is running as a service, you can stop it with the following command:
sudo systemctl stop projectzomboid.service

If the server was started manually in a terminal session, you can stop it by pressing Ctrl + C in the terminal where the server is running.

2. Backup Important Files (Optional)



If you want to keep any server configurations, save data, or logs for future reference, now is the time to back them up.

Files to Consider Backing Up:


- Server Settings: servertest.ini
- World Saves: Located in the Saves/Multiplayer directory.
- Logs: Stored in the Logs directory.

You can copy these files to another location on your system or external storage.

3. Delete Server Files



After stopping the server and backing up any important data, you can proceed to delete the server files.

Steps:


- Windows:
Navigate to the directory where your Project Zomboid server files are located.
Select the entire folder containing the server files and press Shift + Delete to permanently remove the files.

- Linux:
Navigate to the server directory:
cd /path/to/your/server

Remove the server files with the following command:
sudo rm -rf *

Ensure that you are in the correct directory before running this command, as it will delete all files in the current directory.

4. Remove Server Entries from Startup (Linux)



If your server was set up to start automatically as a service on Linux, you should remove it from the startup services list.

To Disable and Remove the Service:


Disable the Service:
sudo systemctl disable projectzomboid.service

Remove the Service File:
sudo rm /etc/systemd/system/projectzomboid.service

After removing the service file, reload the systemd daemon to apply changes:
sudo systemctl daemon-reload


5. Remove Database Entries (Optional)



If your server used a database (e.g., for mods or other advanced configurations), you might want to remove the corresponding database entries.

- SQLite: Simply delete the .db files associated with your server.
- MySQL/PostgreSQL: Use your database management tool to drop the relevant database.

6. Clean Up Firewall Rules



If you had set up specific firewall rules for your Project Zomboid server, it’s a good idea to clean them up.

Example Commands (Linux):


- UFW (Uncomplicated Firewall):
sudo ufw delete allow 16261
  sudo ufw delete allow 16262:16272/tcp
  sudo ufw delete allow 8766/udp


- iptables:
sudo iptables -D INPUT -p tcp --dport 16261 -j ACCEPT
  sudo iptables -D INPUT -p udp --dport 8766 -j ACCEPT


7. Reboot Your System (Optional)



After performing the above steps, it's a good idea to reboot your system to ensure all changes take effect and no remnants of the server are left running.

Conclusion



By following these steps, you can safely and effectively remove an old Project Zomboid server from your system. This will help free up space and resources, ensuring your system runs smoothly. Always remember to back up important data before deletion if you might need it in the future.

Updated on: 19/08/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!