How to Setup RUST Server with Plugins?

15 May 2014

A short guide on how to setup a RUST server, with mods and plugins to enhance the game.

This guide shows you how to start a RUST server for other players to join, as well as to show you how to install plugins. A normal RUST server without any mods or plugins is difficult to play because of its early development stage; for example, there will be no welcome message for new players and killing somebody does not display anything. Adding plugins helps make the game better such as by announcing server messages, protect and reserve in-game names, spawning NPCs, allowing admins to manage and destroy buildings easily, change most of the gameplay and so on!


Note: This guide is for setting up the SERVER, not for playing the game as a CLIENT. To see how to install and play the game, refer to this guide.






Steps

1. Get RUST Client and Server
Currently, most people are playing on version v25, which you can get here.


2. Install RUST server and start the server once.
Run the RUST Server Installer and install the server (if you installed RUST Client, do not overwrite the client files, make sure your server is installed in a separate folder). Once that is done, go to the folder where you installed it and run "Run Server.bat" to start the server, which brings up a console. Type in "config.save" in the console, then close it. This creates initial server files needed in future. If you do not wish to add mods or plugins to your server, you can stop here. Any commands to set the server name and rcon password can be configured in /serverdata/cfg/server.cfg. A list of server commands can be seen here. As a minimum, the server.cfg should contain something like this:

rcon.password mypassword
server.hostname "My Server"
server.maxplayers 24


3. Download and install Magma.
There are other popular mods such as Oxide, but Magma is an excellent framework which allows users to create plugins using JavaScript, which is easy as pie if you have any knowledge on programming, giving you a great deal of control and modification for your plugins. It is important to note that newer versions of Magma do not support the current v25 RUST, so I provided a download link for the correct Magma version here. At the top-left corner of Google Drive, click File > Download. Then, extract its contents to where you installed your RUST server.


4. Configure Magma.
Go to /save/Magma/Rust++/Rust++.cfg and configure important settings such as sleepers. If sleepers = true, then the server spawns a sleeping body whenever a player disconnects. These bodies can still be killed, so it forces players to find a safe place to disconnect. Other settings such as message of the day and notices can be configured here.


5. Make yourself the master admin of the server.
If you're going to play in your own server, you should make yourself the master admin. There are two ways you can try, or you can just do both. The first method is to join your server, bring up the console with F1 and type "rcon.login [password]", replacing [password] with your rcon password set in server.cfg as mentioned in Step 2. Then, type "/setmasteradmin" in chat (NOT CONSOLE).

The second method is the best method, which is to go to /save/Magma/Rust++ folder and edit the admins.xml. It should contain this code, but make sure you replace DisplayName with your nickname and UserID with your player ID number (this can be seen in the server console when you join the server as a client):

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfAdministrator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Administrator>
<DisplayName>Lemoney</DisplayName>
<UserID>76561198120464074</UserID>
<Flags>
<string>CanKick</string>
<string>CanBan</string>
<string>CanUnban</string>
<string>CanTeleport</string>
<string>CanLoadout</string>
<string>CanAnnounce</string>
<string>CanSpawnItem</string>
<string>CanGiveItem</string>
<string>CanReload</string>
<string>CanSaveAll</string>
<string>CanAddAdmin</string>
<string>CanDeleteAdmin</string>
<string>CanGetFlags</string>
<string>CanInstaKO</string>
<string>CanAddFlags</string>
<string>CanUnflag</string>
<string>CanWhiteList</string>
<string>CanKill</string>
<string>CanMute</string>
<string>CanUnmute</string>
<string>CanGodMode</string>
<string>RCON</string>
</Flags>
</Administrator>
</ArrayOfAdministrator>




To make other players as admin, you can just use the "/addadmin [playername]" chat command, but if you want to manage your admins better, you should edit the admins.xml file manually. You can add new admins by copy-and-pasting the whole Administrator element. See the number of things the admin can do under the Flags list, such as CanGodMode? This means that this admin can use the "/god" chat command to make himself invulnerable. So, when copying this admin code for other admins in your server, you may want to remove some of these flags so that they do not have full access.




6. Adding Plugins
Adding plugins is very simple in Magma. To install plugins, simply extract the plugin folder to /save/Magma. You can find plugins for Magma in their forums here, but you may need to register for an account. For your convenience, I have compiled a bunch of useful plugins that should be used on most servers. Some of the plugins have been modified by me to prevent same names and have some funny death messages, so this is a little extra that could not be found in the forums. Extract the plugins to /save/Magma.

USEFUL WORKING PLUGINS FOR MAGMA v1.1.3






Common Questions

Why can't people can't join my server?
Make sure they are using RUST v25. Also, make sure your firewall allows the connection between the server and clients, make sure the ports are forwarded.

How do I detect hackers?
There is no real way to detect hackers, but you can reduce it. If you used the plugins pack that I provided here, it should include a HackAutoBan plugin which will automatically kick anyone suspected of hacking (it checks for players killing people farther than the weapon's effective range). There is also a Vanish plugin which allows admins to use the "/vanish" chat command to turn invisible. This, along with the "/tpto [playername]" command, admins can teleport and check on players, but the admin's name will still show even if invisible, so I suggest admins to use a hard-to-see name like "." or something.

Can I create my own plugins? How?
Magma works by simply reading the JavaScript file in the plugin folder you put in /save/Magma. You can take a look at the plugins created by others as an example. THIS LIST provides a documentation on classes, events and hooks which you can use to program the game's behaviour.

How to Play RUST Online?

A short guide to playing RUST online using Tunngle (also works with offline LAN).

RUST is a survival first-person-shooting game where you start off with nothing but a rock. From there, you wander around the wilderness of a beautiful post-apocalyptic world with nuclear radiation zones, gathering materials and building houses, weapons and more. It is sort of like DayZ without the zombies, as there are enough ways to die in this game. Here's an easy guide on how to play it online, or even LAN.

Note: This guide only shows how to install the game CLIENT. To see how to setup a SERVER with mods and plugins, refer to this guide.




Steps to Follow

1. Get RUST Client and Server
Currently, most people are playing on version v25, which you can get here.

2. Run the RUST Client v25 Installer.
Install the client. Server is not needed unless you are planning to host a RUST server.

3. Enter your nickname.
Go to where you installed RUST, launch ChangeNick.exe and type in any name you like. This will be your in-game name. Some servers may prevent default and same names from joining, so it is best that you enter a unique name.

4. Join game.
Make sure you're in Tunngle (also works with Hamachi, Evolve and other VPN/VLAN software), there is a Rust network in Tunngle which you can join to look for servers. To join a server, launch the game using "Rust Client.exe" and press F1 when in-game to bring up the console. Type in this:

net.connect [ip address]:[port]

Make sure to fill in BOTH the IP address and port of the server. The default port used in RUST servers is 28015. For example, net.connect 7.11.72.66:28015. Once you're in game, type "/help" to get started, as most servers have plugins to provide information on commands and things you can do in the server. Some even has starter kits which will give you a stone hatchet for easy mining at the start.




Common Problems

Cannot start the game.
1. Make sure you have the Visual C++ Redistributable Packages installed.
2. Make sure you have the latest .NET Framework.
3. Make sure you run RUST as administrator.

Can't join the server?
1. Most likely the server runs on a different version, some are still running v19, an older version.
2. Firewall problems are also common, make sure all connections are allowed between you and the server.
3. Other than that, it is possible that the server has a plugin which auto-kicks players due to certain name constraints. Try changing your name.