Skip to main content

Setup Server

Prerequisites

Step -1: Properly configure your dev environment

Make sure your IDE will verify your Lua by having GLuaFixer or other tools in place.

Make sure Git is properly configured.

Make sure to enable automatic rebase on pull:

git config --global pull.rebase true

Step 0: Install the Garry's Mod dedicated server

steamcmd +force_install_dir ../monolithds +login anonymous +app_update 4020 -beta x86-64 validate +quit

Step 1: Download Monolith Gamemode

  1. Navigate to your Garry's Mod gamemodes directory
  2. Clone the Monolith repository with your prefered protocol
    • HTTPS git clone --recursive -b staging https://github.com/Monolith-FR/Monolith-Gamemode.git monolithrp
    • SSH git clone --recursive -b staging git@github.com:Monolith-FR/Monolith-Gamemode.git monolithrp
  3. Ensure the folder structure is correct: garrysmod/gamemodes/monolithrp

Step 2: Download Monolith Addons

  1. If existing, remove the old addons folder rm -rf addons
  2. Clone the Monolith Addons repository with your prefered protocol
    • HTTPS git clone --recursive -b staging https://github.com/Monolith-FR/Monolith-Addons.git addons
    • SSH git clone --recursive -b staging git@github.com:Monolith-FR/Monolith-Addons.git addons
  3. Ensure the folder structure is correct: garrysmod/addons

Step 3: Install Dependencies

  1. Navigate to your Garry's Mod lua directory.
  2. If not existing, create a bin folder mkdir bin.
  3. Navigate to the bin folder cd bin.
  4. Download and place the required dependencies (x64 ones):

Step 4: Add your Monolith API Key

You'll be given an mrp.json file which should be placed like this: garrysmod/gamemodes/monolithrp/mrp.json.

If you're only given the Monolith API token, you can create the file yourself like this:

{
"AuthKey": "YOURKEYHERE",
"APIUrl": "https://monolith-apidev.monolithservers.fr",
"Community": "monolithfr",
"SegmentAPIKey": null
}

If you haven't been provided with anything, ping VickyFrenzy. The only thing you should need to change is the AuthKey value. The rest can be left as is.

If the server was running reload the map or the server to reload the gamemode.

Step 5: Add your MonoSuite API key

This step is actually optionnal since the MonoSuite key will be automatically provided by the Monolith API.

You'll be given an monosuite.auth file which should be placed like this: garrysmod/addons/monosuite/monosuite.auth.

If you haven't been provided with this file, ping VickyFrenzy.

If the server was running you can restart MonoSuite with mns_reboot.

Step 6: Start Your Server

At this point you can start your Garry's Mod server and ensure everything is functioning correctly. Some Lua errors are expected and not actual issues.

Here is a command template to start:

srcds_win64 -console -nomaster +maxplayers 128 +host_workshop_collection 3220655069 +gamemode monolithrp +map rp_monoford_v1l

Supported maps for development purposes:

  • rp_monoford_v1l
  • rp_monoford_v1l_spookfest
  • rp_monoford_v1k_flat
  • rp_rockford_mrp_v1b
  • rp_truenorth_v1a_mrp
  • rp_riverden_v1a_mrp
  • rp_southside
  • gm_construct

If you need the rp_monoford_v1l.bsp map, ping VickyFrenzy/Max.

Step 7: Give Yourself Admin Rights

Type the following command in the server console to give yourself admin rights: mns addrole <name/steamid> <role>.

  • Replace <name/steamid> with your in-game name (if you're connected) or your SteamID.
  • Replace <role> with founder.

When in-game, use the mrp_admin command to open the admin menu. You can then disable the anti-exploit in the admin menu.

If you have been banned by anti exploit:

mns unban <steamid> <reason>

Step 9: Adding yourself into the developers table

In gamemode/plugins/admin/sh_admin.lua you should find a table at the top called Monolith.admin.developers. Add your SteamID32 into the Development part of this table. This will allow you to use developer commands on your dev server.