Skip to content

Setting Up a Whitelist – How to Protect Your Server

Setting Up a Whitelist – How to Protect Your Server – Step-by-step guide for your Fivem on NexoraHost.

Game servers

Quick answer: Set up your server step by step – check requirements, install files, configure ports and start the service.

A whitelist is a list of players who are the only ones allowed to join your server. Everyone else is automatically rejected. This guide shows you how to set up a whitelist for various games – from Minecraft to FiveM to ARK.

What is a whitelist?

A whitelist is the opposite of a blacklist (ban list). Instead of excluding certain players, you only allow specific players access. Everyone else is automatically rejected. This is the safest method to keep your server private.

When is a whitelist useful?

  • Private servers for friends or communities
  • Servers in testing phase – only testers are allowed
  • Content creator servers – only selected players
  • Protection against griefing and unwanted guests
  • RP servers with an application process – only accepted players

Minecraft Whitelist

Via Console (while the server is running)

# Enable whitelist
whitelist on

# Add player
whitelist add PlayerName

# Remove player
whitelist remove PlayerName

# Show all players on the whitelist
whitelist list

# Disable whitelist
whitelist off

# Reload whitelist (after manual changes to the file)
whitelist reload

Via whitelist.json (server must be offline)

The whitelist is stored in the whitelist.json file in the server directory:

[
    {
        "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "name": "Player1"
    },
    {
        "uuid": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
        "name": "Player2"
    }
]

You can edit this file directly. Find a player's UUID on sites like mcuuid.net.

Via server.properties (on server startup)

# In server.properties
white-list=true
enforce-whitelist=true

enforce-whitelist=true immediately kicks all players who are not on the whitelist.

FiveM Whitelist

FiveM has no built-in whitelist. Most servers use their framework for this:

With QBCore

  1. Open server.cfg
  2. Make sure QBCore is loaded
  3. In the database table players there is a column for whitelist status
  4. Set players to "whitelisted" in the database:
    UPDATE players SET whitelist = 1 WHERE citizenid = 'ABC123';

With a Simple Lua Script

Create a whitelist.lua in your resource folder:

local Whitelist = {
    "license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "license:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
}

AddEventHandler('playerConnecting', function(name, setKickReason, deferrals)
    local license = GetPlayerIdentifierByType(source, 'license')

    deferrals.defer()
    deferrals.update('Checking whitelist...')

    for _, id in ipairs(Whitelist) do
        if id == license then
            deferrals.done()
            return
        end
    end

    deferrals.done('You are not on the whitelist.\nApply on our Discord: discord.gg/yourlink')
end)

ARK Whitelist

Via GameUserSettings.ini

# In ShooterGame/Saved/Config/WindowsServer/GameUserSettings.ini

[ServerSettings]
bWhitelist=true
WhitelistFile=whitelist.txt

Create whitelist.txt

Create the file in the ShooterGame/Saved/ folder:

# One Steam64 ID per line
76561198012345678
76561198087654321

Find the Steam64 ID on sites like steamid.io or by opening the console in-game and typing ShowMyAdminManager.

CS2 Whitelist

CS2 has no native whitelist, but you can simulate it with a password and the reserved slots system:

Via server.cfg

# Set password
sv_password "my_secret_password"

# Reserved slots for specific players (via SteamID)
sv_reservation_file "reserved_slots.txt"

reserved_slots.txt

STEAM_0:1:12345678
STEAM_0:1:87654321

General Tips for Whitelists

  • Create backups: Regularly back up your whitelist file
  • Application process: For larger servers, an automated system (Discord bot, web form) is worthwhile
  • Test the whitelist: Have a friend try to join who is not on the list
  • Document: Note down when and why you added players

Common Problems

Whitelist not working (Minecraft):

  • Check with whitelist list if the player is correctly entered
  • Restart server after changes to whitelist.json or run whitelist reload
  • OPs bypass the whitelist by default – set enforce-whitelist=true in server.properties

Player not recognized (FiveM):

  • The license changes when the player reinstalls FiveM
  • Better: Use Steam identifier or Discord ID as whitelist criteria

ARK whitelist not working:

  • Restart server after changes to whitelist.txt
  • File must be in the correct folder: ShooterGame/Saved/

Keep reading

Popular and fresh – not just the oldest guides.

More

Explore NexoraHost