Portal Knights does not provide a documented Minecraft-style slash-command console. Server administration is handled through server_config.json, role passwords and permissions, the host’s in-game player menu, and two launch options for the dedicated-server executable. You can give separate groups login, kicking and world-editing rights; kick a player from the pause-menu player list; and run more than one world by assigning each instance its own configuration, save folder, log and port. For remote play, the normal default is UDP port 16365, the host’s public IPv4 address and the password for the intended role.
Does Portal Knights have admin commands?
No documented in-game slash-command list exists for Portal Knights. Searches for commands such as /kick, /ban, /op, /give or /stop therefore lead to the wrong administration model: the published dedicated-server material describes configuration files, role permissions and executable launch flags instead of a chat or console command API.
The practical split is:
- Persistent permissions: set in
server_config.jsonfor theadmins,usersandguestsroles. - Session control: the player who becomes host can use the in-game menu to remove a player.
- Server startup: select a configuration and log file with
-configand-log.
A hosting administration guide describes Portal Knights as having limited traditional admin commands. That is a third-party operational summary; the developer-published instructions document the file and executable approach rather than a slash-command language.
How does Portal Knights’ administration model work?
A dedicated server reads its role definitions when it starts. A connecting player supplies a password, and the matching role determines whether that player may log in, kick others or modify the world. The first player to connect after a fresh world or a restart typically receives the host-level controls described by the hosting guide.
What the three roles mean
| Role | Typical purpose | Available rights |
|---|---|---|
admins |
Trusted operators | Login, kicking and world modification can all be enabled. |
users |
Regular invited players | Login and world editing can be enabled while kicking remains disabled. |
guests |
Untrusted or temporary access | Often left unable to log in until you intentionally grant access. |
Each role has its own credentials.password value and Boolean rights. Use different passwords for each group so that giving someone the user password does not also give them administrator privileges.
What each permission flag controls
| Field | Effect |
|---|---|
canLogin |
Allows that role to enter the server. |
canKickPlayers |
Allows that role to remove other players through the available host controls. |
canModifyWorld |
Allows mining or building blocks and props. |
canInteractWithLockables |
Listed in the official format, but the documentation marks it as not currently functional. |
Permissions are not individual player records. Anyone who knows a role’s password receives that role’s enabled rights, so distribute the administrator password only to people who need it.
How do I set up a Portal Knights dedicated server?
The official Steam procedure uses the dedicated-server archive included with the PC game installation. Perform the first launch before editing the configuration so the executable can create its working files.
- Open Steam, go to your Portal Knights library entry, open Properties, choose Local Files, and select Browse Local Files.
- Copy
dedicated_server.zipto the folder where you want the server to run. - Extract the archive in that folder.
- Run
pk_dedicated_server.exeonce. The first run creates a log file, a configuration file and a save-data directory. - Close the executable before making edits.
- Open the generated
server_config.jsonin a text editor and change the values you need. - Save the file, then start
pk_dedicated_server.exeagain.
Keep a copy of the original file before making substantial changes. A malformed edit can prevent the server from starting, while a known-good copy gives you a quick recovery path.
How do I edit server_config.json?
The file is ordinary JSON with one top-level block for basic server data, a universe-size setting, a console-window setting and three role blocks. The official format uses ASCII or UTF-8 text. Keep property names, braces, commas and Boolean values exactly in JSON form; use true or false, not quoted versions of those words.
Basic server settings
| Path | Purpose | Operational detail |
|---|---|---|
basicServerData.name |
Displayed server name | Choose a recognizable name for players adding the server. |
basicServerData.ipv4 |
Local interface to which the server listens | The official example uses 0.0.0.0 to listen on all local traffic. |
basicServerData.port |
Game network port | The documented default is 16365. |
basicServerData.saveFolderPath |
Location of world data | Use a different path for every server instance on the same computer. |
universeSize |
World-size choice | Accepted values are Small, Normal and Large. |
hideConsoleWindow |
Whether the server console is hidden | Use false while diagnosing startup or network issues. |
When hideConsoleWindow is true, the official instructions warn that the server cannot be closed from a visible console; you must terminate the process through the operating system’s task manager.
Role blocks and a working example
This example follows the developer-published structure. Replace the sample passwords before allowing anyone to connect.
{
"basicServerData": {
"name": "Servername",
"ipv4": "0.0.0.0",
"port": 16365,
"saveFolderPath": "./savedata"
},
"universeSize": "Normal",
"hideConsoleWindow": false,
"admins": {
"credentials": { "password": "replace-this-admin-password" },
"canLogin": true,
"canKickPlayers": true,
"canModifyWorld": true,
"canInteractWithLockables": true
},
"users": {
"credentials": { "password": "replace-this-user-password" },
"canLogin": true,
"canKickPlayers": false,
"canModifyWorld": true,
"canInteractWithLockables": true
},
"guests": {
"credentials": { "password": "" },
"canLogin": false,
"canKickPlayers": false,
"canModifyWorld": false,
"canInteractWithLockables": false
}
}
The lockable-interaction entries are included because they belong to the published schema, but the documentation says that capability is not currently functional. Changing that Boolean should not be treated as a way to unlock doors or containers.
What are the Portal Knights server console commands?
The documented command surface is limited to launch-time options. These are typed when starting the executable, not during gameplay.
pk_dedicated_server -config myOwnConfig.json -log testServer.log
| Option | Use | What happens |
|---|---|---|
-config myConfig.json |
Selects a configuration file | If the named file does not exist, the server creates a default configuration with that name. |
-log mylogfile.log |
Selects the output log | Server output is written to the specified log file. |
You can combine both options, as in the example, or use the executable without them to rely on its default file names. Keep the configuration and log files together when possible so that each instance is easy to identify.
How do I kick someone from a Portal Knights server?
Kicking is an in-game host action rather than a typed command. The player with host-level controls should perform these steps:
- Open the pause menu.
- Open the player list.
- Select the player who should be removed.
- Choose Kick.
If Kick is missing, verify that the intended host was the first player to connect after the world was created or the server was restarted. Also check that the connecting account used a role whose canKickPlayers value is true. The menu will not appear merely because a player knows the server name; the account must have the appropriate host or role authority.
How do I let friends join over the internet?
Remote players need the host’s external IPv4 address, the password for the role they should use and a reachable UDP port. The default documented game port is UDP 16365; if you changed basicServerData.port, forward the replacement port instead.
- Give the server computer a stable local address on your home network, or create an equivalent DHCP reservation.
- Forward the configured UDP port in the router to that computer.
- Start the dedicated server and confirm that it is listening on the same port shown in the JSON.
- Share the router’s public IPv4 address with players, not the private local address used as the forwarding destination.
- Have players open Play > Multiplayer (same Wi-Fi) > Join > Servers > Add Server, then enter the host details and the appropriate role password.
The official support instructions distinguish the local address used for port forwarding from the public address players enter. Sharing the wrong one is a common reason a server appears to be offline. Firewalls on the host computer and router must also permit the selected UDP port.
Can mobile players host the dedicated server?
No. The private dedicated-server instructions state that mobile clients can join a desktop-hosted server but cannot host a private dedicated server themselves. The server and mobile game versions must match, and the support article states a limit of up to four players per game.
How do I run two Portal Knights servers on one PC?
Each process needs its own identity. Running two executables with the same save path risks mixing world data, while binding the same port prevents one process from accepting connections.
- Create a separate JSON file for each world, such as
world-one.jsonandworld-two.json. - Give each file a different
saveFolderPath. - Assign a different UDP port in each file.
- Give each process a separate log file.
- Launch each process with its matching
-configand-logvalues. - Forward every external port to the same host computer, or otherwise expose the ports required by your network design.
| Resource | World one | World two |
|---|---|---|
| Configuration | world-one.json |
world-two.json |
| Save folder | ./savedata-one |
./savedata-two |
| Log file | world-one.log |
world-two.log |
| Port | One unused UDP port, such as the default | A different unused UDP port |
The developer guide specifically calls out saveFolderPath when explaining multiple instances. In practice, separating the configuration, log and port as well makes troubleshooting and backups much less error-prone.
What should I check when administration or networking fails?
There are no admin controls
- Confirm that the person who needs host controls connected first after a fresh world or restart.
- Check that the password used at login belongs to the intended role.
- Verify that the relevant role has
canLoginand, for kicking,canKickPlayersset totrue. - Stop the executable, save the JSON, and restart it after changing permissions.
Players cannot connect
- Make sure the dedicated server process is running.
- Use the public IPv4 address for players and the local host address only as the router’s forwarding destination.
- Confirm that the forwarded protocol is UDP and that its number matches
basicServerData.port. - Check the password for the role the player is attempting to use.
- Confirm that the server and every client are on compatible game versions.
- Temporarily leave
hideConsoleWindowset tofalseso startup and network messages remain visible.
Permissions are too broad
Separate the administrator and user passwords, then disable rights that a group does not need. A normal player can usually have canLogin: true and canModifyWorld: true without receiving canKickPlayers. Keep the guest role unable to log in until you have a specific reason to open it.
Two worlds interfere with each other
Inspect every running process and compare its configuration, log, save path and port. If two instances share a save folder or attempt to bind the same port, stop them, assign unique values and restart.
The console window vanished
Set hideConsoleWindow to false, restart the server and reproduce the problem while watching the console. If the window is already hidden, the official instructions require ending the server process through the task manager.
Should I self-host or use managed hosting?
Self-hosting gives you direct control over the executable and files, while a managed service can remove some router and machine-maintenance work. The game’s role and host permissions still matter either way, so verify exactly which controls a provider exposes before moving a world.
| Consideration | Self-hosted executable | Managed service |
|---|---|---|
| Setup | Download and extract the archive, then edit JSON. | Use the provider’s control panel and configuration editor. |
| Network work | You handle the firewall, router and UDP forwarding. | The provider supplies connection details, but you must verify the exact ports and controls. |
| Administration | Role permissions in JSON plus the in-game host menu. | Provider panel features plus the same game permissions where supported. |
| Backups | You copy the folder named by saveFolderPath. |
Read the provider’s backup and restore policy before relying on it. |
| Version control | You keep the server and clients compatible. | A provider’s update policy may help, but compatibility still needs to be checked. |
For a small private group with an available desktop and router access, the included executable is the most transparent option. Managed hosting is mainly a convenience choice for people who do not want to maintain a machine or network connection; it does not create a documented slash-command system.
What is the safest way to maintain a Portal Knights server?
- Protect role passwords: send the administrator credential only to trusted operators and use a separate password for ordinary users.
- Back up saves: copy the directory referenced by
saveFolderPathbefore changing world settings or moving files. - Keep the console visible during changes: use
hideConsoleWindow: falseuntil startup and connectivity are stable. - Record each instance’s identity: maintain a short note of its config file, save folder, log file and port.
- Match versions: do not invite clients until the desktop server and their game builds are compatible.
- Change one variable at a time: if a connection fails, check the process, password, public address, forwarded UDP port and game version separately rather than changing all of them at once.
These practices fit the way Portal Knights is designed: administration is file- and host-based, so clear credentials, unique paths and visible logs are more valuable than searching for undocumented chat commands.
Frequently Asked Questions
What text encoding should I use for server_config.json?
The official setup notes allow ASCII or UTF-8 entries. Save the file in one of those encodings and preserve valid JSON punctuation when editing it.
What does the universeSize setting actually specify?
The configuration accepts Small, Normal or Large. The published instructions identify those choices but do not give exact map dimensions or explain a conversion procedure for an existing world, so treat the setting as a world-creation choice rather than assuming a precise size.
Can I change a role’s password without replacing the world?
The password is stored in the role’s credentials block, separate from the save-folder path. Stop the server, edit only the relevant password, save the file and restart; the world data remains in its existing save directory.
Why should each server instance have its own log file?
Separate logs let you associate startup and connection messages with the correct world when several executables run on one computer. They also make it easier to identify which configuration produced a port or authentication error.