How to Create Your Own Rust Server
This guide explains how to install and configure a dedicated Rust server on your VPS or dedicated Linux server, with the option of adding plugins thanks to Oxide (uMod).
Order a Server
To host your Rust server, HostMyServers offers several gaming-oriented options. Rust is very demanding: favor a fast processor and plenty of RAM (8 GB minimum, more for a public server).
- Performance VPS - Dedicated resources and fast processors, ideal for Rust
- NVMe VPS - For a small server or a test server
- Eco Dedicated Servers - For servers with many players
- Performance Dedicated Servers - Maximum performance
Prerequisites
The resources listed below correspond to the server's requirements and do not take into account the resources already used by the operating system, installed software or other services present on the machine. Allow 200 Mbps for 100 players at tickrate 30 (community estimate). The required configuration is based on a vanilla server (without extensions or plugins).
- SSH access as root or user with sudo privileges
- 64-bit Linux system (Debian 12/13 or Ubuntu 22.04/24.04 recommended)
- Active firewall: nftables (recommended), iptables or ufw (use only one firewall tool at a time)
- Minimum 8 GB of RAM (32 GB recommended)
- About 20 GB of free disk space (NVMe SSD recommended)
- Ports 28015 UDP, 28017 UDP and 28082 TCP accessible, and port 28016 TCP (RCON) accessible from your fixed IP address only
Required Configuration
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 8 GB | 32 GB and more |
| CPU | 2 cores | 4 cores or more, high frequency |
| Storage | 20 GB SSD | 40 GB NVMe SSD |
| Network | 300 Mbps | 1 Gbps |
Rust's engine mainly depends on single-core performance: a high-frequency processor is more important than a large number of cores.
System Update
sudo apt update && sudo apt upgrade -y
Installing Dependencies
Install the required packages:
sudo apt install -y wget tar unzip screen lib32gcc-s1
Creating a Dedicated User
For security reasons, create a dedicated user:
sudo adduser --disabled-password --gecos "" rust
Ports Used
| Port | Protocol | Usage |
|---|---|---|
| 28015 | UDP | Game |
| 28017 | UDP | Queries (server list) |
| 28016 | TCP | RCON (remote administration), restrict to your IP addresses |
| 28082 | TCP | Rust+ (mobile app) |
Firewall Configuration
Open the required ports. The RCON port (28016 TCP) must be restricted to your fixed IP address: replace YOUR_IP.
With UFW
sudo ufw allow 28015/udp
sudo ufw allow 28017/udp
sudo ufw allow from YOUR_IP to any port 28016 proto tcp
sudo ufw allow 28082/tcp
sudo ufw reload
With iptables
sudo iptables -A INPUT -p udp --dport 28015 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 28017 -j ACCEPT
sudo iptables -A INPUT -p tcp -s YOUR_IP --dport 28016 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 28082 -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4
Saving the rules across reboots requires the iptables-persistent package.
With nftables
These commands use the inet filter table and the input chain, present by default in /etc/nftables.conf on Debian.
sudo nft add rule inet filter input udp dport 28015 accept
sudo nft add rule inet filter input udp dport 28017 accept
sudo nft add rule inet filter input ip saddr YOUR_IP tcp dport 28016 accept
sudo nft add rule inet filter input tcp dport 28082 accept
(echo "flush ruleset"; sudo nft list ruleset) | sudo tee /etc/nftables.conf
The RCON port (28016) allows administering the server: never open it to everyone. Without a fixed IP address, do not open this port and use an SSH tunnel instead.
Installing SteamCMD
Log in as the rust user:
sudo -u rust bash
cd ~
Create the directories and download SteamCMD:
mkdir -p ~/steamcmd ~/rust-server
cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzf steamcmd_linux.tar.gz
Downloading the Rust Server
Start the server installation (application ID 258550):
./steamcmd.sh +force_install_dir /home/rust/rust-server +login anonymous +app_update 258550 validate +quit
If the installation stops with an error, simply run the same command again: SteamCMD resumes where it left off.
When it finishes, the message Success! App '258550' fully installed. is displayed.
Launch Script
The launch script depends on the map type. Choose one of the two versions below.
Generated Map (default)
Create the launch script:
nano ~/rust-server/start.sh
#!/bin/bash
cd /home/rust/rust-server
export LD_LIBRARY_PATH="/home/rust/rust-server/RustDedicated_Data/Plugins/x86_64:$LD_LIBRARY_PATH"
exec ./RustDedicated -batchmode \
+server.ip 0.0.0.0 \
+server.port 28015 \
+server.queryport 28017 \
+server.identity "server1" \
+server.level "Procedural Map" \
+server.seed 12345 \
+server.worldsize 3500 \
+server.maxplayers 100 \
+server.hostname "My Rust Server" \
+server.description "Welcome to my Rust server" \
+server.saveinterval 300 \
+rcon.port 28016 \
+rcon.password "ChangeMe" \
+rcon.web 1 \
+app.port 28082
Custom Map
To use a custom map hosted online, replace the map generation parameters with +server.levelurl:
nano ~/rust-server/start.sh
#!/bin/bash
cd /home/rust/rust-server
export LD_LIBRARY_PATH="/home/rust/rust-server/RustDedicated_Data/Plugins/x86_64:$LD_LIBRARY_PATH"
exec ./RustDedicated -batchmode \
+server.ip 0.0.0.0 \
+server.port 28015 \
+server.queryport 28017 \
+server.identity "server1" \
+server.levelurl "https://your_domain.com/my_map.map" \
+server.maxplayers 100 \
+server.hostname "My Rust Server" \
+server.description "Welcome to my Rust server" \
+server.saveinterval 300 \
+rcon.port 28016 \
+rcon.password "ChangeMe" \
+rcon.web 1 \
+app.port 28082
Making the Script Executable
Whichever version you chose, make the script executable:
chmod +x ~/rust-server/start.sh
Choose a long and unique rcon.password. Anyone who knows it can administer your server.
Main Parameters
| Parameter | Description |
|---|---|
server.identity | Name of the server's save folder (inside server/) |
server.level | Map type (Procedural Map for a generated map) |
server.seed | Map generation seed |
server.worldsize | Map size (from 1000 to 6000) |
server.levelurl | Download address of a custom map (if set, server.worldsize and server.seed must be removed) |
server.maxplayers | Maximum number of players |
server.hostname | Public name of the server |
server.description | Description displayed in the server list |
server.saveinterval | Automatic save interval (seconds) |
rcon.port | RCON port |
rcon.password | RCON password |
rcon.web | 1 = WebSocket RCON (used by administration tools) |
app.port | Rust+ port |
On first startup, map generation takes several minutes. The server is ready when the logs display Server startup complete.
First Launch
~/rust-server/start.sh
To stop the server, use Ctrl+C or the quit command from RCON.
Installing Oxide (uMod)
Oxide lets you add plugins to your server. Stop the server, then:
cd ~/rust-server
wget https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip
unzip -o Oxide.Rust-linux.zip
At the next startup, the oxide/ folder is created. Plugins go in oxide/plugins/.
Every Rust update overwrites Oxide's files. After each server update, reinstall Oxide with the unzip -o command above.