Rust
Yeterli oy yok
How to make a Rust server on Linux to play on Linux!
Krafting tarafından
This guide will help you through the process of creating a Rust server on Linux to play Rust on Linux!
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
Introduction
This guide will help you through the making of a Rust Server and configuring the server to be able to play Rust on Linux!
This guide will use Debian 10 Buster as an OS for the server.
Requirements
  • A PC with Debian 10 Buster installed (Or any variant)
  • A user with sudo permission but not root !
  • A little bit of technical knowledge of the command line on linux
Installing SteamCMD & Rust
To install SteamCMD on Debian you will need to add the non-free software repository first if not already done.
To do that you can simply type those two commands
sudo add-apt-repository contrib sudo add-apt-repository non-free

OR, You can edit the file in /etc/apt/sources/list and add "contrib non-free" behind every uncommented line, this should looks like this:
# Line commented out by installer because it failed to verify: deb http://security.debian.org/debian-security buster/updates main contrib non-free deb http://ftp.fr.debian.org/debian buster main contrib non-free

You will also need to enable the 32-bits architecture:
sudo dpkg --add-architecture i386

Then, you can simply install SteamCMD and its dependencies by running (screen is not necessary but we will use it to run the start script)
sudo apt install lib32gcc1 steamcmd screen

Once installed you can run it:
steamcmd

You will be greated by SteamCMD, you will need to login using anonymous credentials
login anonymous

Once logged in we will select the Install folder of the server (I recommend the home directory of the user or the Desktop/Documents directories) I will use a Rust folder on the Desktop as the install directory:
force_install_dir /home/[user]/Desktop/Rust

The we can install Rust using this command
app_update 258550

And you can now exit steamcmd by running
quit
Running & Configuring the server to Play on Linux
Now that all we need is installed, we can go to the install directory
cd /home/[user]/Desktop/Rust

Now we will create a startup script,
nano start.sh
You have two options:
(don't forget to edit the install directory and anything that can be changed (Rcon Password, Seed, Port, etc..))
Start-up with auto update
#!/bin/bash steamcmd +login anonymous +force_install_dir /home/[user]/Desktop/Rust +app_update 258550 +exit cd /home/[user]/Desktop/Rust/ screen -dmS rust ./RustDedicated -batchmode -server.port 28015 -rcon.port 28016 -server.worldsize 4000 -rcon.password "pass" -server.seed 123456 +server.security "0" +server.secure "0" +server.eac 0 +server.encryption "0"

Start-up with no auto update
#!/bin/bash screen -dmS rust ./RustDedicated -batchmode -server.port 28015 -rcon.port 28016 -server.worldsize 4000 -rcon.password "pass" -server.seed 123456 +server.security "0" +server.secure "0" +server.eac 0 +server.encryption "0"

Save the file and now you'll have to make it executable with this command
chmod u+x start.sh

Then you can just run the script with:
sh start.sh

To see the console and what's going on you can type
screen -r rust
Note:
You can detach the screen by pressing CTRL + A + D
You can kill the screen (and the server) by pressing CTRL + C
Other Notes
Now that your server is created and running you can connect to your server using my other guide:
https://steamproxy.com/sharedfiles/filedetails/?id=2082308869
2 Yorum
Dr. Shenanigans 19 May 2023 @ 19:39 
Some notes for anyone browsing this:

First : The current version of steamCMD will require you to run the force_install_dir command BEFORE you login.

Second : If you're not using a Debian-based distro, you can get a distro-agnostic version of steamCMD using this command:

wget http://media.steampowered.com/client/steamcmd_linux.tar.gz

You can extract it using any archive software of your choice.
or if you need command line, you use the following:

tar -C ~/steamcmd -xvf steamcmd_linux.tar.gz

Otherwise, just open up a terminal in the directory steamCMD is located and run ONE of the following command:

./steamcmd.sh
sh steamcmd.sh


Then follow the guide after the "steamcmd" steps.

For the script you NEED to replace steamCMD with sh /PATH/TO/steamcmd.sh or wherever steamcmd.sh resides.
Huub 28 Eyl 2020 @ 23:24 
Is this guide for a local rust server?
I used this guide to install it on another machine on my local LAN but i couldn't log on with rcon from the machine running the rust client.
As far the game itself, it runs and works beautifull with you guide. Many thanks!