Skip to content

Step-by-step guide on how to set up, configure, install mods, recover, and start a Project Zomboid server on an Ubuntu machine.

License

Notifications You must be signed in to change notification settings

Bobagi/Zomboid-Ubuntu-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧟 Zomboid Server on Ubuntu 22.04 and 23.04

This repository contains scripts, configuration files, and documentation to help you set up a Project Zomboid server on an Ubuntu 23.04 64-bit VPS hosted with Hostinger and on a server on an Ubuntu 22.04 64-bit VPS hosted with Hostzone. This is a personal project designed to create a private server for playing with friends.

The Hostzone VPS was essentially double the price, but the ping was much better.

Any suggestion on how to check other host services pings

Steam Ubuntu

📑 Table of Contents

  1. Prerequisites
  2. Installation
  3. Configuration
  4. Running the Server
  5. Installing Mods
  6. License
  7. Acknowledgements

🖥️ Prerequisites

Before you begin, ensure you have met the following requirements:

  • A VPS running Ubuntu (tested in 22.04 and 23.04 64-bit)
  • sudo privileges on the VPS
  • Basic knowledge of terminal and Linux commands
  • Project Zomboid game purchased on a platform like Steam

💿 Installation

  1. Update and upgrade your system:

    sudo apt-get update && sudo apt-get upgrade -y
    
    sudo ufw enable
    

    IMPORTANT: If you're connecting via SSH, you need to allow the port you are using; otherwise, you won't be able to connect via SSH as you are currently doing:

    sudo ufw allow 22
    

    In my case, my port to SSH is 22

    Then allow the ports used by the game Server:

    sudo ufw allow 16261
    
    sudo ufw allow 16262
    
    sudo ufw reload
    

    Then i recommend to check if the ports are really open:

    sudo ufw status
    

    Look if all the ports you have opened are listed.

  2. Add a new user named "steam" (or whatever name you want):

    sudo adduser steam
    
    usermod -aG sudo steam
    

    Give user permissions:

    sudo chown steam:steam /home/steam/ -R
    
    sudo chmod -R 755 /home/steam/
    
  3. Change to the "steam" user's home directory:

    cd /home/steam
    
  4. Enable the multiverse repository:

    sudo add-apt-repository multiverse
    
  5. Enable the i386 architecture:

    sudo dpkg --add-architecture i386
    
  6. Update your package list:

    sudo apt update
    
  7. Install SteamCMD:

    sudo apt install steamcmd
    
  8. Switch to the "steam" user:

    su - steam
    
  9. Change to the home directory of the "steam" user:

    cd
    steamcmd
    
  10. Create a directory for your Project Zomboid server installation:

    force_install_dir /home/steam/pzsteam
    
  11. Log in to SteamCMD anonymously:

    login anonymous
    
  12. Update and validate the Project Zomboid server files:

    app_update 380870 validate
    
  13. Exit SteamCMD:

    exit
    

⚙️ Configuration

  1. Change the Xmx parameter, to specify the correct amount of gb RAM you would like to be dedicated to Zomboid:

    cd /home/steam/pzsteam
    

    Then change the file called ProjectZomboid64.json in the Xmx parameters, to specify the correct RAM dedicated to server.

    sudo nano ProjectZomboid64.json
    

    image In that case, i'm using 8g of RAM.

  2. Once you have configured the settings as you like, you need to create a server, in your local machine to make the configurations you want, and then navigate to the following folder on your Windows machine if you already have a server:

    C:\Users\yourusername\Zomboid\Server
    
  3. In that folder, copy the following files:

    • yourservername.ini
    • yourservername_spawnregions.lua
    • yourservername_SandboxVars.lua
  4. In the PZ server directory on your Linux server paste these files:

    /home/steam/Zomboid/Server
    

These steps should help you install and configure your Project Zomboid server. Make sure to replace "yourservername" and "yourusername" with the appropriate values for your setup.

🕹️ Running the Server

  1. Start a screen session:

    screen -S zomboid
    
  2. Navigate to the server files directory and run the server:

    cd /home/steam/pzsteam
    
    ./start-server.sh -servername yourservername
    
  3. To detach from the screen session (and keep the server running in the background), press Ctrl + A, then D.

  4. To attach it again:

    screen -r zomboid
    

:godmode: Installing Mods

  1. Download the mods you wish to install to your local computer. (https://steamcommunity.com/app/108600/discussions/0/3428846977656275044/)

  2. Use scp or any other file transfer method to upload the mods to your VPS:

    scp /path/mods pzserver@your_vps_ip:/home/pzserver/Zomboid/mods/
    

    (Replace /path/to/mods, pzserver, your_vps_ip with the appropriate paths, username, and IP address.)

    Or use another method to paste the mods folder in the server, as Filezilla.

  3. Once uploaded, add the mods to your ServerSettings.ini file under the Mods section.

📜 License

This project is open-source and available under the MIT License. See the LICENSE file for more information.

🥫❤️ Buy me a dog food can

PayPal Donate with PayPal

📬 Contact

If you have any questions, suggestions, or issues, please open an issue in the repository.

About

Step-by-step guide on how to set up, configure, install mods, recover, and start a Project Zomboid server on an Ubuntu machine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages