Dedicated servers

Set up MPAC on your server.

From a fresh server to one you can run from your browser. Follow the steps in order: each one ends with a check, so you know it worked before you move on.

8 STEPS ABOUT 15 MINUTES PLAYERS INSTALL NOTHING

You'll need

  • A Sons of the Forest dedicated server you can stop, start and upload files to. On Steam it's the free Sons Of The Forest Dedicated Server tool (SteamCMD app 2465200).
  • RedLoader 0.8.6: RedLoader.zip from RedLoader's GitHub releases page.
  • MPAC, from its page on SOTF-Mods.
  • A Steam account to sign in to the dashboard. It becomes the server's owner.

Will this work on my server?

Windows server on your own PC or VPS YES
Works out of the box.
Linux server (runs the game through Wine) ONE EXTRA SETTING
Needs WINEDLLOVERRIDES, covered in step 01.
Rented server from a hosting company ASK YOUR HOST
Only if they allow RedLoader. Many don't. Choose I rent a server below: step 01 is checking with them.

WHERE DOES YOUR SERVER RUN?

01

Install RedLoader on the server

RedLoader is what lets the server load mods. It goes into the server's own folder, the one that has SonsOfTheForestDS.exe in it.

  1. Stop the server if it's running.
  2. Extract RedLoader.zip straight into the server folder. Extract the contents, not a folder containing them. See the check below.
  3. Windows only: install the .NET 6.0 Desktop Runtime (x64) and the Visual C++ 2015-2019 Redistributable (x64) on the server machine, if they aren't there already.
  4. Linux only: start the server with this environment variable set, for example in your start script:
export WINEDLLOVERRIDES="version=n,b"
SonsOfTheForestDedicatedServer/ ├─ SonsOfTheForestDS.exe ├─ _Redloader/ ← new └─ version.dll ← new
CHECKTwo new items sit right next to SonsOfTheForestDS.exe: the _Redloader folder and version.dll.
CAREFULIf you see a RedLoader folder with those two inside it, the zip went one level too deep. Move them up next to SonsOfTheForestDS.exe.
02

Start the server once, then stop it

On its first run, RedLoader sets itself up and creates the folders mods live in.

  1. Start the server the way you normally do, and wait until it's fully up.
  2. Stop it again.
SonsOfTheForestDedicatedServer/ ├─ Mods/ ← new: mods go here ├─ UserData/ ← new: mod settings are saved here └─ _Redloader/
CHECKThe server folder now has a Mods folder and a UserData folder.
03

Add MPAC

MPAC is one file plus a small folder. Both go into Mods.

  1. Open the MPAC download.
  2. Copy MPAC.dll and the MPAC folder into the server's Mods folder.
Mods/ ├─ MPAC.dll └─ MPAC/ └─ manifest.json
CHECKMPAC.dll sits directly in Mods, next to the MPAC folder.
CAREFULDon't put MPAC.dll inside the MPAC folder, or RedLoader won't find it.

From here on, the steps are the same whether you run your own server or rent one.

04

Start the server and check the log

The log shows whether MPAC loaded, and MPAC creates its files on this start.

  1. Start the server and wait until it's fully up.
  2. Open _Redloader/Latest.log in the server folder and look for these lines: On a rented server, open it in the File Manager, or download it. Some panels also show these lines in their console.
Multiplayer Anti-Cheat v1.0.5 (MPAC) … Running on a dedicated server: manage MPAC from the web dashboard … MPAC: web dashboard link code saved to Mods/MPAC/private/secrets.json (dashboardLinkCode) Installed … game event hooks

MPAC keeps everything inside Mods/MPAC, and README.txt there explains each part: settings for files you edit, private for things you never share, mpac.db for everything it remembers, logs, and backups. It has now created these files:

FILEWHAT IT'S FOR
Mods/MPAC/private/secrets.json PRIVATEYour one-time link code for step 05, the server's password for the dashboard, and your Discord webhook. Never share it or delete it: if the password is lost, the server has to be linked again.
Mods/MPAC/mpac.dbBans, warnings, mutes, the staff log, who shares which base, and each player's history, in one file. Old history is cleaned up for you, and a backup is made every day.
Mods/MPAC/settings/menu_admins.txtAn optional list of staff for the in-game menu. See step 08.
UserData/MPAC.cfgEvery MPAC setting. You'll normally change these on the dashboard instead.

The settings folder is also where your lists and messages go, all optional: banned_words.txt for the chat and name filters, whitelist.txt, welcome.txt, rules.txt, announcements.txt, and the lists for preset reasons, the Punishment Ladder, Reserved Slots, Abandoned Bases and Protection Hours. You can edit them by hand, or right on the dashboard and in the MPAC menu, in the setting that uses each one. Messages can use variables like {name}, {players} and {restart}: the VARIABLES button lists them all.

CHECKAll four log lines are there, and so is secrets.json. The number of game event hooks can differ between versions.
CAREFULNo MPAC lines at all, or no link code? Stop here and see Troubleshooting. Nothing after this step will work until these show up.
06

Add your staff OPTIONAL

Give your moderators their own access, each with only what they need. They sign in with their own Steam accounts.

  1. Open your server on the dashboard and go to the Staff tab.
  2. Paste their SteamID64 or Steam profile link, pick a level, and click ADD.
  3. Or do it in game: select them in the MPAC menu, open Player Actions and click STAFF LEVEL. Only you see that button (and the host, on a hosted game), and it saves to the same Staff tab.
  4. The levels below are the defaults. To change what a level can do, tick or untick it on the Permissions tab and click SAVE. Anything a level can't do is hidden from it, and the Settings tab only appears for levels that can change something there.

Viewer

Sees players, server health, flags, warnings, player history and server chat. Can't change anything.

Moderator

Can also warn, kick and mute players, change their allowances, and see the map and the activity log, plus Who Built This, Who's Talking, Go To and the Nearby Radar in game.

Admin

Can also exempt, ban and unban players, clear warnings, see the staff list, edit banned words, draw zones on the map, manage who shares which base, and vanish, bring players to them and use Staff X-Ray in game.

Owner

You. Everything, including all of MPAC's settings and the game's own settings on the GAME pages, and you're the only one who can change the Permissions tab.

CHECKEach staff member signs in at dash.mpac.games and sees your server in their list.
07

Choose your checks

Everything is set on the dashboard's Settings tab, and changes apply to the running server straight away.

  1. Start with Strictness and Server Type under Main Settings, if you didn't pick them when you linked the server. On every page left on MPAC Defaults, Watch Only logs everything and punishes nobody, Balanced blocks small cheats and gives warnings before a ban (three on a public or PvP server, five among friends), and Strict gives fewer warnings and bans the worst cheats straight away. Server Type (Friends, Public or PvP) fits it to your players.
  2. Each category has a Category Setting: Disabled turns its checks off, MPAC Defaults follows your Strictness on the check pages, and Custom lets you set your own. Change a setting on a page that's on MPAC Defaults and you're asked whether to switch that page to Custom. Every value stays as it was.
  3. Not sure what a setting does? Click What do these do? at the top of a settings page for a plain explanation of each one and a good value to start from.
  4. For your first few days, you can use Watch Only and look over the Flags tab, so you can see what MPAC catches before it punishes anyone. Search the tab, or filter it by check, result or time.
  5. When you're happy, switch to Balanced or Strict. Or set the checks you trust to Punish yourself, and pick Kick, Ban, the Warning System or the Punishment Ladder under Punishments. The ladder's steps are set up right there, step by step. A check's Punish With can send it straight to a kick or ban instead.
  6. On the Movement page, Movement Tolerance can log a player's first catch for flying, clipping or speeding and only punish a repeat, if you'd rather give everyone a little slack.
  7. The GAME pages hold the game's own settings for the world: enemies, survival, seasons and PvP. Each one says whether it applies straight away, to new spawns or only to new worlds, and they're saved with the world rather than in MPAC.cfg.
  8. To filter chat, add the words you want blocked under Banned Words on the Chat page, then pick what happens there. They're kept in Mods/MPAC/settings/banned_words.txt, which you can also edit by hand; MPAC picks up changes within a few seconds.
  9. Files & Backups under GENERAL shows how much space MPAC uses, how long it keeps player history, and its daily backups. As the owner, you can download a backup there too.
CAREFULThe game turns Multiplayer Cheats on in every new world, which lets anyone who joins use the debug console. MPAC turns it off the first time it runs on a world. If you turn it back on under GAME › Players, MPAC's checks turn off until it's off again.
CAREFULYou can also edit UserData/MPAC.cfg by hand, but only while the server is stopped. A running server saves over your changes.
TIPBase Protection keeps players out of other people's bases. On a new server, Protect Bases From on the Base Protection page starts on All Non-Members, so it covers everyone who isn't in that base's group. Players who build together should share their base: one types !base add <name> in chat, and the other types !base accept. Updated from an older MPAC? It keeps the value your MPAC.cfg already had, which may be Guests Only. If it is, turn on Auto Guest under Main Settings or switch it to All Non-Members. Staff can also add players to a base themselves, even while its owner is offline: use the BASES button under Staff Tools in game, or click the base on the dashboard map.
TIPAdding MPAC to a world you've already played? Players may already have gear MPAC never saw them find. Use Watch Only at first, which only logs items, or turn on Items From Before MPAC on the Spawning page before they join.
RENTING?Some hosts wipe or replace files when they update or reinstall the game. Keep a copy of Mods/MPAC/private/secrets.json and UserData/MPAC.cfg on your PC, and download a backup from Files & Backups now and then. Put them back if they ever disappear.

Troubleshooting

Find what you're seeing, then follow the fix.

There are no MPAC lines in the log
  1. Check that _Redloader and version.dll sit directly next to SonsOfTheForestDS.exe (step 01).
  2. Check that MPAC.dll is directly in Mods, not inside the MPAC folder (step 03).
  3. Windows: make sure the .NET 6.0 Desktop Runtime and Visual C++ Redistributable are installed.
  4. Linux: make sure WINEDLLOVERRIDES="version=n,b" is set in the same place that starts the server.
There's no link code in secrets.json
  1. Open UserData/MPAC.cfg with the server stopped, and find dashboard_behavior. If it says "Disabled", change it to "MPAC Defaults".
  2. Start the server again and look for web dashboard link code saved in the log.
  3. The server needs to reach dash.mpac.games over the internet (HTTPS). Check that a firewall isn't blocking outgoing connections.
My rented server won't start after adding RedLoader
  1. Remove _Redloader and version.dll in the File Manager so the server can start again.
  2. Send your host the message from step 01 and ask them to install RedLoader 0.8.6 for you, or confirm it's supported on your server.
The dashboard says the code is invalid or expired

Codes work once and last 24 hours. While the server is running, MPAC replaces an expired code in secrets.json by itself: open the file again and enter the new one straight away. Copy it from the file rather than typing it, to avoid mixing up similar-looking characters.

The dashboard shows the server as offline

Check that the server is running and has loaded a world. Then check the log for lines mentioning the web dashboard: they say whether it can't connect, or whether the server was unlinked.

I lost secrets.json, or the log says it has a mistake in it

A mistake (usually a missing quote or comma after pasting the Discord webhook): the log says which line. Fix it and MPAC picks it up within a few seconds; until then the dashboard and Discord alerts wait, and MPAC never writes over the file. If the file is gone or you delete it, the server registers as a new server and writes a new link code: link it again (step 05) and remove the old entry from your dashboard.

A staff member presses TAB and nothing happens, or it says the server isn't running MPAC
  1. They need RedLoader and MPAC installed in their own game, and their MPAC version has to match the server's.
  2. They need to be on your dashboard's Staff tab, or listed in menu_admins.txt.
  3. If it says the server isn't running MPAC, check the server's log for the MPAC lines from step 04. Once that's fixed, they leave and rejoin, since MPAC only asks a server once per visit.
Staff see "Your role on this server can't change this"

Their level isn't allowed to change that group of settings. The owner can allow it on the dashboard's Permissions tab. The game's own settings on the GAME pages need Change game settings, which no level has until the owner gives it. The Web Dashboard settings themselves can only ever be changed by the owner.

The dashboard or the MPAC menu says MPAC's checks are off

The game's Multiplayer Cheats setting is on, so anyone who joins can use the debug console and MPAC's checks are off. Turn it off under Settings › GAME › Players, and the checks come back on within a second.

Server linked? You're done.