Setup basic Rust Server based on Windows server 2022 Print

  • windows, rust server, rust, 2022, install, windows server, setup
  • 0

System Requirements

The Rust server can be taxing on your host but maybe not as much as you would think. As a baseline a 3 square km (default gen size) map freshly generated will run at close to 2 gigabytes of ram. After some stress testing and 150k entities later, can use 6+ gigabytes of memory. So I would suggest having at least 7 gigs allocated per server. 

Resources Used

Intel Xeon 2x E5-2650

2 x 1TB SATA SSD
128GB DDR3 RAM

Windows Server 2022


 

All - in - One .bat Rust Server

    With this guide I will provide an All-In-One basic .bat script for your rust server.

  • Updates Steam CMD

  • Downloads + Updates Rust Server

  • Starts Rust Server

  • Acts as a console to manage your server

Let's begin.

  • Start by heading over to your Local Disk C
  • Create a new folder, for this instance I used "rustserver"
  • Go inside of that folder and create a new folder and call it "steamcmd"
  • Head back to the rustserver folder and right click, create new, text file, name it rustserver once created right click the file and rename it to rustserver.bat (As we do not want it to be a .txt file)
  • Open the file and place inside the following 

@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================

:init
setlocal DisableDelayedExpansion
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
setlocal EnableDelayedExpansion

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************

ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
ECHO args = "ELEV " >> "%vbsGetPrivileges%"
ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
ECHO Next >> "%vbsGetPrivileges%"
ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
"%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
exit /B

:gotPrivileges
setlocal & pushd .
cd /d %~dp0
if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)

::::::::::::::::::::::::::::
::START
::::::::::::::::::::::::::::
:start

REM Run shell as admin
ECHO %batchName% Arguments: %1 %2 %3 %4 %5 %6 %7 %8 %9
set ServerDirectory="C:\RustServer\"
set SteamCMD="C:\RustServer\steamcmd\"
echo "Starting Update, make sure your server is turned off before continuing!"
"%SteamCMD%steamcmd.exe" +force_install_dir %ServerDirectory% +login anonymous +app_update 258550 validate +quit
echo "Rust has been updated"
echo "Starting Rust Server based on previously saved data"
RustDedicated -batchmode +server.port 28015 +server.identity "rust" +rcon.port 28016 +rcon.web true +server.hostname "Byteania Windows Example Server" +server.level "Procedural Map" +server.description "Welcome to Byteania Rust\n\n (This creates two breaks)Rules are as follows:\nNo Cheating\n\nThanks for playing Byteania Rust" +server.url "https://byteania.com" +server.headerimage "https://i.ifh.lol/headerimage.jpg" +server.maxplayers 40 +rcon.password "changemeplease" +server.saveinterval 900 +app.port 10001 +server.worldsize 3000 +server.seed 3409570 

goto start
  • Sections marked in RED are sections that you need to change depending on your configuration
  • set ServerDirectory="C:\RustServer\" = Location of your Rust Server Folder FULL PATH
  • set SteamCMD="C:\RustServer\steamcmd\"  = Location of your SteamCMD Folder FULL PATH
  • +server.hostname "Byteania Windows Example Server" = The name of your server (Displayed in Browser)
  • +server.description "Welcome to Byteania Rust\n\n (This creates two breaks)Rules are as follows:\nNo Cheating\n\nThanks for playing Byteania Rust" = Description of your rust server displayed in browser
  • +server.url "https://byteania.com" = URL to your Website/Store/Discord Server displayed in browser
  • +server.headerimage "https://i.ifh.lol/headerimage.jpg" = Header image displayed in server browser, Size = 512x256 (Ideally JPG Format)
  • +server.maxplayers 40 = Maximum amount of players that can play on your server at any given time (NOT INCLUDING QUE, Que can max out at 1000)
  • +rcon.password "changemeplease" = the RCON Password for your server, used by external third party websites like Battlemetrics, Tebex, CraftingStore, RCON.IO, RustAdmin etc, make sure this password is SECURE.
  • +server.worldsize 3000 +server.seed 3409570 = The size and seed of your rust servers can range anywhere from 1000-6000 for Size, and seed can range from 1 to 2147483647, this is mostly about finding the right settings for your community size, you can also use websites like Rustmaps.com to find examples of map sizes+seeds that may work for you!

Once you have set your configs, Save the file, then simply run the .bat file!

 

You may find that you need to also set Firewall rules, head over to the Windows Firewall Management, on Inbound + Outbound Create new Rules

  • Type: Port - Port: 28015 - Protocol: UDP - Name: Rust Connection
  • Type: Port - Port: 28016 - Protocol: TCP - Name: Rust RCON
  • Type: Port - Port: 10001 - Protocol: TCP - Name: Rust+ Mobile

You may also want to setup Edge Filters/Firewall rules from Path.net, you can do this by contacting us via a support ticket and mention the ports/rules/filters you wish to be applied and we'll get them applied for you asap!, Once our custom filter manager is available for client use, this guide will be updated to include new information based on our panel!


 

Connecting to your server

Run the Rust Client, and do not select a server. Note that your server will not show up under the “Local Network” tab. Instead, press F1 and go to the client console. Assuming you used the default port of 28015, type in the following command to connect to your server:

client.connect SERVERIP:28015


If you used a different port, change it accordingly.


Owners and Moderators

Once the server is up and running you may choose to assign ownership to yourself. This is done with the ownerid command. You will need your 17 digit SteamID number. The easiest way to get it, is to log in and then run the users command at the console. Then enter the command as follows:

ownerid 12345678901234567 AdminName

For example:

ownerid 12345678901234567 "Admin Name"

You can do the same for moderators using the moderatorid command

moderatorid 12345678901234567 "Admin Name"

Note: As with most commands that allow the use of player names, if the name has spaces or special characters in it, you must use quotes to contain the name.

Be sure to use the writecfg command after doing this and then the person must logout and log back in to receive the permissions. The two permissions are almost identical. Owners can create, kick and ban moderators if needed, but moderators cannot affect owners.


Installing Oxide/Umod for Windows

Looking to add plugins to your server to add quality of life plugins?

Head on over to https://umod.org/ - Head to the Games Navigation tab, Click on Rust and hit the "Download" button assigned to the Windows OS Example below.

Once downloaded, open up the .zip, and drag + drop the RustDedicated_Data folder into the root directory of your rust server (MAKE SURE THE SERVER IS OFFLINE WHEN YOU DO THIS!)

After that you can start the rust server back up, and freely download+install plugins to your server freely, for plugins find a plugin you want, and drop the plugin into /Oxide/Plugins folder, the server should auto compile the plugin and generate a config file inside of /Oxide/Config, set your configs, then head over to the console and type o.reload PluginName and there you go! your server is now running, with oxide/umod and plugins!


Was this answer helpful?

« Back