Set Up a Rust Dedicated Server on Linux
To set up a Rust dedicated server on Linux, we install its files through SteamCMD, create a named server instance, configure player access, and run it as a systemd service. We then check remote joining, restrict administration access, and make a backup that we can restore.
This guide covers the Rust PC game server on Ubuntu Server 24.04 LTS, using a vanilla setup without plugins. It does not require the Rust programming language, Cargo, or rustup.
We use one set of paths throughout so that installation, maintenance, and recovery refer to the same world.
Choose Map Size and Server Resources
A Rust server needs resources for the game process, operating system, world data, and maintenance. A configured player limit does not prove that the host can serve that many active players.
Prerequisites and Supported Versions
Start with:
- A fresh Ubuntu Server 24.04 LTS machine with an x86-64 CPU.
- An administrator account with sudo access over SSH.
- A reachable public IP address and control of the relevant firewalls.
- SSD or NVMe storage with room for saves, logs, and backups.
- A separate PC with a licensed Rust client for the join test.
- Access to the provider’s console if a firewall mistake interrupts SSH.
Facepunch lists 12 GB of free RAM and 15 GB of free disk space in its server requirements. It notes that demand changes with the workload. Treat these as a starting reference, not a promise of capacity or a complete storage budget.
For this installation, reserve more space than the software alone needs. A backup staged on the same disk consumes additional space before we transfer it elsewhere.
Run these checks from the administrator’s SSH session:
cat /etc/os-release
uname -m
free -h
df -h /home Confirm that the OS matches this guide and the architecture reports x86_64. In the memory output, inspect available memory, not only the total installed amount.
Choose a Starting Map and Player Limit
We will use the following example settings:
| Setting | Example value | Reason |
|---|---|---|
| Server identity | atal-rust-01 | One stable name for this instance’s data |
| Map type | Procedural Map | A vanilla starting point |
| Map size | 3000 | A modest initial configuration |
| Seed | 12345 | A fixed value for repeatable configuration |
| Player limit | 10 | A small initial access limit |
| Save interval | 300 seconds | A five-minute starting interval to assess |
atal-rust-01Procedural Map3000 12345 10 300 secondsThese are configuration choices, not benchmark results. Test with representative players and world activity before increasing the limit. Keep spare memory and watch storage growth as the world develops.
Choose the hosting region using the routes your players will use. Our guide to choosing a game server location explains the factors to compare.
Keep the Installation Method Consistent
This tutorial uses SteamCMD for installation and updates, then systemd for process control.
LinuxGSM provides another route with its own management commands. If we choose that route, we should follow its layout throughout rather than combine parts of two installation methods.
Install and Update With SteamCMD
We will use the administrator account for OS tasks and a separate rustserver account for game files. The game account will not receive
sudo access.
Create the Game Account and Install Packages
Run as the administrator:
sudo apt update
sudo apt install -y ca-certificates curl tar nano openssl lib32gcc-s1 lib32stdc++6 ufw
sudo adduser --disabled-password --gecos "" rustserver
sudo chmod 750 /home/rustserver
sudo install -d -o rustserver -g rustserver -m 750 /home/rustserver/steamcmd /home/rustserver/rust /home/rustserver/logs The library packages supply 32-bit runtime support used by SteamCMD. They do not change the host into a 32-bit system. Ubuntu provides these packages for the named release.
Check the account:
id rustserver It should not belong to the sudo group. Use the administrator account whenever a later step needs sudo.
Download SteamCMD and Install Rust
Switch to the game account:
sudo -iu rustserver Run the following in that shell:
cd /home/rustserver/steamcmd
curl -fL --retry 3 -o steamcmd_linux.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzf steamcmd_linux.tar.gz
chmod u+x steamcmd.sh
./steamcmd.sh +force_install_dir /home/rustserver/rust +login anonymous +app_update 258550 +quit Rust’s dedicated-server application ID is 258550. Its installation accepts an anonymous SteamCMD login. We do not enter a personal Steam password here.
Stop if the download or install reports an error. Check that the server executable exists:
test -x /home/rustserver/rust/RustDedicated && printf 'RustDedicated is present and executable.
' The expected checkpoint is an executable file plus a successful SteamCMD installation result. File presence alone does not prove the download completed correctly.
Create the Server Configuration
Still as rustserver, create the configuration directory:
mkdir -p /home/rustserver/rust/server/atal-rust-01/cfg
nano /home/rustserver/rust/server/atal-rust-01/cfg/server.cfg Enter:
server.hostname "Our Rust Community"
server.description "A vanilla Rust server for our community."
server.maxplayers 10
server.saveinterval 300 Save and close the editor. Keep the file readable only by the game account:
chmod 600 /home/rustserver/rust/server/atal-rust-01/cfg/server.cfg The identity and directory must match. In this guide, atal-rust-01 is the identity, while Our Rust Community is the public name. Changing one does not mean we should change the other.
Do not repeat the same setting in several configuration files. That makes it harder to identify which value the server uses at startup.
Create an RCON Secret and Startup Script
RCON means Remote Console. It lets us send administration commands to the server.
Create a random password without placing the password itself in shell history:
umask 077
openssl rand -hex 32 > /home/rustserver/.rcon-password
chmod 600 /home/rustserver/.rcon-password
nano /home/rustserver/start-rust.sh Paste this script:
#!/usr/bin/env bash
set -euo pipefail
cd /home/rustserver/rust
export LD_LIBRARY_PATH="$PWD:$PWD/RustDedicated_Data/Plugins/x86_64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
rcon_secret=$(< /home/rustserver/.rcon-password)
: "${rcon_secret:?RCON password is empty}"
exec ./RustDedicated -batchmode -nographics +server.identity "atal-rust-01" +server.level "Procedural Map" +server.seed 12345 +server.worldsize 3000 +server.port 28015 +server.queryport 28017 +rcon.ip 127.0.0.1 +rcon.port 28016 +rcon.web 1 +rcon.password "$rcon_secret" +app.port 1- -logfile "/home/rustserver/logs/rust-$(date -u +%Y%m%dT%H%M%SZ).log" Save it, then run:
chmod 700 /home/rustserver/start-rust.sh
bash -n /home/rustserver/start-rust.sh
exit We are now back in the administrator shell. A successful bash -n check prints no output. It checks shell syntax, not Rust settings.
The script sets the search path for the bundled native libraries and keeps the RCON password out of the script text. The running process still receives it as an argument. Accounts that can inspect those arguments may read it. Use this layout on a host with trusted shell users, restrict diagnostic output, and redact process listings before sharing them.
The unusual +app.port 1- argument follows Facepunch's documented syntax for disabling Rust+. We keep that optional service off during the basic setup.
Configure the Firewall Before the First Start
This rule set is for the fresh host described above. If the machine already serves other applications, inspect and preserve their required rules.
First, identify your actual SSH port. The example below assumes port 22. Replace it if SSH uses another port:
sudo ufw status numbered
sudo ufw allow 22/tcp comment 'SSH administration'
sudo ufw allow 28015/udp comment 'Rust players'
sudo ufw allow 28017/udp comment 'Rust server queries'
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable
sudo ufw status verbose Keep the current SSH session open and test a second login before continuing. Do not add a public allow rule for TCP port 28016.
If the provider also has a network firewall, permit the same player and query traffic there. Keep RCON blocked at that layer too. A machine behind a router needs matching UDP forwarding to its internal address.
Run the Server With systemd
Create the service as the administrator:
sudo nano /etc/systemd/system/rust.service Enter:
[Unit]
Description=Rust Dedicated Server
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=rustserver
Group=rustserver
WorkingDirectory=/home/rustserver/rust
ExecStart=/home/rustserver/start-rust.sh
Restart=no
TimeoutStopSec=300
UMask=0077
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target This first configuration deliberately uses Restart=no. It starts at boot once enabled, but it does not conceal a crash behind repeated restarts. We can add a reviewed restart policy after the initial tests and maintenance controls work.
Check and start it:
sudo systemd-analyze verify /etc/systemd/system/rust.service
sudo systemctl daemon-reload
sudo systemctl enable --now rust.service
sudo systemctl status rust.service --no-pager Inspect the service journal:
sudo journalctl -u rust.service -n 80 --no-pager The game writes its output to a separate timestamped file. Find the latest filename:
sudo -u rustserver ls -lt /home/rustserver/logs/ Read that file, replacing the example filename:
sudo -u rustserver tail -f /home/rustserver/logs/rust-YYYYMMDDTHHMMSSZ.log The first start creates the world. Wait for the game to report startup completion, then test player access. An active systemd status means the process is running, not that the game is ready.
Protect RCON and Required Ports
We must check three separate outcomes: players can join, the public server can be queried, and unauthorized users cannot reach administration.
Confirm What Each Port Does
These are the explicit values used in our script:
| Service | Port | Protocol | Access policy |
|---|---|---|---|
| Game traffic | 28015 | UDP | Public player access |
| Server queries | 28017 | UDP | Public queries for a public server |
| RCON | 28016 | TCP | Loopback only, reached through SSH |
| Rust+ | Disabled | TCP when enabled | Configure separately if needed |
| SSH | 22 in this example | TCP | Administrator access |
Game traffic and server queries use separate UDP ports. Opening the game port alone does not cover server-browser queries.
Check the listeners:
sudo ss -lunp
sudo ss -ltnp Find UDP ports 28015 and 28017. For RCON, expect 127.0.0.1:28016, not a wildcard or public address. If RCON is listening publicly, stop the service, correct the binding, and repeat the check before proceeding.
Connect to RCON Through an SSH Tunnel
Run this command on your own PC, not inside the server's SSH shell:
ssh -N -o ExitOnForwardFailure=yes -L 127.0.0.1:28016:127.0.0.1:28016 ADMIN_USER@SERVER_IP Replace ADMIN_USER and SERVER_IP. Add -p YOUR_SSH_PORT if SSH does not use port 22.
Keep this terminal open. It forwards your PC's local TCP port 28016 to the server's local RCON port through the encrypted SSH connection.
Use a locally running Rust WebRCON client, such as the desktop edition of Rustadmin. Configure:
| Field | Value |
|---|---|
| RCON mode | WebRCON |
| عنوان | 127.0.0.1 |
| RCON port | 28016 |
| Password | The generated RCON secret |
WebRCON 127.0.0.1 28016 Use a local client for this tunnel. A hosted administration service cannot use the loopback port on your PC. Facepunch’s WebRCON project documents the WebSocket-based administration mode.
Retrieve the secret through your trusted SSH session when configuring the client:
sudo -u rustserver cat /home/rustserver/.rcon-password Keep it out of screenshots, support posts, and shared terminal transcripts. Store it in your password manager.
In the RCON client, send:
status A useful result identifies the running server and its current state.
Now test from outside the host without the tunnel. A direct connection to SERVER_IP:28016 should fail. If it succeeds, stop and correct the listener or firewall policy. A password prompt on a public port is not the expected outcome for this setup.
Join From a Rust Client
On the player PC, open Rust, press F1, and enter:
client.connect SERVER_IP:28015 Replace SERVER_IP with the public address. Test from a different network when possible.
After joining, check the public server list separately. If direct joining works but the server is absent from the list, inspect the query port and browser filters before changing the working game-port rule.
For an initial persistence check, record a small structure’s location and your player’s state. These give us something concrete to inspect after a restart or restore.
Add an Administrator Only When Needed
RCON access and in-game administrator rights are separate. If an account needs owner permissions, use its correct SteamID64 in the RCON console:
ownerid STEAMID64 "AdminName" "Server administrator"
server.writecfg The player should reconnect before checking access. Grant owner permissions only to people who need full control. Use the current command help and inspect the saved admin configuration when changing permissions.
Troubleshoot by Symptom
| Symptom | Check first | Next action |
|---|---|---|
| SteamCMD fails to start | Exact error and installed runtime packages | Fix the named dependency before downloading again |
| Server is active but nobody can join | Game log, UDP listener, host and provider firewalls | Wait for readiness, then repeat the external join test |
| Joining works but listing does not | Query listener, UDP rule, browser filters | Correct the query path without opening broad port ranges |
| RCON fails through the tunnel | Tunnel session, loopback listener, WebRCON mode, password | Check each layer in that order |
| Process exits during world creation | Available RAM, disk space, game log, kernel log | Address the recorded failure instead of raising limits blindly |
| A new world appears unexpectedly | Identity, seed, map size, working directory | Restore the intended settings before continuing |
| Client reports a protocol mismatch | Client and server versions | Use the maintenance procedure to update the server |
For a suspected memory kill, inspect the kernel log:
sudo journalctl -k -b --no-pager | grep -Ei 'out of memory|oom|killed process' A local socket check does not prove remote access. Also, a successful TCP port test cannot prove that Rust’s UDP player traffic works.
Enable Rust+ Only If You Need It
Rust+ uses a separate companion service. To add it later, replace the disabling argument in the
startup script with an explicit setting such as +app.port 28082,
permit TCP 28082 through the relevant firewalls, and restart during maintenance.
Use app.info through RCON to inspect the actual configuration, then pair the app and test it. Keep companion.id with the server’s backups and do not use the same identity on two live companion servers.
Schedule Saves, Wipes, and Backups
A save, restart, update, and wipe have different effects. Keep them separate in both the operating procedure and the player announcement.
| Operation | Purpose | Data expectation |
|---|---|---|
| Save | Write current state to disk | Retain current world progress |
| Restart | Stop and start the same instance | Load compatible saved data with the same configuration |
| Update | Install newer server software | Check release and save compatibility |
| Map wipe | Start a fresh world | Remove world progress intentionally |
| Blueprint wipe | Reset learned blueprints | Separate from a map-only wipe |
| Restore | Recover a saved copy | Return to the backup’s state where compatible |
Stop the Server Before Copying Its Data
For planned maintenance, tell players when the server will stop. In RCON, send:
server.save Wait for evidence that the save completed in the game log. Then send:
quit The RCON connection should close as the server exits. In the administrator shell, check:
sudo systemctl status rust.service --no-pager
sudo pgrep -u rustserver -x RustDedicated Do not copy a live world directory. Continue only after the game process has exited. Then clear the service’s running state if needed:
sudo systemctl stop rust.service If the process does not exit, inspect the log before forcing it down. A systemd stop timeout can end with a forced kill, so the five-minute timeout in our unit does not guarantee a completed save.
Back Up the World and Its Operating Files
Rust stores more than one save file. The identity directory can contain player databases, database journal files, settings, and other state. Copy the whole stopped identity directory instead of selecting a few familiar filenames.
This example also preserves our launch script, secret, and service unit. Run it in the administrator’s Bash shell after the stop checks:
sudo install -d -m 700 /var/backups/rust
backup_stamp=$(date -u +%Y%m%dT%H%M%SZ)
backup_path="/var/backups/rust/rust-${backup_stamp}.tar.gz"
sudo tar -czf "$backup_path" -C / home/rustserver/rust/server/atal-rust-01 home/rustserver/start-rust.sh home/rustserver/.rcon-password etc/systemd/system/rust.service
sudo chmod 600 "$backup_path"
sudo tar -tzf "$backup_path"
sudo sha256sum "$backup_path" Require a successful archive operation and inspect the file list. Save the checksum with the backup record. A checksum helps detect a changed transfer; it does not prove that the game can load the archive’s contents.
Record the Rust build, OS version, map settings, backup time, and result in your maintenance log.
Use version through RCON before shutdown to capture the game
version.
Restart after the backup:
sudo systemctl start rust.service Watch the new log and repeat the join check.
Keep a Copy Away From the Game Host
A backup on the same disk does not protect against losing that disk or server. Transfer it to a separate machine or backup destination.
For a one-off download, stage the selected archive for your administrator account:
sudo install -o "$(id -un)" -g "$(id -gn)" -m 600 "$backup_path" "$HOME/rust-backup-transfer.tar.gz" Then run on your PC:
scp ADMIN_USER@SERVER_IP:rust-backup-transfer.tar.gz . Use uppercase -P YOUR_SSH_PORT with scp if needed. Compare the downloaded checksum with the recorded value. Remove the staged transfer copy after confirming the download, while retaining the intended backups.
The archive contains an administration secret. Use encrypted backup storage and restrict access to it.
Set a backup schedule that matches how much progress the community can afford to lose. For example, a daily backup alone can leave nearly a day of progress at risk. Keep separate copies before updates and planned wipes. Only automate this process after its save, stop, archive, transfer, and restore steps work manually.
Update Rust Without Mixing It With Startup
Use a maintenance window for updates. Follow the save, shutdown, backup, and off-host copy steps first.
With the process stopped, run:
sudo -iu rustserver /home/rustserver/steamcmd/steamcmd.sh +force_install_dir /home/rustserver/rust +login anonymous +app_update 258550 +quit If the update fails, investigate before restarting. After a successful update:
sudo systemctl start rust.service
sudo systemctl status rust.service --no-pager Check the new game log, join from an updated client, and inspect the saved world. Keep a record of both the old and new builds.
Do not put an unreviewed update command into every process restart. That combines crash recovery with a software change and makes failures harder to trace.
If we add Oxide or another mod framework later, check its own release and compatibility instructions before each update. Get the vanilla setup working first.
Restore a Backup Without Overwriting the Original State
Start with an isolated restore rehearsal on a separate host where possible. Use a compatible server build, block public player access, and keep Rust+ disabled while testing the copy.
Extract a trusted archive into a staging directory first:
sudo install -d -m 700 /var/tmp/rust-restore
sudo tar -xzf /path/to/rust-backup.tar.gz -C /var/tmp/rust-restore
sudo ls -la /var/tmp/rust-restore/home/rustserver/rust/server/atal-rust-01 Inspect the files before using them. Do not extract an unknown archive as root.
For recovery on the original host, stop the game with the earlier procedure. Keep the existing identity directory, then place the recovered copy at the expected path:
restore_stamp=$(date -u +%Y%m%dT%H%M%SZ)
sudo mv /home/rustserver/rust/server/atal-rust-01 "/home/rustserver/rust/server/atal-rust-01-before-restore-${restore_stamp}"
sudo cp -a /var/tmp/rust-restore/home/rustserver/rust/server/atal-rust-01 /home/rustserver/rust/server/
sudo chown -R rustserver:rustserver /home/rustserver/rust/server/atal-rust-01 Compare the archived startup script and service unit with the current copies. Restore matching settings where needed, but do not blindly overwrite host-specific paths or network choices.
Start the service and join. Check the recorded structure, player state, configuration, and server identity. Keep the pre-restore directory until the recovered world passes these checks.
A newer game release can require a save format that an older backup does not provide. Do not rename an old save to bypass a forced wipe. Facepunch warns against this approach. Recovery must account for both the data and the server/client versions.
Check Boot Recovery and Plan Wipes Separately
After a clean save and shutdown on the test host, reboot it:
sudo reboot Reconnect over SSH and check:
sudo systemctl is-enabled rust.service
sudo systemctl status rust.service --no-pager The service should start because it was enabled earlier. Join again and inspect the same world marker. This proves boot startup only after we observe it; it does not prove crash recovery or safe forced shutdown.
For wipes, announce the scope and keep a backup first. A map wipe does not automatically mean a blueprint wipe. Use the current release notes and the actual file layout before removing anything. Do not run broad deletion commands or schedule destructive wipes from an assumed update time.
Complete the Server Handoff
Before inviting the wider community, confirm:
Once those checks pass, review CPU, memory, storage, and player-region requirements before growing the server. We can help assess a dedicated game server configuration using your target population, map size, plugin plans, and recovery needs. Confirm the selected hardware and service terms before ordering.
الأسئلة الشائعة
Can We Host a Rust Dedicated Server on Linux?
Yes. Rust provides a Linux dedicated-server application. This guide uses Ubuntu and SteamCMD to install it. Hosting the server is a different task from running the Rust player client on Linux.
Do We Need to Buy Rust to Install the Server?
The dedicated-server download accepts an anonymous SteamCMD login. A player still needs a Steam account with Rust to join and play. Hosting access and player licensing are separate.
Does a Rust Dedicated Server Need a GPU?
The setup here runs without a graphical interface. We do not use a display GPU for the server process. Focus the host assessment on CPU performance, available memory, storage, and the network route to players.
Where Is server.cfg on Linux?
In this setup, it is /home/rustserver/rust/server/atal-rust-01/cfg/server.cfg.
If we choose another installation directory or identity, the path changes. Check the
startup script before editing a configuration file.
Does Restarting a Rust Server Wipe the World?
A normal restart should reload compatible saved data when the identity and world settings remain the same. An intentional wipe, changed map settings, missing files, or a release that requires a new save can produce a different outcome.
Can We Use a VPS Instead of a Dedicated Server?
Yes, if its CPU allocation, available memory, storage, and network meet the workload. Test during active play. A dedicated machine can offer more control over host resources, but the product label alone does not establish Rust player capacity. Smaller communities may start on a الخادم الافتراضي الخاص before migrating to dedicated hardware.
Can We Install Plugins Later?
Yes. Complete the vanilla join, backup, and restore checks first. Then add one supported framework and a small set of plugins. Keep a backup and assess compatibility after each game update rather than changing the game and many plugins at once.
Deploy Your Rust Server on Bare Metal
Experience zero virtualization lag, high single-core CPU clock speeds, NVMe raid performance, and DDoS mitigation designed specifically for gaming traffic.
