Rust
Недостаточно оценок
[FREE] How to create a dedicated Rust server for older versions.
От casey
This guide goes over how to create an old Rust server on the Google Cloud Platform (GCP), for free, using their Compute Engine feature.

I take no responsibility for your actions outside of what I have written in this tutorial.
   
Наградить
В избранное
В избранном
Удалить
Intro
Hello!

This guide goes over how to create a free dedicated Rust server for any version of the game. I tried making it as user friendly as possible, so anyone can follow along. You can probably get through the whole thing by just copy and pasting all of the commands shown, but I definitely think you should read everything for a better understanding.

The method used in this guide takes advantage of Google Cloud's free trial, so in saying that the servers will only last for 3 months unfortunately, but you can probably transfer the files to a new account before the trial expires. Using GCP is good just to get a better understanding of the inner workings of a server while playing with friends, I wouldn't recommend using it as a primary host because there are cheaper alternatives.

This guide can be applied to any version of Rust, but I 100% recommend just using Linux Game Server Manager if you want the most up-to-date version, it is way easier to set up and has more customizability in terms of plugins.

Enjoy, cheers :)
Accessing the Google Cloud Platform
Before being able to get the server up and running you will need a Google account that has NOT used Google Cloud before, this is because we are going to take advantage of their free trial feature.
  1. Create or use a fresh Gmail account that has never bought or used a free trial for GCP.

  2. Go to https://console.cloud.google.com/freetrial

  3. Select your account, country and accept the Terms of Service.

  4. Enter your billing address and credit/debit card details or use a PayPal account. This will not charge you unless you specifically sign up for a paid account.
Create a VM instance
A VM instance is pretty much a computer inside of a computer, this is what we will use to host the whole server and manage it (besides RCON).
  1. On the left side of the page, click on ”Compute Engine” and wait for it to get ready. Don’t worry about the quickstart as we are not going to use that.

  2. Click "Create".

  3. Your page will come up with a lot of options to change, the only ones we are going to change are Name, Region, Machine Type, Boot disk and Firewall, everything else should stay default unless you know what you are doing.

  4. Name This can be whatever you want (within GCP’s rules), it is the name for the VM instance and won’t be seen publicly.

  5. Region This is where the server is going to be hosted. Change this according to where you live, since I live in Australia I am going to pick “australia-southeast1 (Sydney)”.

    Note: Different regions have different prices due to cost, hardware, manpower, etc. So some places may be a bit more expensive than others, this won’t really affect you in the short term.

  6. Machine type Change this to “e2-standard-2” (optimal for low population of players), you can go higher if you feel you need more cores/RAM, but this will hike up the price a bit. Don’t go lower, from my experience even with 4GB of RAM fails to start the server.

  7. Boot disk Click “Change” and then under “Operating system” select “CentOS”, then change it to “CentOS 8” under “Version”. If you want, change “Boot disk type” to “SSD persistent disk” for faster load times, “Size (GB)” is fine at 20GB.

    Alternatively you can use whatever OS you are comfortable with (some exceptions), but I am not going over how to use anything other than CentOS.

    Note: RHEL, SLES, Windows and SQL servers cannot be used in GCP free tier.

  8. Firewall Tick the boxes for “Allow HTTP traffic” and “Allow HTTPS traffic”.

  9. Click create, it might take a minute for the instance to be created, while you’re waiting I suggest cleaning up the page by closing the tutorial and dismissing the “Related Actions”.
Adding firewall rules
The server needs to be able to communicate with Rust, opening the ports to the server is what allows this.
  1. At the top left of the page, open the sidebar by clicking the 3 horizontal lines.

  2. Scroll down to the “Networking” section and click on “VPC network”.

  3. On the left, click on “Firewall”.

  4. Click “Create firewall rule”.

  5. Change -
    • Name Change this to whatever, something like “rust-ports” will do.
    • Targets Click the drop down and change this to “All instances in the network”.
    • Source IP ranges In this field put “0.0.0.0/0”
    • Protocols and ports Tick the tcp box and put “28016” in the box to the right of it, tick udp and put “28015” in the box to the right of it.

  6. Finish by clicking “Create”.
Server prerequisites
If you are inexperienced with using a terminal then now is the time to pay the most attention, this part probably takes the longest and can easily be problematic.

Anything in a code block should be pasted into the terminal
code block example
  1. Open the CentOS terminal by clicking “SSH” to the right of the instance you’ve made.

  2. sudo su -

  3. yum install epel-release -y


  4. yum update -y

  5. yum install dotnet-sdk-2.2 -y

  6. Verify it has installed by doing
    dotnet --version
    It should return with "2.2.402".

  7. yum install wget unzip screen -y
That's pretty much it, optionally you can install another text editor like nano or whatever.
Adding the server use and creating the server directory
It’s recommended that you create a user that doesn’t have root access, this is to prevent accidentally running malicious files.
  1. Create a user with the command
    adduser rust
    You can name it whatever you want, but I chose Rust because it is short and easy to remember.

  2. Login to the user with
    su - rust

  3. Create a directory for DepotDownloader (will mention shortly)
    mkdir depot

  4. Create a directory for the server
    mkdir server
    Again both the depot directory and server directory can have different names, but for the sake of the guide you should leave it as depot and server.
Installing DepotDownloader
DepotDownloader is a great tool that allows you to download older versions of games, granted you need to actually own the game, this is excepted for servers because you can’t actually play the game with the server files.
  1. Go into the depot directory
    cd depot

  2. Note: If this guide becomes outdated you can get the updated link by going to the DepotDownloader releases page[github.com]

  3. unzip depotdownloader-2.3.6.zip
    Instead of typing out the whole name you can press your tab key to auto-fill the closest file name, this might become difficult if there are a lot of files with the same start of the name (which does occur soon).
Understanding DepotDownloader and SteamDB
Before using DepotDownloader I feel like it is essential to know how to actually use it and what everything means, this is because

DepotDownloader only works if you precede the parameters with “dotnet DepotDownloader.dll”, in other words every command you do MUST have “dotnet DepotDownloader.dll” at the front, then followed by some parameters. All parameters can be found here, but we’re only going to be using a few listed below. An example of a DepotDownloader command is below:
dotnet DepotDownloader.dll -app 730 -depot 731 -manifest 7617088375292372759

-app App defines the AppID to download, the Rust Dedicated Server AppID is 258850.

-depot Depot defines the DepotID to download, the Rust Dedicated Server DepotID depends on the operating system the server is running, in this case we are running CentOS (which is a type of Linux), so the DepotID is 258552.

-manifest Manifest is pretty much the build version for the game/server, these are different depending on what depot you are in.

The app, depot and manifest are similar to a tree, the app has branches stemming off the core, the branches (depots) have leaves (manifests) stemming off from them.
Downloading the server files
To download the server (and client files, explained later) you need the AppID, DepotID and ManifestID, these can be obtained from SteamDB. This will go through downloading any game version, but I will be using Devblog 116 as for the examples.
  1. Before doing anything on SteamDB, please open Notepad or something so you can copy and paste all of the IDs!

  2. Open SteamDB and search for “Rust Dedicated Server” in the search bar at the top left.

  3. Click on the AppID “258550”.

  4. On the left click on “Depots”.

  5. Copy down the DepotIDs for “rust dedicated - linux64” and “rust dedicated - common”, make sure to write down which ones are which.

  6. Open up both “rust dedicated - linux64” and “rust dedicated - common” in different tabs.

  7. On both pages click on “Manifests” on the left.

  8. Now we’re going to find the specific update you want to download, for example the Devblog 116 update was released on 23rd of June, 2016, so we are going to press CTRL + F and search for that date on the page. You don’t have to exactly search for “23rd June, 2016”, “June 2016” should do it.

  9. Copy the ManifestID on both pages and paste them Notepad. Again, name where they came from, e.g. “xyz123 is from rust dedi - common”.

  10. Form all this information into two commands, one for the linux64 depot and one for the common depot, e.g. the linux64 depot command is
    dotnet DepotDownloader.dll -app 258550 -depot 258552 -manifest 6369097581251356313
    and the common depot command is
    dotnet DepotDownloader.dll -app 258550 -depot 258554 -manifest 9177437051655297245

  11. Paste the linux64 common into the terminal, wait for it to download then common command (either can go first, just for clarity).

These two commands will download the common and linux64 depots for the server, downloading the client files is very similar and will be addressed after creating the server.
Prepare the server files
Because DepotDownloader is downloading the common depot and linux64 depot they will be saved into different directories, before being able to run the server we need to move these files into a single directory - this is going to be the server directory made earlier.
  1. While downloading DepotDownloader created a few directories, one being "depots", go into depots.
    cd depots

  2. In depots there are two other folders called "258552" and "258554", use this comand to confirm they are there.
    ls
    If they are not there, you might've made a mistake with the commands previously.

  3. Inside both 258552 and 258554 there are directories called "6xxxxxx" (the x's being numbers), these numbers are crossed out because every current Rust update they also change, but it only changes the directory name, the version you downloaded will be the same. Paste the code below to go into the 6x... directory.
    cd /258552/6xxxxxx/
    Instead of typing the whole thing out you can type 2, press tab, then 2/, then press tab again and it will finish off the command.

  4. Move all of these files from this directory to the server directory with the command
    mv libsteam_api.so RustDedicated RustDedicated_Data steam_appid.txt ~/server

  5. cd into the other folder, 258554, by using this command
    cd ~/depot/depots/258554/6xxxxxx

  6. Now move all of the files inside 258554 into your server directory.
    mv Bundles ~/server

Configuring your server
All of the files are ready to go, now we need to set up a script that starts it.
  1. Go to the server directory
    cd ~/server

  2. Create a shell script file called "start.sh" by doing
    vim start.sh

  3. Configure this block of text on your own computer and then paste it into the shell script
    #!/bin/sh export LD_LIBRARY_PATH=~/server:/server/RustDedicated:{$LD_LIBRARY_PATH}; clear cd ~/server while : do echo "Server is up, press CTRL + A then D to leave this screen, or CTRL + C to shutdown the server." exec ./RustDedicated -batchmode -nographics \ -server.ip 0.0.0.0 \ -server.port 28015 \ -rcon.ip 0.0.0.0 \ -rcon.port 28016 \ -rcon.web 1 \ -rcon.password "RCON PASSWORD" \ -server.maxplayers 200 \ -server.hostname "SERVER NAME PLAYERS SEE" \ -server.identity "my_server_identity" \ -server.level "Procedural Map" \ -server.seed 12345 \ -server.worldsize 4000 \ -server.saveinterval 600 \ -server.globalchat true \ -server.tickrate 30 \ -server.description "SERVER DESCRIPTION" \ -server.headerimage "IMAGE WHEN CLICKED ON SERVER" \ -server.url "VIEW WEBPAGE LINK" done
    You don't have to edit it on your own computer, but it's much easier than editing in vim. All of the text in capital letters you should probably change, especially the RCON password. You can also change the server level, seed, worldsize, etc.

  4. To save the script, press escape, then hold shift and press the semi colon key ( ; ), then press wq, and press enter. This will type :wq at the bottom left to save and exit the script.

  5. Give permission for the script to run
    chmod +x start.sh
    Because the script references a script in the server, RustDedicated you also have to do
    chmod +x RustDedicated

Starting the server
Now that everything is ready to go, let's start it!
  1. Start a screen session, this is pretty much a virtual terminal
    screen -S server
    It doesn't have to be named server, but if you have multiple screen sessions then it will make it easier differentiating them.

  2. Go to the server directory
    cd ~/server

  3. Run the shell script
    ./start.sh

    At the top it will say “Server is up, press CTRL + A then D to leave this screen, or CTRL + C to close the server.” If you want to get back into the screen session do screen -r, then you can CTRL + C to stop the server.

    If you want to close your VM instance's terminal make sure you get out of the screen session you are currently in (CTRL + A then D), if you close your VM instance window without exiting the screen session you cannot get back into the screen session (screen -r), which effectively keeps the server running. You can stop it remotely with RCON by executing the server.stop 0 command in the console, but then you just have a husk of a server sitting there, useless.

    Honestly, I have no clue what the text mono text means, I’ve looked up some solutions to remove it but nothing worked, although it doesn’t affect the server at all except for ease of use.
Connecting to the server via RCON
RCON is a protocol that allows you to remotely administrate your server, very needed if you want to build a public server, not so needed for just friends, but still very handy.
  1. Download RustAdmin from here[www.rustadmin.com] (or use any RCON tool of your choice).

  2. Open it up and go to the configuration tab.

  3. Put your servers IP into the IP field, you can get this by going to your VM instances and copying the external IP listed in the row.

  4. Put 28015 in the “Server port” field, 28016 in the “Rcon port” field and your RCON password in the “Password” field.

  5. At the bottom of the window click save and name it whatever you want.

    You can now connect to your server by clicking server at the top left then clicking connect.
Downloading the client files
Again, we need to download DepotDownloader, but this time it’s for your own computer.
  1. Go here: https://github.com/SteamRE/DepotDownloader/releases and download the latest release.

  2. Extract the contents in the zip file into a folder of your choice, I usually make a new folder on my desktop.

  3. Again, we need to find the right AppID, DepotID and ManifestIDs for these commands, they are different to the Rust Dedicated Server IDs. Go to Rust’s SteamDB page: https://steamdb.info/app/252490/ (Rusts AppID is 252490).

  4. Click on “Depots”.

  5. Copy down the Rust Client - Common and Rust Client - Windows 64 DepotIDs (or if you’re on a Mac, copy the OSX ID). Make note of which ID is which, e.g. “252494 is the common depot”.

  6. Open both of them in new tabs, find the specific date of the update you’re looking for on both pages. e.g. Devblog 116 was released on 23rd of June, 2016, so we’d CTRL + F and search for that date.

  7. Create a new DepotDownloader command with the AppID, DepotID and ManifestIDs you copied. This time add -username to the end of it followed by your original Steam username. For example
    dotnet DepotDownloader.dll -app 252490 -depot 252494 -manifest 3454333614854121926 -username myusername

    Note: Completely replace <username> with your original Steam username. If you don’t know where to find your original Steam username you can find it in C:\Program Files (x86)\Steam\config\ and open the loginusers.vdf file with a text editor.

  8. Paste your commands into the Windows Explorer address bar (the thing that says what folders you are in). For Devblog 116, the Common download command is
    dotnet DepotDownloader.dll -app 252490 -depot 252494 -manifest 3454333614854121926 -username <username>
    The Client download (for Windows 64bit) is
    dotnet DepotDownloader.dll -app 252490 -depot 252495 -manifest 1102024749214813162 -username <username>

  9. Once you paste the commands into your address bar it will ask you for your accounts password (and 2FA code if you have that enabled), it won’t show your password in the command-line window so make sure you are typing it correctly.

  10. Just like before, after downloading both the depots move the contents from inside ../25249X/6219476/ into another folder.

    After that, your client files are done! You can open Rust by running RustClient.exe or Rust.exe, both still launch Rust.

    Note: If you are freezing ever 1-2 seconds and in the console of your client it says "Inventory Updated: XXX" turn your graphics quality all the way up then down, down then up. This should fix your problem. Similarly if you see in the console of your server "ServerUpdateInventory - k_EResultFail" then one of your players needs to turn their graphics up then down.
Thank you
Thanks you for reading, I hop this has helped a few people. Also a big thanks to all of the people posting about old Rust and server creation, I doubt I could create such a large guide without all of their info :)
Комментариев: 11
Louis™ 2 апр в 18:08 
Do you have the filefor the rust dedicated - common and the Linux rust dedicated for dev 116 please? I am stuck at steps 10 and 11 of downloading the server files
pierre 30 янв. 2024 г. в 7:53 
when i open the server when it connect to steam it shut down the program
AquaSurf 30 янв. 2024 г. в 2:03 
Im at stage - downloading server files.
I used command
dotnet DepotDownloader.dll -app 258550 -depot 258552 -manifest 3229978923047206892

Error: [/usr/lib64/dotnet/host/fxr] does not contain any version-numbered child folders

Help I need step by step help as I have no idea of linux etc.
Virmantok 5 авг. 2023 г. в 6:08 
Downloading depot manifest...Got CDN auth token for steamcontent.com result: Fail (expires 01/01/1970 00:00:00)
pourin 4 июн. 2023 г. в 6:13 
when i try going into my server it says update client
Zynoxs 12 фев. 2023 г. в 16:16 
Thank you, i created my server for low pc now XD.
Cheerio 9 мар. 2021 г. в 12:25 
when i launch the server, it says ./RustDedicated: error while loading shared libraries: UnityPlayer.so: cannot open shar
ed object file: No such file or directory

is there a way to fix this?
Chando 24 фев. 2021 г. в 3:30 
@pvp@outpost okay thanks
tingis pingis 23 фев. 2021 г. в 11:49 
nice
casey  [создатель] 21 фев. 2021 г. в 22:34 
@Chando You should be able to get around this by creating a new Gmail account then linking a Debit card/PayPal account that hasn't been linked before.