Logo

Rust Server Installation Guide on Linux VPS

Rust Server Installation Guide on Linux VPS

Complete guide to install and configure a dedicated Rust server on Linux VPS (Ubuntu/Debian). This detailed tutorial covers SteamCMD installation, game settings configuration, uMod/Oxide installation with plugins, RCON management, regular wipes, and systemd service for automatic startup. Also includes automatic backups, performance monitoring, multi-server management, troubleshooting, and optimization for an optimal and professional survival experience.

Rust Server Installation Guide on Linux VPS

Introduction

Rust is a popular multiplayer survival game that allows you to create custom dedicated servers. This guide walks you through the complete installation of a Rust server on a Linux VPS (Ubuntu/Debian).

Prerequisites

Before starting the installation, ensure your VPS has:

  • Ubuntu 20.04/22.04 LTS or Debian 11/12
  • At least 8 GB of RAM (16 GB recommended for 100+ players)
  • 25 GB of available disk space (40 GB recommended)
  • Processor with at least 2 cores (4 cores recommended)
  • Stable Internet connection with sufficient bandwidth
  • Root or sudo access
  • Static public IP address

Step 1: System Update

Connect to your VPS via SSH and update the system:

sudo apt update && sudo apt upgrade -y

Reboot the server if necessary:

sudo reboot

Step 2: Installing Dependencies

Install the necessary packages:

sudo apt install -y lib32gcc-s1 lib32stdc++6 curl wget tar screen htop net-tools

For 64-bit systems, install 32-bit libraries:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y libc6:i386 libstdc++6:i386

Step 3: Creating the Rust User

For security reasons, create a dedicated user for the Rust server:

sudo adduser --disabled-login --no-create-home rustserver

Create the server directory:

sudo mkdir -p /home/rustserver
sudo chown rustserver:rustserver /home/rustserver

Step 4: Installing SteamCMD

SteamCMD Installation

  1. Create a directory for SteamCMD:
sudo mkdir -p /home/rustserver/steamcmd
cd /home/rustserver/steamcmd
  1. Download SteamCMD:
sudo wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
  1. Extract the archive:
sudo tar -xvzf steamcmd_linux.tar.gz
  1. Remove the archive:
sudo rm steamcmd_linux.tar.gz
  1. Change permissions:
sudo chown -R rustserver:rustserver /home/rustserver

Step 5: Installing Rust Server

Downloading Files via SteamCMD

  1. Create an installation script:
sudo nano /home/rustserver/install_rust.sh
  1. Add the following content:
#!/bin/bash
cd /home/rustserver/steamcmd
./steamcmd.sh +force_install_dir /home/rustserver/rust-server +login anonymous +app_update 258550 +quit
  1. Make the script executable:
sudo chmod +x /home/rustserver/install_rust.sh
sudo chown rustserver:rustserver /home/rustserver/install_rust.sh
  1. Run the installation script:
sudo -u rustserver /home/rustserver/install_rust.sh

The download may take time (approximately 15-20 GB). Wait for the message "Success! App '258550' fully installed" to appear.

Step 6: Server Configuration

Creating the Startup Script

  1. Create a startup script:
sudo nano /home/rustserver/start_rust.sh
  1. Add the following content (customize according to your needs):
#!/bin/bash

# Configuration variables
IDENTITY="my-rust-server"
HOSTNAME="My Rust Server"
MAXPLAYERS=100
WORLDSIZE=4000
SEED=12345
SAVEINTERVAL=300
RCONPORT=28016
RCONPASSWORD="rconpassword"
SERVERPORT=28015
DESCRIPTION="Welcome to my Rust server!"
URL="https://mywebsite.com"

# Server startup
cd /home/rustserver/rust-server

./RustDedicated -batchmode \
    -nographics \
    +server.ip 0.0.0.0 \
    +server.port ${SERVERPORT} \
    +server.maxplayers ${MAXPLAYERS} \
    +server.hostname "${HOSTNAME}" \
    +server.identity "${IDENTITY}" \
    +server.level "Procedural Map" \
    +server.worldsize ${WORLDSIZE} \
    +server.seed ${SEED} \
    +server.saveinterval ${SAVEINTERVAL} \
    +server.description "${DESCRIPTION}" \
    +server.url "${URL}" \
    +rcon.ip 0.0.0.0 \
    +rcon.port ${RCONPORT} \
    +rcon.password "${RCONPASSWORD}" \
    +rcon.web 1
  1. Make the script executable:
sudo chmod +x /home/rustserver/start_rust.sh
sudo chown rustserver:rustserver /home/rustserver/start_rust.sh

Important Parameter Explanations

  • server.hostname: Server name visible in the list
  • server.identity: Unique name for save files
  • server.maxplayers: Maximum number of players (50-150 recommended)
  • server.worldsize: Map size (3000-6000, default 4000)
  • server.seed: Seed to generate the map (same seed = same map)
  • server.saveinterval: Save interval in seconds
  • server.level: Map type ("Procedural Map" for generated, or custom map name)
  • rcon.password: Password for remote administration
  • rcon.port: RCON port (default 28016)

Useful Additional Parameters

You can add these parameters to the startup script:

+server.headerimage "HEADER_IMAGE_URL" \
+server.logoimage "LOGO_IMAGE_URL" \
+decay.scale 1.0 \
+pve.enabled false \
+server.radiation false \
+server.stability true \
+server.events true

Step 7: Firewall Configuration

Open the necessary ports for Rust:

# Main game port
sudo ufw allow 28015/tcp
sudo ufw allow 28015/udp

# RCON port
sudo ufw allow 28016/tcp

# Query port (optional)
sudo ufw allow 28017/tcp

# Enable firewall if not already done
sudo ufw enable

Check firewall status:

sudo ufw status

Step 8: Creating a Systemd Service

To manage the server as a system service:

  1. Create a service file:
sudo nano /etc/systemd/system/rust-server.service
  1. Add the following content:
[Unit]
Description=Rust Dedicated Server
After=network.target

[Service]
Type=simple
User=rustserver
WorkingDirectory=/home/rustserver/rust-server
ExecStart=/home/rustserver/start_rust.sh
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
  1. Reload systemd:
sudo systemctl daemon-reload
  1. Enable the service at startup:
sudo systemctl enable rust-server
  1. Start the server:
sudo systemctl start rust-server
  1. Check server status:
sudo systemctl status rust-server

Step 9: Server Management

Systemd Commands

# Start the server
sudo systemctl start rust-server

# Stop the server
sudo systemctl stop rust-server

# Restart the server
sudo systemctl restart rust-server

# View logs in real-time
sudo journalctl -u rust-server -f

# View recent logs
sudo journalctl -u rust-server -n 100 --no-pager

Using Screen (alternative)

If you prefer using Screen instead of systemd:

# Start server in a screen session
sudo -u rustserver screen -dmS rust /home/rustserver/start_rust.sh

# Attach to session
sudo -u rustserver screen -r rust

# Detach from session (Ctrl+A then D)

# List screen sessions
screen -ls

# Kill a session
screen -X -S rust quit

Step 10: Administration via RCON

Installing Rusty (RCON Client)

Rusty is an RCON administration tool for Rust.

  1. Download Rusty on your local PC from: https://github.com/Kirilligu/Rusty
  2. Configure the connection:
    • IP: Your VPS IP address
    • Port: 28016 (or your RCON port)
    • Password: Your RCON password

Useful RCON Commands

Via Rusty or in server console, you can use these commands:

# Server information
server.info

# View connected players
playerlist

# Kick a player
kick "player_name" "reason"

# Ban a player
banid "steamid" "reason"

# Unban a player
removeid "steamid"

# Save the server
server.save

# Teleport to a player
teleportpos x y z

# Give items
inventory.give "player_name" "item" quantity

# Change time
env.time 12

# Enable/disable PvE
server.pve true/false

# Global message
say "Your message"

Step 11: Advanced Configuration

Configuration Files

Configuration files are located in:

/home/rustserver/rust-server/server/my-rust-server/cfg

server.cfg

Create a custom configuration file:

sudo nano /home/rustserver/rust-server/server/my-rust-server/cfg/server.cfg

Example configuration:

// General settings
server.hostname "My Custom Rust Server"
server.description "PvP/PvE server with modifications"
server.url "https://discord.gg/myserver"
server.headerimage "https://i.imgur.com/example.jpg"
server.logoimage "https://i.imgur.com/logo.jpg"

// Game settings
server.maxplayers 150
server.worldsize 4500
server.seed 987654

// Gather rates
gather.rate dispenser * 2.0
gather.rate pickup * 2.0

// Faster crafting
crafting.instant true

// Faster recycler
recycler.efficiency 2.0

// Disable certain events
bradley.enabled false
helicopter.enabled false

// Decay settings
decay.scale 0.5
decay.upkeep false

// Other settings
server.stability true
server.radiation false
server.events true

Load this file at startup by modifying your script:

./RustDedicated -batchmode +server.cfg server.cfg ...

users.cfg

To configure administrators:

sudo nano /home/rustserver/rust-server/server/my-rust-server/cfg/users.cfg

Add your admins with their SteamID64:

ownerid 76561198012345678 "AdminName" "Reason"
moderatorid 76561198087654321 "ModName" "Reason"

Find your SteamID64 at: https://steamid.io/

Bans Configuration

sudo nano /home/rustserver/rust-server/server/my-rust-server/cfg/bans.cfg

Format:

banid 76561198012345678 "Ban reason"

Step 12: Installing Oxide/uMod

Oxide (now uMod) is a modding framework for Rust that allows plugin installation.

Installing uMod

  1. Download the latest version:
cd /home/rustserver
sudo wget https://umod.org/games/rust/download
sudo mv download oxide-rust.zip
  1. Install unzip if necessary:
sudo apt install unzip -y
  1. Extract to the server folder:
sudo unzip oxide-rust.zip -d /home/rustserver/rust-server/
sudo rm oxide-rust.zip
  1. Change permissions:
sudo chown -R rustserver:rustserver /home/rustserver/rust-server/
  1. Restart the server:
sudo systemctl restart rust-server

Installing Plugins

Plugins are placed in:

/home/rustserver/rust-server/oxide/plugins/

Popular plugins:

  • Kits: Starter kit system
  • StackSizeController: Modify stack sizes
  • RemoverTool: Tool to remove structures
  • VoteDay: Vote to change time
  • Economics: Economy system
  • BetterChat: Chat improvements

Download plugins from: https://umod.org/plugins

Example plugin installation:

cd /home/rustserver/rust-server/oxide/plugins/
sudo wget https://umod.org/plugins/Kits.cs
sudo chown rustserver:rustserver Kits.cs

The plugin will be loaded automatically at next startup or via RCON command:

oxide.reload Kits

Plugin Configuration

Configurations are located in:

/home/rustserver/rust-server/oxide/config/

Each plugin has its own JSON configuration file.

Step 13: Server Updates

Manual Update

  1. Stop the server:
sudo systemctl stop rust-server
  1. Run the update script:
sudo -u rustserver /home/rustserver/install_rust.sh
  1. Restart the server:
sudo systemctl start rust-server

Automatic Update Script

Create a script to automate:

sudo nano /home/rustserver/update_rust.sh

Content:

#!/bin/bash

echo "Stopping Rust server..."
systemctl stop rust-server

echo "Updating server..."
cd /home/rustserver/steamcmd
./steamcmd.sh +force_install_dir /home/rustserver/rust-server +login anonymous +app_update 258550 validate +quit

echo "Restarting server..."
systemctl start rust-server

echo "Update completed!"

Make it executable:

sudo chmod +x /home/rustserver/update_rust.sh

Automatic Update via Cron

To check for updates daily at 4 AM:

sudo crontab -e

Add:

0 4 * * * /home/rustserver/update_rust.sh

Step 14: Backups

Backup Script

Create a backup script:

sudo nano /home/rustserver/backup_rust.sh

Content:

#!/bin/bash

BACKUP_DIR="/backup/rust"
DATE=$(date +%Y%m%d_%H%M%S)
SERVER_DIR="/home/rustserver/rust-server/server/my-rust-server"

mkdir -p $BACKUP_DIR

# Backup server data
echo "Creating backup..."
tar -czf $BACKUP_DIR/rust_backup_$DATE.tar.gz $SERVER_DIR

# Keep only the last 7 backups
find $BACKUP_DIR -name "rust_backup_*.tar.gz" -mtime +7 -delete

echo "Backup completed: rust_backup_$DATE.tar.gz"

Make it executable:

sudo chmod +x /home/rustserver/backup_rust.sh

Automatic Backup

Add to crontab for daily backup at 3 AM:

sudo crontab -e

Add:

0 3 * * * /home/rustserver/backup_rust.sh

Restoring a Backup

# Stop the server
sudo systemctl stop rust-server

# Extract the backup
sudo tar -xzf /backup/rust/rust_backup_YYYYMMDD_HHMMSS.tar.gz -C /

# Restart the server
sudo systemctl start rust-server

Step 15: Wipes

Rust requires regular wipes. Here's how to perform different types of wipes:

Map Wipe Only

# Stop the server
sudo systemctl stop rust-server

# Delete map files
sudo rm -rf /home/rustserver/rust-server/server/my-rust-server/*.map
sudo rm -rf /home/rustserver/rust-server/server/my-rust-server/*.sav*

# Restart the server
sudo systemctl start rust-server

Full Wipe (map + blueprints)

# Stop the server
sudo systemctl stop rust-server

# Delete all server files
sudo rm -rf /home/rustserver/rust-server/server/my-rust-server/*

# Restart the server
sudo systemctl start rust-server

Blueprints Wipe Only

# Stop the server
sudo systemctl stop rust-server

# Delete blueprint files
sudo rm -rf /home/rustserver/rust-server/server/my-rust-server/*.db

# Restart the server
sudo systemctl start rust-server

Changing Seed After Wipe

Modify the seed in your startup script to generate a new map:

sudo nano /home/rustserver/start_rust.sh

Change the SEED value then restart.

Step 16: Monitoring and Optimization

Resource Monitoring

Install htop for real-time monitoring:

htop

Check usage:

  • CPU: should stay under 80%
  • RAM: Rust uses 4-8 GB depending on player count
  • Network: monitor bandwidth

Performance Optimization

Add these parameters to your startup script for better performance:

./RustDedicated -batchmode \
    -nographics \
    -logfile output.txt \
    +server.tickrate 30 \
    +server.entityrate 15 \
    ...

Server Logs

Logs are located in:

/home/rustserver/rust-server/output.txt

View logs in real-time:

tail -f /home/rustserver/rust-server/output.txt

Automatic Log Cleanup

To prevent logs from taking too much space:

sudo nano /home/rustserver/clean_logs.sh

Content:

#!/bin/bash
LOG_FILE="/home/rustserver/rust-server/output.txt"

if [ -f "$LOG_FILE" ]; then
    # Keep only the last 1000 lines
    tail -n 1000 "$LOG_FILE" > "$LOG_FILE.tmp"
    mv "$LOG_FILE.tmp" "$LOG_FILE"
fi

Automate with cron (daily):

0 2 * * * /home/rustserver/clean_logs.sh

Step 17: Connecting to the Server

For Players

Players can connect in several ways:

1. Via game console (F1):

client.connect IP:PORT

Example:

client.connect 123.45.67.89:28015

2. Via server list:

  • Launch Rust
  • Go to "Play"
  • Search for your server name in the list
  • Click to join

3. Via favorites:

  • Press F1 in game
  • Type: client.connect IP:PORT
  • Or add server to favorites

Information to Share

Give your players:

  • IP: Your VPS public IP address
  • Port: 28015 (or configured port)
  • Server name: For search
  • Discord/Website: For community

Troubleshooting

Server Won't Start

Checks:

  1. Check logs:
sudo journalctl -u rust-server -n 50
  1. Check permissions:
sudo chown -R rustserver:rustserver /home/rustserver/
  1. Check that ports are not in use:
sudo netstat -tlnp | grep 28015
  1. Check disk space:
df -h

"Cannot allocate memory" Error

If you're running out of RAM:

  1. Create a swap file:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
  1. Make it permanent:
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Players Can't Connect

Checks:

  1. Check that firewall allows connections:
sudo ufw status
  1. Check that server is listening on the right port:
sudo netstat -tlnp | grep RustDedicated
  1. Check logs for errors:
tail -f /home/rustserver/rust-server/output.txt
  1. Test connectivity from outside:
telnet YOUR_IP 28015

Server Crashes

Solutions:

  1. Check crash logs:
tail -100 /home/rustserver/rust-server/output.txt
  1. Increase available RAM or add swap
  2. Check Oxide plugin compatibility
  3. Reduce map size or player count

Poor Performance (lag)

Solutions:

  1. Reduce maximum player count
  2. Decrease map size (worldsize)
  3. Increase VPS resources
  4. Optimize tickrate parameters
  5. Disable non-essential plugins
  6. Regularly clean abandoned entities
# Via RCON
entid delete

Multi-Server Configuration

To host multiple Rust servers on the same VPS:

  1. Copy the server folder:
sudo cp -r /home/rustserver/rust-server /home/rustserver/rust-server2
  1. Create a new startup script with different ports:
sudo nano /home/rustserver/start_rust2.sh

Change ports:

  • server.port: 28025
  • rcon.port: 28026
  1. Create a new systemd service:
sudo nano /etc/systemd/system/rust-server2.service
  1. Open new ports in firewall:
sudo ufw allow 28025/tcp
sudo ufw allow 28025/udp
sudo ufw allow 28026/tcp

Additional Resources

Useful Sites

Community

  • Reddit: r/playrust and r/playrustadmin
  • Official Rust Discord
  • Facepunch Forums

Official Documentation

Conclusion

Your Rust server is now installed and configured on your Linux VPS! You can now:

  • Host your own Rust community
  • Customize the gaming experience with plugins
  • Manage players via RCON
  • Automate updates and backups

Important Points to Remember:

  • Make regular backups before wipes
  • Keep the server updated after each Rust patch
  • Monitor performance and logs
  • Listen to community feedback
  • Plan wipes in advance and communicate them

Happy gaming and good administration!

Join our Discord community server

For any questions, suggestions, or just to chat with the community, join us on Discord!

900+Members