This repository contains bash scripts to automate the installation, update, and management of a dedicated Rust server on a Linux machine. These scripts assume you are using a steam user and that everything is managed within /home/steam.
- A
sudo-enabled Linux user namedsteam. - Sufficient disk space for the Rust server installation.
- Network access to download SteamCMD, Rust, and Carbon mod files.
This script installs a fresh Rust server using SteamCMD.
- Ensure you're logged in as the
steamuser or run the script withsudo -u steam. - Execute the script:
chmod +x install_rust_server.sh sudo -u steam bash install_rust_server.sh
- Installs SteamCMD.
- Downloads and installs the latest version of Rust from Steam using
steamcmd. - Sets up the Rust server directory (
/home/steam/rust_server).
This script updates the installed Rust server to the latest version using SteamCMD.
- Ensure you're logged in as the
steamuser or run the script withsudo -u steam. - Execute the script:
chmod +x update_rust_server.sh sudo -u steam bash update_rust_server.sh
- Updates the existing Rust server installation to the latest version.
- Uses
steamcmdto validate and update game files, overwriting any outdated files.
This script starts the Rust server in batch mode.
- Ensure you have configured the
RustDedicatedexecutable path correctly. - Execute the script:
chmod +x start_rust_server.sh sudo -u steam bash start_rust_server.sh
- Launches the Rust server (
RustDedicated -batchmode) in the background. - Starts the server using the settings specified in the server configuration.
This script downloads and installs the latest version of the Carbon mod for Rust, and updates the RustDedicated_Data folder.
- Ensure you're logged in as the
steamuser or run the script withsudo -u steam. - Execute the script:
chmod +x update_carbon.sh sudo -u steam bash update_carbon.sh
- Downloads the latest
Carbon.Linux.Release.tar.gzarchive from GitHub. - Extracts the files to the
/home/steam/rust_server/RustDedicated_Datadirectory. - Sources the
environment.shscript from the Carbon mod to set up the environment. - Cleans up the temporary downloaded archive after extraction.
/home/steam/steamcmd: Directory where SteamCMD is installed./home/steam/rust_server: Directory where the Rust server is installed./home/steam/rust_server/RustDedicated_Data: Directory where game data and mods (e.g., Carbon) are stored.
- Ensure the
steamuser has proper write permissions to the server directories (/home/steam/rust_serverand/home/steam/rust_server/RustDedicated_Data). - The scripts are designed for Linux-based systems.
- Make sure you have
wget,tar, and other required utilities installed on the system.
This repository is open-source and available under the MIT License.