With geoblocking, you decide from which countries players may join your server. You can either allow only certain countries or block individual countries. All settings for this are in the config_gameplay.txt file. You can find the basics of editing the configuration files in the Edit configuration files guide.
The geoblocking settings
In config_gameplay.txt you will find the #Geoblocking section. By default, it looks like this:
#Geoblocking
#If your server is on the public list, please refer to Verified Server Rules for more details.
#Modes: none, whitelist, blacklist
geoblocking_mode: none
#If enabled, players on the whitelist are able to ignore geoblocking.
geoblocking_ignore_whitelisted: true
#ISO country codes, eg. PL, US, DE
geoblocking_whitelist:
- AA
- AB
- AC
geoblocking_blacklist:
- AA
- AB
- AC
| Setting | Meaning |
|---|---|
geoblocking_mode |
none (default) – geoblocking is off.whitelist – only players from the countries in geoblocking_whitelist may join.blacklist – players from the countries in geoblocking_blacklist are rejected, everyone else may join. |
geoblocking_ignore_whitelisted |
If true (default), players from your UserIDWhitelist.txt bypass geoblocking. |
geoblocking_whitelist |
List of allowed countries for the whitelist mode |
geoblocking_blacklist |
List of blocked countries for the blacklist mode |
You enter the countries as two-letter ISO country codes, e.g. DE for Germany, AT for Austria, CH for Switzerland, PL for Poland or US for the USA. Each country goes on its own line, indented by one space and preceded by a hyphen. The entries AA, AB and AC are only placeholders and must be replaced.
Set up geoblocking
-
Find out the game port
Open the dashboard of your server and note the game port shown under Overview. -
Stop the server
Stop your server via the dashboard. -
Connect via SFTP
Connect to your server via SFTP. -
Open the configuration file
Open the following file – replace<Port>with your game port:/.config/SCP Secret Laboratory/config/<Port>/config_gameplay.txtFind the
#Geoblockingsection in it. -
Choose the mode
Setgeoblocking_modetowhitelistif you only want to allow certain countries, or toblacklistif you want to block certain countries:geoblocking_mode: whitelist -
Enter the countries
In the matching list, replace the placeholdersAA,ABandACwith the country codes you want. You can add or remove as many lines as you like. -
Start the server
Save the file and start your server via the dashboard.
Exceptions to geoblocking
Players on the whitelist: If geoblocking_ignore_whitelisted is set to true, all players from UserIDWhitelist.txt may join regardless of their country. This lets you allow individual friends from abroad without opening up their whole country.
For the geoblocking exception it is enough to add the ID to UserIDWhitelist.txt in the same port folder (one ID per line, e.g. 76561198000000001@steam). You do not need to enable enable_whitelist – if you leave it on false, all other players from allowed countries can still join.
Northwood ban team: The config_remoteadmin.txt file in the same port folder has the setting (default true):
enable_banteam_bypass_geoblocking: true
This allows members of Northwood's official ban team to bypass your geoblocking. Leave this setting set to true.
Detect rejected players
If a player tries to join from a blocked country, they are rejected and the server records the attempt in the console of the dashboard and in the server log, e.g.:
Player 76561198000000001@steam (203.0.113.10) tried joined from blocked country US.
This lets you check whether your geoblocking works as intended. The Read the server log guide explains how to read the log.
Further options
Geoblocking restricts access by country. If you want to restrict access to individual players, use the whitelist. The Protect your server without a password guide explains why there is no server password and which alternatives you have.
