Rust Game Server Instalaation on Linux
Rust is a multiplayer survival game that requires careful server configuration and plugin management. Esta guía cubre complete Rust server installation using SteamCMD, configuration through server.cfg, plugin management using Oxide/uMod, RCON console access, and automated world wipe scheduling. Rust servers demand significant CPU and I/O rendimiento for optimal gameplay experience.
Tabla de contenidos
- System Requirements
- Instalaing SteamCMD and Rust Server
- Server Configuration
- Oxide Mod Framework Instalaation
- Plugin Management
- RCON Console Access
- World Wipe Scheduling
- Port Configuration
- Running with Systemd
- Performance Optimization
- [Backup and Recovery](#copia de seguridad-and-recuperación)
- Monitoring
- Conclusion
Requisitos del sistema
Rust is resource-intensive and requires:
- Ubuntu 20.04 LTS or CentOS 7+
- 8GB RAM minimum (16GB recommended)
- 50GB+ disk space (SSDs strongly recommended)
- 4+ CPU cores
- Stable, high-bandwidth internet connection
- Root or sudo access
A single Rust server can serve 100-500 players depending on map size and plugin load.
Instalaing SteamCMD and Rust Server
Instala system dependencies:
sudo apt-get update
sudo apt-get install -y curl wget file bzip2 gzip unzip python3 util-linux ca-certificates binutils lib32gcc1 lib32stdc++6 screen
Create dedicated steam user:
sudo useradd -m -s /bin/bash steam
sudo -u steam mkdir -p /home/steam/steamcmd
Instala SteamCMD:
cd /home/steam/steamcmd
sudo -u steam curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | sudo -u steam tar zxvf -
Verifica SteamCMD:
sudo -u steam /home/steam/steamcmd/steamcmd.sh +quit
Create Rust server directory:
sudo -u steam mkdir -p /home/steam/rust
Instala Rust servidor dedicado (app ID 258550). This may take 15+ minutes:
sudo -u steam /home/steam/steamcmd/steamcmd.sh \
+force_install_dir /home/steam/rust \
+login anonymous \
+app_update 258550 \
+quit
Verifica la instalación:
ls -la /home/steam/rust/
file /home/steam/rust/RustDedicated
Create necessary directories:
sudo -u steam mkdir -p /home/steam/rust-data/{server,saves,logs}
sudo -u steam mkdir -p /home/steam/rust/oxide/plugins
Server Configuration
Rust uses server.cfg in the server directory. Crea el main configuration:
sudo tee /home/steam/rust/server.cfg > /dev/null <<'EOF'
// ============================================================================
// RUST DEDICATED SERVER CONFIGURATION
// ============================================================================
// Server Identity
server.hostname "My Rust Server"
server.description "Survival multiplayer server"
server.url "https://myserver.com"
server.headerimage "https://myserver.com/header.jpg"
server.worldsize 4000
server.seed 12345
// Server Password (leave empty for public)
server.password ""
rcon.password "ChangeMe_RconPassword"
server.tickrate 30
// Map & World
server.maxplayers 100
server.level "Procedural Map"
server.official false
// Network Settings
server.port 28015
server.queryport 28016
// AI and Creatures
server.pve false
server.radiation true
// Saving
server.saveinterval 60
server.globalchat true
// Kits & Rewards
kits.enabled true
// Decay and Upkeep
decay.scale 1.0
decay.delay_initial 300
// PvP Settings
pvp.enabled true
sleepers true
sleeperrespawn 60
sleeperdespawn 300
// Economy
server.economymode 1
// Admin Configuration
server.adminlog true
server.adminlogsize 256
// Development
server.strict false
developer 0
// Rust+ Companion App
companionapp.enabled true
companionapp.port 8080
// FPS Booster (optional)
fps.limit 100
EOF
sudo chown steam:steam /home/steam/rust/server.cfg
Create startup script:
sudo tee /home/steam/rust/start_server.sh > /dev/null <<'EOF'
#!/bin/bash
RUST_DIR="/home/steam/rust"
DATA_DIR="/home/steam/rust-data"
SERVER_NAME="${SERVER_NAME:-My Rust Server}"
WORLD_SIZE="${WORLD_SIZE:-4000}"
MAX_PLAYERS="${MAX_PLAYERS:-100}"
SERVER_PORT="${SERVER_PORT:-28015}"
SEED="${SEED:-12345}"
cd "$RUST_DIR"
mkdir -p "$DATA_DIR/server"
mkdir -p "$DATA_DIR/logs"
exec "$RUST_DIR/RustDedicated" \
-batchmode \
-nographics \
-tickrate 30 \
-logfile "$DATA_DIR/logs/rust_$(date +%Y%m%d).log" \
server.hostname "$SERVER_NAME" \
server.maxplayers "$MAX_PLAYERS" \
server.worldsize "$WORLD_SIZE" \
server.seed "$SEED" \
server.port "$SERVER_PORT" \
server.identity "server1" \
server.saveinterval 60 \
rcon.password "$(cat /home/steam/rust-data/rcon_password)" \
2>&1
EOF
sudo chmod +x /home/steam/rust/start_server.sh
sudo chown steam:steam /home/steam/rust/start_server.sh
Store RCON password securely:
sudo -u steam bash -c 'echo "SecureRconPassword123" > /home/steam/rust-data/rcon_password'
sudo -u steam chmod 600 /home/steam/rust-data/rcon_password
Oxide Mod Framework Instalaation
Oxide (formerly uMod) adds plugin support to Rust servers. Instala el framework:
cd /home/steam/rust
OXIDE_VERSION="2.0.5111"
sudo -u steam wget "https://github.com/OxideMod/Oxide.Rust/releases/download/${OXIDE_VERSION}/OxideMod-Rust.zip"
Extrae and verify:
sudo -u steam unzip -o OxideMod-Rust.zip
ls -la /home/steam/rust/oxide/
ls -la /home/steam/rust/oxide/plugins/
Oxide is now ready for plugin installation.
Plugin Management
Descarga and install popular Rust plugins:
cd /home/steam/rust/oxide/plugins
# Admin tools plugin
sudo -u steam wget https://github.com/OxideMod/Oxide.Plugins/raw/master/rust/AdminLogging.cs
sudo -u steam wget https://github.com/OxideMod/Oxide.Plugins/raw/master/rust/BetterChat.cs
# Useful server plugins
sudo -u steam wget https://github.com/OxideMod/Oxide.Plugins/raw/master/rust/ServerGather.cs
sudo -u steam wget https://github.com/OxideMod/Oxide.Plugins/raw/master/rust/NoFall.cs
sudo -u steam wget https://github.com/OxideMod/Oxide.Plugins/raw/master/rust/PlayTime.cs
Create plugin configuration file:
sudo tee /home/steam/rust/oxide/config/YourPluginName.json > /dev/null <<'EOF'
{
"plugin_name": "Your Plugin",
"enabled": true,
"settings": {
"option1": "value1",
"option2": true
}
}
EOF
sudo chown steam:steam /home/steam/rust/oxide/config/YourPluginName.json
Manage plugins via RCON console (see RCON section).
RCON Console Access
Configura RCON for remote server management:
# Create RCON client script
sudo tee /home/steam/send_rcon.sh > /dev/null <<'EOF'
#!/bin/bash
RCON_ADDRESS="127.0.0.1"
RCON_PORT="28016"
RCON_PASSWORD="SecureRconPassword123"
COMMAND="$@"
# Using mcrcon or similar tool
python3 /home/steam/rcon_client.py "$RCON_ADDRESS" "$RCON_PORT" "$RCON_PASSWORD" "$COMMAND"
EOF
sudo chmod +x /home/steam/send_rcon.sh
Create Python RCON client:
sudo tee /home/steam/rcon_client.py > /dev/null <<'EOF'
#!/usr/bin/env python3
import socket
import struct
import sys
def send_rcon(host, port, password, command):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.connect((host, int(port)))
# Build RCON packet
msg = bytes([0xFF, 0xFF, 0xFF, 0xFF]) + b'rcon "' + password.encode() + b'" ' + command.encode()
sock.send(msg)
# Receive response
try:
response = sock.recv(4096)
print(response.decode('utf-8', errors='ignore'))
except:
pass
finally:
sock.close()
if __name__ == "__main__":
if len(sys.argv) < 4:
print("Usage: rcon_client.py <host> <port> <password> <command>")
sys.exit(1)
send_rcon(sys.argv[1], sys.argv[2], sys.argv[3], ' '.join(sys.argv[4:]))
EOF
sudo chmod +x /home/steam/rcon_client.py
sudo chown steam:steam /home/steam/rcon_client.py
Common RCON commands:
# Player management
say "Message to all players"
kick username reason
ban steamid reason
unban steamid
banlist
# Server control
quit
restart 60
wipe
wipeall
oxide.reload PluginName
# Info and status
status
players
plugins.show
# Teleport
teleport playername x y z
# Spawn items
inventory.giveid steamid itemid amount
Example RCON usage:
/home/steam/send_rcon.sh "say Server will restart in 5 minutes"
/home/steam/send_rcon.sh "kick Cheater Suspected cheating"
/home/steam/send_rcon.sh "plugins.show"
World Wipe Scheduling
Rust servers typically wipe (reset) on a monthly schedule. Crea unutomated wipe script:
sudo tee /home/steam/wipe_world.sh > /dev/null <<'EOF'
#!/bin/bash
RUST_DIR="/home/steam/rust"
DATA_DIR="/home/steam/rust-data"
BACKUP_DIR="$DATA_DIR/backups"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
# Backup before wipe
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/rust_pre_wipe_${TIMESTAMP}.tar.gz" \
-C "$DATA_DIR" server/ \
2>/dev/null
if [ $? -eq 0 ]; then
echo "[$(date)] World backup created"
fi
# Send warning messages to players
/home/steam/send_rcon.sh "say ANNOUNCEMENT: Server will wipe in 30 minutes"
sleep 1500
/home/steam/send_rcon.sh "say WARNING: Server restarting in 10 minutes for wipe"
sleep 300
/home/steam/send_rcon.sh "say Server restarting in 5 minutes!"
sleep 300
# Stop server
sudo systemctl stop rust.service
sleep 10
# Wipe world
rm -rf "$RUST_DIR/server/server1/"* 2>/dev/null
mkdir -p "$RUST_DIR/server/server1"
# Restart server
sudo systemctl start rust.service
echo "[$(date)] World wipe completed successfully"
EOF
sudo chmod +x /home/steam/wipe_world.sh
sudo chown steam:steam /home/steam/wipe_world.sh
Schedule monthly wipe at a specific time:
# Edit crontab
sudo tee -a /var/spool/cron/crontabs/steam > /dev/null <<'EOF'
# Wipe first Sunday of month at 6 AM UTC
0 6 1-7 * 0 /home/steam/wipe_world.sh >> /home/steam/rust-data/logs/wipe.log 2>&1
EOF
sudo systemctl restart cron
Configuración de puertos
Rust uses specific UDP ports:
# Game server port (UDP)
PORT=28015
# Query port (UDP) - used for server list
QUERY_PORT=28016
# Configure UFW
sudo ufw allow 28015/udp
sudo ufw allow 28016/udp
sudo ufw allow 8080/tcp # Companion app
# For iptables
sudo iptables -A INPUT -p udp --dport 28015 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 28016 -j ACCEPT
sudo iptables-A INPUT -p tcp --dport 8080 -j ACCEPT
# Verify
sudo ufw status numbered
sudo netstat -ulnp | grep -E "28015|28016"
Ejecución con Systemd
Create servicio systemd:
sudo tee /etc/systemd/system/rust.service > /dev/null <<'EOF'
[Unit]
Description=Rust Dedicated Server
After=network.target
Wants=network-online.target
[Service]
Type=simple
User=steam
Group=steam
WorkingDirectory=/home/steam/rust
EnvironmentFile=/home/steam/rust/server.env
ExecStart=/home/steam/rust/start_server.sh
Restart=on-failure
RestartSec=30
StandardOutput=journal
StandardError=journal
# Resource limits
LimitNOFILE=65536
LimitNPROC=32768
MemoryMax=20G
# Security
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/home/steam/rust-data
[Install]
WantedBy=multi-user.target
EOF
Create environment file:
sudo tee /home/steam/rust/server.env > /dev/null <<'EOF'
SERVER_NAME=My Rust Server
WORLD_SIZE=4000
MAX_PLAYERS=100
SERVER_PORT=28015
SEED=12345
EOF
sudo chown steam:steam /home/steam/rust/server.env
sudo chmod 600 /home/steam/rust/server.env
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable rust.service
sudo systemctl start rust.service
sudo systemctl status rust.service
Monitor logs:
sudo journalctl -u rust.service -f
tail -f /home/steam/rust-data/logs/rust_$(date +%Y%m%d).log
Optimización del rendimiento
Optimize system for Rust server rendimiento:
# Increase file limits
sudo sysctl -w fs.file-max=2097152
echo "fs.file-max=2097152" | sudo tee -a /etc/sysctl.conf
# Network optimization
sudo sysctl -w net.core.rmem_max=134217728
sudo sysctl -w net.core.wmem_max=134217728
sudo sysctl -w net.ipv4.tcp_rmem="4096 87380 134217728"
sudo sysctl -w net.ipv4.tcp_wmem="4096 65536 134217728"
# UDP optimization
sudo sysctl -w net.core.rmem_default=131072
sudo sysctl -w net.core.wmem_default=131072
Monitor rendimiento:
# CPU and memory
watch -n 1 'ps aux | grep RustDedicated | grep -v grep'
htop -p $(pgrep -f RustDedicated)
# I/O statistics
iostat -x 1
# Network performance
nethogs
iftop -i eth0
# Process details
ps -o pid,vsz,rss,pcpu,pmem,comm $(pgrep -f RustDedicated)
Enable CPU affinity:
# Get PID and pin to cores 0-7
PID=$(pgrep -f RustDedicated)
taskset -p -c 0-7 $PID
Copia de seguridad y recuperación
Crea unutomated copia de seguridad script:
sudo tee /home/steam/backup_rust.sh > /dev/null <<'EOF'
#!/bin/bash
DATA_DIR="/home/steam/rust-data"
BACKUP_DIR="$DATA_DIR/backups"
RETENTION_DAYS=30
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
mkdir -p "$BACKUP_DIR"
# Backup world and player data
tar -czf "$BACKUP_DIR/rust_backup_${TIMESTAMP}.tar.gz" \
-C "$DATA_DIR" server/ \
2>/dev/null
if [ $? -eq 0 ]; then
echo "[$(date)] Backup created: rust_backup_${TIMESTAMP}.tar.gz"
else
echo "[$(date)] Backup failed!" >&2
exit 1
fi
# Cleanup old backups
find "$BACKUP_DIR" -name "rust_backup_*.tar.gz" -mtime +${RETENTION_DAYS} -delete
echo "[$(date)] Old backups cleaned (retention: ${RETENTION_DAYS} days)"
EOF
sudo chmod +x /home/steam/backup_rust.sh
sudo chown steam:steam /home/steam/backup_rust.sh
Add to crontab:
sudo tee -a /var/spool/cron/crontabs/steam > /dev/null <<'EOF'
0 1 * * * /home/steam/backup_rust.sh >> /home/steam/rust-data/logs/backup.log 2>&1
EOF
Restore copia de seguridad:
sudo systemctl stop rust.service
BACKUP="/home/steam/rust-data/backups/rust_backup_20240101_010000.tar.gz"
sudo -u steam tar -xzf "$BACKUP" -C /home/steam/rust-data/
sudo systemctl start rust.service
Supervisión
Create monitoreo script:
sudo tee /home/steam/monitor_rust.sh > /dev/null <<'EOF'
#!/bin/bash
echo "=== Rust Server Status ==="
echo ""
# Process check
if pgrep -f RustDedicated > /dev/null; then
echo "✓ Rust server is running"
MEM=$(ps aux | grep RustDedicated | grep -v grep | awk '{print $6}')
echo "Memory: ${MEM}KB"
CPU=$(ps aux | grep RustDedicated | grep -v grep | awk '{print $3}')
echo "CPU: ${CPU}%"
else
echo "✗ Rust server is NOT running"
fi
# Port check
echo ""
if ss -ulnp | grep -q 28015; then
echo "✓ Game port 28015 listening"
else
echo "✗ Game port not listening"
fi
# Disk usage
echo ""
USAGE=$(df -h /home/steam/rust-data | awk 'NR==2 {print $5}')
echo "Disk usage: $USAGE"
# Recent errors
echo ""
ERRORS=$(tail -20 /home/steam/rust-data/logs/rust_*.log 2>/dev/null | grep -i "error\|exception" | wc -l)
echo "Recent errors: $ERRORS"
EOF
sudo chmod +x /home/steam/monitor_rust.sh
Conclusión
Your Rust servidor dedicado is now fully configured with Oxide plugins, RCON console access, and automated wipe scheduling. Rust servers provide exciting survival multiplayer experiences with proper administration and community management.
Key takeaways:
- Rust servers require significant resources - monitor closely
- Configura RCON for secure remote administration
- Implement regular copia de seguridads before major changes
- Plan monthly world wipes in advance
- Use plugins carefully to enhance gameplay without overwhelming the server
- Monitor rendimiento metrics regularly
- Keep the server updated with latest Rust builds
A well-managed Rust server can support hundreds of players across months of continuous gameplay and community building.


