🇩🇪 DE 🇬🇧 EN
NexoraHost / Docs home
Popular searches:Minecraft won't startCreate Minecraft serverFiveM txAdminInstall WordPressSet up subdomainVPS GermanySSL errorOpen port 25565Discord bot hostingDNS troubleshooting

Setting Up a Whitelist – How to Protect Your Server

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?

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

Common Problems

Whitelist not working (Minecraft):

Player not recognized (FiveM):

ARK whitelist not working:

NexoraHost

Order your game server

Minecraft, ARK, FiveM & 24+ games – 1-click install, mods allowed, from €4.99/mo.

nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime