Skip to content

Hosting guide (one page)

There are two ways to play together:

  • Lobby: in the main menu, host game starts the island on your own computer. Friends join from their server browser (play game > lobbies) or through your Steam profile. The world only runs while you play.
  • Dedicated server: a separate program (sbox-server) runs the island without a player, so the world keeps running when nobody is online. Players find it under play game > servers.

This page explains the dedicated server. Facepunch’s own guide covers the engine side in more detail: https://sbox.game/dev/doc/networking/dedicated-servers/.

Set it up with an AI assistant

If you want an AI assistant (ChatGPT, Claude, Gemini…) to guide you, copy this prompt into it. It reads this page, asks about your machine, then walks you through the setup one step at a time. Read each command before you run it, and never paste a password or a token into the chat.

You are helping me host a Rust Legacy dedicated server (a game mode for s&box). First read the hosting guide: https://docs.rustlegacy.io/hosting/all/ If you cannot open it, ask me to paste it. Follow the guide; when it does not cover something, say so instead of guessing.
Before giving any command, ask me:
- Where the server will run: a rented VPS, a dedicated server or my own computer, and its system (which Linux distribution, or Windows).
- How I reach it (SSH, remote desktop) and how used I am to a terminal.
- How many players I expect and the rules I want (PvP or PvE, gather rate, bots, monthly wipes).
Then guide me one step at a time, and wait until I confirm a step worked before the next one:
1. Install SteamCMD and the s&box dedicated server (app 1892930).
2. Write the start script with my server name and settings.
3. Make the server start with the machine and restart if it crashes (a systemd service on Linux, a service or scheduled task on Windows).
4. Make me admin in config/users.json with my SteamID64.
5. Check the server shows under play game > servers, then set up backups of the world save.
Explain what each command does. When I paste an error, find its cause and fix it before going on. Never ask me to paste a password or token here: tell me where to put it instead.

1. Get a machine that stays on

A dedicated server is only up while the machine running it is on and online. Your own computer works for a test (section 10), but for a server people can join at any time, rent a machine from a hosting company:

  • VPS (virtual private server): a share of a bigger machine, the cheapest choice and enough for one or two servers. The official servers run on VPSs.
  • Dedicated server: a whole machine for you. Costs more; worth it for several servers or a large one.
  • Game server host: only if it offers s&box and lets you change the command line and the server files (config/users.json, data/).

What one server needs, measured on the official servers (64 slots, 32 bots):

Minimum Comfortable
Memory 4 GB 8 GB (one server uses about 3 GB)
Processor 2 cores 4 cores (one server uses 1 to 1.5 cores)
Disk 20 GB 40 GB (the s&box server download is about 7 GB)

For two servers on one machine, double the memory and the cores; the official EU pair shares 6 cores and 12 GB. Linux (Ubuntu or Debian) or Windows both work; Linux VPSs are usually cheaper because Windows needs a licence. Pick a location close to your players for a low ping. Players connect through Steam’s relay, so you do not need to open ports (section 3).

2. Install the s&box dedicated server

On a machine without s&box, use SteamCMD (app 1892930):

steamcmd +login anonymous +app_update 1892930 validate +quit

The server lands in steamcmd/steamapps/common/sbox dedicated server. Re-run the command when s&box updates. If you already have s&box installed through Steam, sbox-server.exe is also in the s&box folder.

The dedicated server no longer ships the Steam client libraries. Either install the Steam client on the machine, or link them as the Facepunch guide shows (registry keys on Windows, ~/.steam/sdk64/steamclient.so symlink on Linux).

3. Start it

Windows, Run-Server.bat next to sbox-server.exe:

sbox-server.exe +game redfive.rustlegacy +hostname "My Rust Legacy Server"

Linux, run-server.sh:

#!/bin/bash
./sbox-server +game redfive.rustlegacy +hostname "My Rust Legacy Server"

The server loads the island directly (no menu) and logs World loaded: ... then Connected to Steam. Connections go through Steam’s relay by default, so you do not need to open ports and your IP address stays hidden. To use other ports, add +port <port> (game) and +net_query_port <port> (server list queries).

A Steam game server token keeps the same server identity across restarts (history and favourites of your players keep working): create one at https://steamcommunity.com/dev/managegameservers for s&box (app id 590830) and add +net_game_server_token <token>. Facepunch notes that tokens may only work once s&box is fully released.

4. Settings

A lobby hosted from the main menu sets these rules in host lobby → game settings, one set per lobby save. A dedicated server does not use that screen: it keeps its command line, as below. In a lobby, a value typed in the console is kept for that save but brought back within the screen’s slider range at the next save (for example rl_gather_rate 20 at most).

Every setting is a console variable. Put it on the command line (+rl_pvp 0) or type it in the server console (rl_pvp 0). Settings are saved from one start to the next, so removing a setting from the command line does not bring back its default: set it again to the default value. rl_config prints the current values. Defaults are Legacy’s wherever Legacy’s value is known; settings marked not in Legacy are additions of this game mode. Values outside the range are clamped.

Example for a small PvE server:

sbox-server.exe +game redfive.rustlegacy +hostname "Legacy PvE" +rl_max_players 20 +rl_pvp 0 +rl_bot_raid 0 +rl_airdrop_min_players 5

Rules

Variable Default Range Meaning
rl_pvp 1 0 / 1 Players can hurt each other (sleepers included)
rl_sleepers 1 0 / 1 Disconnected players stay asleep in the world and can be killed and looted
rl_decay 1 0 / 1 Buildings and deployables decay when left alone
rl_decay_rate 1 0 to 1000 Decay speed multiplier
rl_metabolism 1 0 / 1 Hunger, cold, bleeding and poison
rl_fall_damage 1 0 / 1 Fall damage and leg injuries
rl_condition_loss 1 0 to 100 Wear of weapons, tools and armor (0 = no wear)
rl_third_person 0 0 / 1 Players can switch to third person with the view key (Legacy: first person only)
rl_tree_felling 0 0 / 1 Trees run out of wood, fall and regrow (Legacy: infinite wood)

Progression

Variable Default Range Meaning
rl_gather_rate 1 0.1 to 100 Gather rate multiplier
rl_craft_speed 1 0.1 to 100 Crafting speed multiplier
rl_craft_queue 0 0 / 1 Allow queuing several crafts (Legacy: one craft at a time)

Time

Variable Default Range Meaning
rl_day_length 45 1 to 600 Day length in real minutes
rl_night_length 15 1 to 600 Night length in real minutes

Loot and events

Variable Default Range Meaning
rl_airdrop_min_players 0 0 to 500 Players needed for airdrops, 0 = always (Legacy: 50)
rl_airdrop_interval 0 0 to 1440 Real minutes between airdrops; 0 = Legacy schedule, one per game day between 10:00 and 14:00
rl_airdrop_crates 3 0 to 10 Crates dropped by each airdrop plane; 0 = Legacy, 1 to 3 at random
rl_crate_lifetime 30 0 to 1440 Minutes before an untouched world crate despawns (0 = never; never while a player is near)

Zombies, mutants, animals and bots

Variable Default Range Meaning
rl_mob_scale 1 0 to 5 Population multiplier of the 16 Legacy mutant spawners, zombies included (1 = the Legacy lists, 0 = none). Rounded up, so a small value still leaves one of each place. Not in Legacy: the zombies
rl_mob_respawn 300 0 to 86400 Seconds before a killed zombie or mutant is replaced
rl_mob_spawn_distance 60 0 to 500 Minimum distance in meters between a mob spawn and any player
rl_bots 30 0 to 64 AI survivors on the island (0 = off). Each is a persistent bot that gathers, crafts, builds and raids; its body exists only near players. Not in Legacy
rl_bot_infighting 1 0 / 1 Bots fight each other and the hostile mobs: a bot shoots back at whoever hits it, and now and then attacks a bot it meets (0 = they never hurt each other)
rl_bot_road_range 300 0 to 5000 Furthest distance in meters from the main road (the Legacy spawn markers) that bots appear and roam; they never go to the edge of the map (0 = no limit)
rl_bot_accuracy 0.5 0 to 1 Aim of the survivors, 0 = wild, 1 = sharp
rl_bot_respawn 180 0 to 86400 Seconds before a killed survivor is replaced elsewhere on the island
rl_bot_offline_rate 0.1 0 to 1 Speed of the survivors’ abstract life (gathering, looting, crafting, respawns) while nobody is connected: 0 = frozen, 1 = as with players online
rl_bot_build 1 0 / 1 Survivors build and keep a wooden base (0 = they never place pieces; existing bases stay in use)
rl_bot_raid 1 0 / 1 Survivors raid bases with explosive charges: bot bases at any time, player bases only while their owner or a guest of their doors is online (0 = never; raids under way stop)
rl_bot_raid_interval 120 0 to 10080 Minimum minutes between two raids of the same survivor
rl_bot_kit_naked 20 0 to 100 Spawn weight of Naked bots (no armor, a rock, a torch and bandages like a new player); 0 = never
rl_bot_kit_gatherer 12 0 to 100 Spawn weight of Gatherers (hatchet, pick axe, some wood and stones)
rl_bot_kit_builder 6 0 to 100 Spawn weight of Builders (hatchet, a lot of wood and planks)
rl_bot_kit_scavenger 28 0 to 100 Spawn weight of Scavenger survivors (cloth, pipe shotgun); 0 = never
rl_bot_kit_gunslinger 24 0 to 100 Spawn weight of Gunslingers (cloth, revolver)
rl_bot_kit_archer 22 0 to 100 Spawn weight of Archers (cloth, hunting bow)
rl_bot_kit_hunter 18 0 to 100 Spawn weight of Hunters (leather, 9mm pistol)
rl_bot_kit_brawler 6 0 to 100 Spawn weight of Brawlers (leather, shotgun)
rl_bot_kit_raider 2 0 to 100 Spawn weight of Raiders (leather, MP5A4)
rl_bot_kit_marksman 1 0 to 100 Spawn weight of Marksmen (leather, bolt action rifle)
rl_bot_kit_soldier 1 0 to 100 Spawn weight of Soldiers (kevlar, M4)
rl_animal_lod 1 0 / 1 Performance: animals far from every player are simulated in coarse steps. Leave it on unless you see animals behaving oddly

The wildlife (chickens, rabbits, boars, stags, wolves, bears) and the ore and wood piles come from the 30 Legacy spawner pockets and have no setting. Raising rl_mob_scale takes effect as mobs respawn; lowering it does not remove the mobs already there, so restart the server to apply it at once.

Cars

Variable Default Range Meaning
rl_vehicles 0 0 to 50 Cars parked along the main road, damaged (20 to 60 % health) for players to repair with metal fragments and drive (0 = off). Not in Legacy
rl_vehicle_respawn 30 1 to 240 Real minutes before a destroyed road car is replaced at a new spot along the road

Road cars appear 6 to 15 m off the road, on ground no steeper than about 11°, at least 50 m from players and sleepers, 20 m from bases and 30 m from other cars. At most 5 appear every 30 seconds. They are saved with the world. A car that sinks or falls under the map counts as destroyed, and so does a road car an admin removes: it comes back rl_vehicle_respawn minutes later. The respawn timers are not saved, so after a restart the missing cars come back at once. Lowering rl_vehicles never removes a car someone may be using: the extra ones are just not replaced. Cars spawned by an admin or a plugin do not count.

Access and slots

Variable Default Range Meaning
rl_admin_menu 0 0 / 1 Admin menu for the host of a lobby (a dedicated server gives it with the admin claim instead)
rl_admin_menu_all 0 0 / 1 Admin menu for every player: items, teleports, fly, god mode, and killing or bringing other players. Kick, ban, clear world and the server settings stay with the real admins. Only for sandbox servers
rl_max_players 0 0 to 500 Server slots, read at startup (0 = the game’s 64). Pass it on the command line
rl_plugins_admin_only (empty) plugin names Server plugins only admins can use, comma separated (e.g. Give,Creative): the others do not see their commands, buttons or menus (section 8)
rl_directory_enabled 1 0 / 1 Publish the names of the server’s plugins on the rustlegacy.io server directory, shown in the in-game browser and on https://rustlegacy.io/servers (section 8)

Startup options

These belong to s&box, not to the game mode:

Option Meaning
+game redfive.rustlegacy The game to run
+hostname "name" Name shown in the server list
+port <port> / +net_query_port <port> Game port and server list query port. Needed when two servers share a machine
+net_game_server_token <token> Keeps the server identity across restarts (see above)
+net_allow_local 1 Lets s&box instances on the same machine join over loopback (development builds)

Console commands for the server console

Command Meaning
rl_config Print the current settings
rl_save Save the world now
rl_time <0-24> Set the time of day, e.g. rl_time 21.5
rl_timescale <n> Clock speed multiplier: 0 = frozen, 1 = Legacy, 60 = timelapse
rl_bot_status List the AI survivors: state, weapon, health, target
rl_bot_clear Remove every AI survivor (rl_bots fills the island again)
rl_perf [seconds] Frame times over the last seconds and the objects the scene holds
rl_admin_help List the admin commands (below)
rl_plugins List the server plugins and whether they run (section 8)
rl_plugins_reload Restart every plugin
rl_perm Groups and permissions of the plugins (VIP…): rl_perm list, rl_perm add <player> vip, rl_perm grant vip kits.vip (section 8). When several players share a name, give the SteamID64
rl_ban <steamid> <minutes> <reason> Ban a player, connected or not, for up to a year (525600 minutes); a connected player is kicked and sees the reason
status s&box: shows the server id players use with connect <id>

The admin commands in section 5 also work from the server console.

5. Admins

Admins are listed in the s&box file config/users.json, inside the server folder. Give the admin claim to the Steam accounts (SteamID64, shown on their Steam profile URL or with https://steamid.io):

[
{
"SteamId": "76561198000000000",
"Name": "Charles",
"Claims": [ "admin" ]
}
]

The server reloads the file by itself; connected players get their rights within a few seconds. Admins can open the admin menu (Admin Menu key, / by default, in the s&box key binds) and run the Legacy admin commands from their own console: inv.give, inv.giveplayer, teleport.topos, teleport.toplayer, airdrop.drop, env.time, env.daylength, env.nightlength, airdrop.min_players (rl_admin_help lists their syntax). The server console can run all of them too.

The admin menu has the tabs Items, Animals, Resources, Build, Player, World, Players and Bots. On the Players tab an admin can teleport to a player or bring them, heal, feed, clear radiation, switch god mode, respawn, kill, kick, learn blueprints, give an item or a kit, and send them back to where they last died; some of these also work on sleepers. The Bots tab changes the number and aim of the AI survivors (rl_bots and rl_bot_accuracy) while the server runs. To take down a player’s building, hold the use key on it: Remove takes the piece or object you look at, Remove Base the whole building with the doors and objects placed on it. The Uber Stone Hatchet (Items tab) does the same piece by piece, one hit each. Neither works for players who only have the menu through rl_admin_menu_all. Admin actions are written to the server log (and the dashboard) with the admin’s name. An admin from users.json cannot be kicked, banned or killed by an admin who is not one, and a player who loses the admin rights loses god mode, fly and instant craft at once.

6. World save

The world (buildings, deployables, boxes, sleepers, player inventories, time of day) is saved every minute in the server’s data folder: data/redfive/rustlegacy/rustlegacy_world.json. Run rl_save in the server console before stopping the server so nothing from the last minute is lost. Back up that file to keep a world; delete it (server stopped) to start over from nothing. To wipe a running server, use rl_wipe_now full (blueprints too) or rl_wipe_now map in the server console; with rl_wipe_cycle 1 the server also wipes itself every month.

7. Joining

  • Server browser: main menu, play game, servers tab. Click a server, then join server (or click it twice). The star keeps a server at the top of the list; history lists the servers you joined.
  • By id: type status in the server console to read the server id, then players type connect <id> (or net.connect <id>) in their game console.
  • A server can be missing from the list on the computer that runs it, or on the same home network, because the Steam list shows it under the internet address. Players from elsewhere see it; on the same network, join by id.

8. Plugins

Plugins add things like a PvP arena, kits or chat commands. Each one is a .cs file that goes in the plugins folder of the data folder (data/redfive/rustlegacy/plugins/, next to the world save); the server picks it up within 2 seconds, no restart needed. rl_plugins lists them, rl_plugins_reload restarts them and rl_plugins_admin_only keeps some for admins. Installing, the Arena plugin and writing your own: https://docs.rustlegacy.io/plugins/. The ready-made plugins are open source (MIT) on GitHub: rustlegacyio/rustlegacy-plugins.

9. Server dashboard

The official servers run with a web dashboard: players online, a live map, activity, chat and logs, alerts and announcements to players. It is open source (MIT): rustlegacyio/rustlegacy-dashboard. Host it with Docker, add your server in it, and paste the two lines it gives you into the server config (rl_dashboard_url and rl_dashboard_token); the game server sends its data itself, no agent needed.

10. Test on your own computer

Before opening a server, you can try your settings and plugins on your own computer with the published game:

  • Lobby: in the main menu, host game. A lobby takes the same plugins, from data/redfive/rustlegacy/plugins/ inside the s&box install.
  • Dedicated server: start sbox-server as in section 3 (the s&box install has sbox-server.exe), then start Rust Legacy on the same computer and join with connect <id> in the game console (status in the server console gives the id). The server list may not show a server that runs on your own network (section 7).