You can host a Portal Knights server on your own VPS with ZapX. The Dedicated Server is included with the PC version of Portal Knights and runs on Windows. This guide explains what you need, how to set up the server on your VPS, and how your friends can connect.
Portal Knights is not (yet) available in the Game Server Installer. You’ll need to set up the server manually, as described in this guide. The steps are based on the official guide from 505 Games in the Portal Knights Steam forum.
| Requirement | Portal Knights |
|---|---|
| Operating system | Windows |
| Server files | dedicated_server.zip from your Portal Knights installation |
| Game copy | A purchased PC version of Portal Knights (Steam) |
| Access | Remote Desktop |
The Portal Knights server only runs on Windows. If your VPS runs Linux, install a Windows Server template via Settings > Reinstallation. This deletes all data on the VPS. Learn more in Server Reinstallation.
A Dedicated Server provides a shared world for up to 4 players, without any of you needing to keep the game open.
- On your own PC, open the Properties for Portal Knights in Steam, go to Installed Files, and click Browse. Copy the file
dedicated_server.zip. - Connect to your VPS using Remote Desktop and copy the ZIP file there, for example, using the Remote Desktop connection’s clipboard.
- Extract the file to a folder of your choice, for example,
C:\PK Dedicated Server\. - Run
pk_dedicated_server.exe. The first time it starts, the server creates a log file, the configuration fileserver_config.json, and a folder for saved games. - Close the server so you can edit the configuration.
Open server_config.json in a text editor. All entries must use ASCII or UTF-8. The most important settings are:
| Setting | Description |
|---|---|
name | Server name |
ipv4 | IP address the server listens on; 0.0.0.0 means all addresses |
port | Server port; default is 16365 |
saveFolderPath | Folder for saved games |
universeSize | World size: Small, Normal, or Large |
hideConsoleWindow | true hides the console window |
For each of the admins, users, and guests groups, set a password (credentials.password) and permissions. For example, you can set whether the group can log in (canLogin), kick players (canKickPlayers), or build and destroy (canModifyWorld). Keep the admin password secret.
Save the file and run pk_dedicated_server.exe again for the settings to take effect.
If you set hideConsoleWindow to true, you can only stop the server using Task Manager.
To continue playing in an existing world, copy it to the server:
- On your PC, open the folder
Steam\userdata\[STEAM-ID]\374040\remote. - Copy all the files from there to the server’s saved-game folder, for example,
C:\PK Dedicated Server\savedata. - Start the server.
The server does not use Steam Cloud. Changes to the world are saved in the saved-game folder on the VPS.
Start the server with pk_dedicated_server.exe. To have it start automatically after the VPS restarts, create a task in Task Scheduler with the trigger At startup that runs pk_dedicated_server.exe in the server folder.
You can run multiple servers on one VPS. Each server needs its own configuration file, port, and saved-game folder. Select the configuration file at startup with -config and the log file with -log, for example, pk_dedicated_server -config myOwnConfig.json -log testServer.log.
Give your fellow players your VPS IP address from Overview in the ZapX dashboard, the port, and the password for their user group. In the game, they can add the server to the server list from the multiplayer menu under Join. Public servers and matchmaking are not available, and the server and game must be on the same version.
| Port | Protocol | Use |
|---|---|---|
| 16365 | UDP | Game (value from server_config.json) |
Open the port in Windows Firewall. Learn more in Manage Windows Defender Firewall rules. If you use your VPS’s Network Firewall in the ZapX dashboard, open the port there too.
Updates are not installed automatically. When Portal Knights is updated, copy the new dedicated_server.zip from your updated game installation to the VPS and extract it over the old server files. Back up server_config.json and the saved-game folder first.
Back up the saved-game folder (for example, savedata) and server_config.json regularly, preferably while the server is stopped. 505 Games expressly recommends making regular manual backups.
Your entire VPS is also backed up automatically every day. With an active ZapX Pass, you can restore these backups yourself and create your own backups. Learn more in Daily backups, restoring data, and restricted actions.
Your Portal Knights server is now running on your VPS. If something isn’t working as expected, see Portal Knights: Common Issues. If you have questions or need help, our support team is here for you every day! 🙂