To enable whitelist Minecraft server owners add themselves first with whitelist add YourName, then type whitelist on in the console, and finally check that server.properties says white-list=true so the list stays on after a restart. On TheGameHosting all three happen in the panel: Console for the commands and Files for the file.
This page is only about switching the list on correctly. For adding friends one by one, see how to whitelist someone; for everything else (whitelist.json, error messages, offline mode) there is our full Minecraft server whitelist guide.
First, check whether it is already on
You may not need to do anything. The Minecraft Wiki notes that since Java Edition 26.3 the white-list property is true by default in a newly generated server.properties. On older versions it starts as false. Two quick ways to find out:
- Look at the file. In the panel, go to Files, open
server.propertiesand find the linewhite-list=. - Ask the server. Type
whitelist onin the Console. If it answers “Whitelist is already turned on”, it was on already and nothing changed.
A server upgraded from an older version keeps its existing file, so a world you have had for a while probably still says false.
How to enable whitelist Minecraft server side, step by step
- Open the Console. In the TheGameHosting panel, select your server and click Console. The server must be running.
- Add yourself. Type
whitelist add YourNamewith your exact Java username. Operators can connect even when they are not on the list, but if you ever lose OP you would be locked out of your own world. - Add the people already playing.
whitelist add @aadds everyone online right now. Add offline friends by name. - Switch it on. Type
whitelist on. The reply is “Whitelist is now turned on”. - Make it permanent. In Files, open
server.propertiesand confirmwhite-list=true. Decide onenforce-whitelist(next section) and save. - Restart if you edited the file. The server reads
server.propertiesonly when it starts, so use the panel’s restart button after saving. - Test it. Run
whitelist list, then ask someone who is not on it to try joining. They should see the “not whitelisted” message.
whitelist add YourName
whitelist add @a
whitelist on
whitelist list
white-list=true
enforce-whitelist=true
Console command or server.properties?
Both switch the same thing on. The difference is timing.
| Method | Where on TheGameHosting | Takes effect | Best for |
|---|---|---|---|
whitelist on | Console | Right away | Closing a running server now |
/whitelist on in chat | In game, as OP (permission level 3) | Right away | When you are already playing |
white-list=true | Files → server.properties | After a restart | Making sure it stays on |
The safe habit is to do both: the command to close the door now and the file check so a restart never opens it again. If chat says you lack permission, see how to OP yourself on a Minecraft server.
Kick strangers who are already online
Turning the whitelist on does not, by itself, remove players who are already in the world. That is what enforce-whitelist is for. The Minecraft Wiki explains that when it and the whitelist are both enabled, players not on the list get kicked after the server reloads the whitelist file. In practice:
- Set
enforce-whitelist=trueinserver.propertiesand restart, or keep it atfalseif you prefer a softer close. - With it on, run
whitelist reloadin the Console after turning the list on. Anyone online who is not listed is disconnected. - With it off, unlisted players stay until they log out and then cannot return.
Closing a public server to friends only? Turn both on. Running a family server where nobody unexpected is online? white-list=true alone is enough.
Bedrock and crossplay servers
- Java server with Geyser and Floodgate: the same
whitelist onswitches it on for everyone. Add Bedrock friends withfwhitelist add Gamertag, as the full guide explains. - Bedrock Dedicated Server: the list is called an allowlist and there is no
onoroffcommand. You enable it withallow-list=trueinserver.properties, and operators must be on it too. Follow how to whitelist a Bedrock server.
How to turn the whitelist off again
Type whitelist off in the Console (the reply is “Whitelist is now turned off”) and set white-list=false in server.properties so it does not come back after the next restart. The list itself is kept in whitelist.json, so switching it on later restores the same names.
Heads-up: a whitelist only protects you while the server checks accounts. If online-mode is set to false, anyone can join with a listed name. Our page on Minecraft offline mode explains why.
Lock your server in a minute on TheGameHosting
On TheGameHosting you never touch an FTP client or a terminal for this. Console runs whitelist on, Files edits server.properties in the browser, and the restart button is one click away. Before changing settings on a world you care about, click Backups → Create backup. If a co-admin manages the list with you, give them access in Users instead of sharing your login.
Your server stays online 24/7 in Dallas or Amsterdam with DDoS protection, on the same AMD 9950X/7950X3D hardware in every plan. See Minecraft server hosting, compare RAM on plans and pricing from $1.90 USD/month, and use FULL2026 for 15% off for life.
FAQ
How do I enable the whitelist on my Minecraft server?
Add yourself with whitelist add YourName, type whitelist on in the console, then confirm white-list=true in server.properties so it stays on after a restart.
Is the whitelist on by default?
On Java Edition 26.3 and newer, a new server.properties has white-list=true. On older versions the default is false.
Do I need to restart after enabling the whitelist?
Not if you use the whitelist on command; it works right away. If you change server.properties by hand, restart so the server reads it.
Why can I still join when I am not on the whitelist?
On Java Edition, operators can always connect while the whitelist is active. Bedrock is stricter: everyone must be on the allowlist.
Hosting for these games
Minecraft Java hostingPaper, Purpur, Fabric, Forge and more
Minecraft Bedrock hostingPhones, consoles and Windows
Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.
All posts
TheGameHosting Team