sodcalculator

10 Tech How-To

Run a Rust Dedicated Server on Linux

Guide 10-36309 · Updated · Step by step

This guide walks you through setting up a Rust dedicated server on a Linux machine, covering installation, configuration, and basic management. You’ll need a Linux server (Ubuntu 20.04 or newer recommended), a Steam account, and a stable internet connection. The process uses SteamCMD to download the server files and then runs the server binary with your chosen settings.

What You’ll Need

  • A Linux server (physical or VPS) with at least 8GB RAM (16GB recommended for larger populations).
  • Root or sudo access to the server.
  • A Steam account (free to create).
  • An open port range (UDP 28015-28016, TCP 28015) for player connections.
  • Basic familiarity with the command line.

Step-by-Step

  1. Update your system – Log in via SSH and run:
    sudo apt update && sudo apt upgrade -y
  2. Install SteamCMD – Install the required 32-bit libraries and SteamCMD:
    sudo apt install steamcmd

    If SteamCMD is not in the default repositories, add the multiverse repo and install it manually:

    sudo add-apt-repository multiverse
    sudo apt update
    sudo apt install steamcmd
  3. Create a dedicated user – For security, run the server under a non-root user:
    sudo useradd -m -s /bin/bash rustserver
    sudo passwd rustserver
  4. Switch to the rustserver user – Use su - rustserver or log in as that user.
  5. Download the server files – Use SteamCMD to fetch the Rust dedicated server (app ID 258550):
    steamcmd +login anonymous +force_install_dir ~/rustserver +app_update 258550 validate +quit

    This downloads the latest server files to the ~/rustserver directory.

  6. Create a startup script – In the ~/rustserver directory, create a file named run.sh with the following content:
    #!/bin/bash
    ./RustDedicated -batchmode +server.port 28015 +server.level "Procedural Map" +server.seed 12345 +server.maxplayers 50 +server.hostname "My Rust Server" +server.description "Welcome to my server" +server.url "http://example.com" +server.headerimage "http://example.com/header.png" +server.identity "server1" +rcon.port 28016 +rcon.password "changeme" +rcon.web 1

    Adjust the seed, max players, hostname, and RCON password as desired. Make the script executable:

    chmod +x run.sh
  7. Start the server – Run the script:
    ./run.sh

    The server will generate the world and start listening on port 28015. The first launch may take a few minutes.

  8. Verify it’s running – Check the console output for messages like “Server startup complete” or use netstat -tulpn | grep 28015 to confirm the port is listening.
  9. Connect to the server – In Rust, open the console (F1) and type connect your-server-ip:28015 or search for it in the server browser.

Common Mistakes

  • Forgetting to open ports – Without UDP 28015 open, players can’t connect. Also open TCP 28016 for RCON if you plan to use it.
  • Using the wrong SteamCMD app ID – The correct ID for Rust dedicated server is 258550, not the client’s 252490.
  • Running as root – The server may refuse to start or behave unexpectedly. Always use a dedicated user.
  • Not validating files – Skipping the validate parameter can leave corrupted files. Always include it when updating.

Tips

  • Use a screen or tmux session to keep the server running after you log out. Example: screen -S rust then run the script, then detach with Ctrl+A D.
  • Set a strong RCON password to prevent unauthorized admin access.
  • Regularly update the server with steamcmd +login anonymous +force_install_dir ~/rustserver +app_update 258550 validate +quit to get the latest patches.
  • Back up your server1 folder (world data) periodically.
  • Consider using a systemd service for automatic restarts and logging.

Troubleshooting

  • Server won’t start – Check the console output for errors. Common issues: missing write permissions (run as rustserver), insufficient RAM, or a corrupt download (re-run with validate).
  • Players can’t connect – Verify the port is open (use ufw status or iptables -L). Ensure the server is actually listening (netstat). Also check that your hosting provider allows the port.
  • High ping / lag – Ensure the server has enough CPU and RAM. Reduce server.maxplayers if needed. Also check your network bandwidth.
  • RCON not working – Make sure rcon.port and rcon.password are set correctly in the startup script, and that the TCP port is open.
  • Server crashes after a while – Look at the logs in ~/rustserver/server1 for error messages. Common causes are memory leaks (restart regularly) or incompatible mods.

Frequently Asked Questions

How much RAM does a Rust server need?

For a small server (up to 50 players), 8GB is sufficient. For larger populations, 16GB or more is recommended. The world generation and player activity are the main memory consumers.

Can I run the server on a VPS?

Yes, but choose a VPS with a dedicated CPU and at least 8GB RAM. Shared hosting usually won’t provide enough performance for a smooth experience.

How do I update my Rust server?

Run the same SteamCMD command you used for installation, including the validate parameter. The server will automatically use the updated files on the next restart.

How do I add admin privileges?

Edit the users.cfg file in the server1 folder. Add lines like: ownerid 76561198000000000 "AdminName" "owner" (replace with your Steam64 ID and desired name).

Can I run multiple servers on one machine?

Yes, but each server needs its own port and identity. Copy the server files to a new directory, change the ports and server.identity in the startup script, and run them separately.

How do I change the map seed?

Stop the server, edit the server.seed value in your startup script, and delete the server1 folder (or change server.identity) to force a new world. Restart the server.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →