VGKAMI
Advertise Get listed

Game Guides

How to Make a Portal Knights Server: Step-by-Step Setup Guide

Published 13 min read

The most flexible way to make a Portal Knights server is to run the dedicated-server program included with the Steam desktop installation. Copy dedicated_server.zip from the game folder, extract it, run pk_dedicated_server.exe once, edit the generated server_config.json, and then forward the configured UDP port to the host computer. A dedicated world supports four players and remains available for asynchronous play, so friends can enter it even when the original host is offline.

This setup gives you direct control over passwords, permissions, save files, ports, and backups. It also requires Windows file management, JSON editing, firewall rules, and router configuration. The official 505 Games/Keen Games guide cautions that setting up a server takes technical knowledge and time, but the procedure below follows that documented workflow and explains the common failure points.

What do I need before setting up a Portal Knights server?

Prepare the host computer and network before changing any files. The dedicated-server package is supplied with the Steam desktop edition; you do not need to download an unrelated server build. Players connecting from mobile devices can join a desktop-hosted private server, but mobile clients cannot host one themselves.

  • A Steam desktop installation of Portal Knights.
  • A separate folder in which to run the dedicated server and store its saves.
  • Permission to edit files, run the executable, and allow it through the host computer’s firewall.
  • Access to the router if people will connect over the internet.
  • The same game/server version for every connecting client. Version mismatches prevent a mobile client from joining a private server.
  • A plan for passwords and backups. Dedicated-server saves are outside Steam Cloud synchronization.

If everyone is on the same home network, you can test locally before configuring internet access. For a temporary session in which the host will always be present, ordinary Steam multiplayer is simpler: 505 Games instructs the host to select Friends privacy and remain Online; for a LAN session, select Local privacy.

How do I copy and extract the dedicated-server files?

  1. Open Steam and open the game’s Properties.
  2. Select Local Files, then choose Browse Local Files.
  3. Locate dedicated_server.zip. Copy it to a separate server directory rather than editing the archive inside the game installation.
  4. Extract the archive in that directory. Keep the extracted executable and its supporting files together; the relative save path in the default configuration expects this layout.

Using a separate directory makes it easier to back up the server, keep multiple worlds apart, and update or replace the game installation without losing your save data.

What happens the first time I run the server?

Run pk_dedicated_server.exe once from the extracted directory. The first launch creates a log file, a configuration file named server_config.json, and a save-data folder. Wait for those items to appear, then close the server process before editing the configuration. Editing while the process is running can leave you unsure which values were actually loaded.

The generated files are the server’s working state. Keep the executable’s directory in a location where the account running it has write permission, and note the exact save-folder location before importing an existing world.

How do I edit server_config.json?

Open server_config.json in a plain-text editor that preserves ASCII or UTF-8 text. The official settings separate basic network information, world size, console behavior, and group permissions. A minimal structure looks like this:

{
  "basicServerData": {
    "name": "Servername",
    "ipv4": "0.0.0.0",
    "port": 16365,
    "saveFolderPath": "./savedata"
  },
  "universeSize": "Normal",
  "hideConsoleWindow": false,
  "admins": {
    "credentials": {"password": "change-this"},
    "canLogin": true,
    "canKickPlayers": true,
    "canModifyWorld": true
  },
  "users": {
    "credentials": {"password": ""},
    "canLogin": true,
    "canKickPlayers": false,
    "canModifyWorld": true
  },
  "guests": {
    "credentials": {"password": ""},
    "canLogin": false,
    "canKickPlayers": false,
    "canModifyWorld": false
  }
}

The sample demonstrates the shape of the file, not safe credentials. Replace the administrator password before allowing anyone else to connect, and check every comma, brace, and quotation mark after editing. Invalid JSON can prevent the server from starting with the intended settings.

Which basicServerData values should I use?

Setting What it controls Recommended treatment
name The name shown for the server. Use a recognizable name that tells friends which world they are entering.
ipv4 The local interface address on which the process listens. 0.0.0.0 listens on all local interfaces, which is the documented default. It is a bind address, not the address you send to internet players.
port The UDP port used by the server. The documented default is 16365. You may choose another available port, but the router rule and the value in the configuration must match.
saveFolderPath The directory containing the dedicated world’s data. ./savedata stores it beneath the server directory. Use a distinct path for every instance.

What universe size should I choose?

Set universeSize to Small, Normal, or Large. Choose before creating a new dedicated world according to the exploration scale you want; the setting belongs to the server configuration rather than to a router or Steam privacy option.

Should I hide the console window?

hideConsoleWindow can be set to true when you do not want a visible console. The documented way to stop a hidden server is to terminate its process in Windows Task Manager, so leaving the console visible is more convenient while you are learning the setup and diagnosing errors.

How do passwords and permissions work?

The configuration defines three groups: admins, users, and guests. Each group has credentials and Boolean rights. The available rights cover logging in, kicking players, and modifying the world; the guide also documents lockable interactions, but notes that this function is not currently working.

  • Admins: reserve for the owner or trusted operators. The example grants login, kicking, and world modification.
  • Users: give regular friends the minimum access they need. The example allows login and world modification but not kicking.
  • Guests: leave login disabled when you do not want untrusted players entering. Enable only the rights you deliberately want to expose.

Use different passwords for the groups when you need different privilege levels. Keep the administrator password private; anyone who receives it can authenticate as an administrator and use the rights enabled for that group.

How do I start the configured server?

  1. Save server_config.json and close the editor.
  2. Launch pk_dedicated_server.exe again from the extracted server directory.
  3. Watch the console or the generated log for startup errors. Confirm that the process remains running and that the configured save folder is present.
  4. Keep the process running while friends connect. If you changed the port, save path, or passwords, restart the process so it reads the revised file.

If the console is hidden, use Task Manager to end the server process when you need to stop it. A visible console is usually preferable until the server is stable because it gives you immediate feedback during startup.

How do I make the server reachable over the internet?

Internet hosting normally requires one router rule and one firewall rule. The router must send the server’s UDP traffic to the host computer’s private IPv4 address, while players outside your home network use your external IPv4 address.

  1. Find the host computer’s current local IPv4 address in your network settings. This is the address inside your home network, commonly assigned by DHCP.
  2. In the router’s port-forwarding page, create a rule for UDP port 16365, or for the alternative port you selected in server_config.json.
  3. Set the forwarding destination to the host computer’s local IPv4 address. Do not enter 0.0.0.0 as the destination; that value tells the server to listen on all local interfaces.
  4. Allow pk_dedicated_server.exe through the host operating system’s firewall for the required network profile.
  5. Keep the local address stable. A DHCP change can leave the router forwarding to the wrong computer, making a previously working server appear offline.
  6. Give friends your external IPv4 address and the password for the group they should use. Never send them the private local address from the forwarding rule when they are connecting from outside your network.

If you select a different port, apply that same value consistently in the JSON, the router rule, and any firewall exception. A mismatch in any one of those locations produces a connection failure even when the server process itself is running.

What is the difference between the local and external address?

The local IPv4 address identifies the host inside your router’s network and is used only as the forwarding destination. The external IPv4 address is assigned to your internet connection and is the address remote players enter. The server’s ipv4 bind value controls listening behavior; it does not replace either address in the instructions you give friends.

How do friends join, and what platform limits apply?

Give each player the external IPv4 address, the configured port if the game asks for it, and the password for the intended group. Explain which password maps to which permission level so regular players do not accidentally use the administrator credential.

The dedicated-server documentation supports four players in one world and is designed for asynchronous play, meaning the world can remain available while the original host is offline. 505 Games’ private-server guidance says mobile players may join a private server hosted on a desktop, but they cannot host a private dedicated server themselves. The desktop game and the mobile client must be on matching versions.

For a LAN-only test, keep the server and clients on the same local network and verify the process works before adding internet forwarding. This separates game configuration problems from router and firewall problems.

How do I import an existing Portal Knights world?

You can copy an existing world into the dedicated server’s save directory, but stop the dedicated server first. Copying while it is running risks having the process continue to write the old state or overwrite the files you just placed.

  1. Exit pk_dedicated_server.exe.
  2. Locate the local Steam Cloud files. The developer forum guide places them under Steamuserdata<Steam user ID>374040remote.
  3. Identify the world files you intend to move and copy them into the dedicated server’s configured saveFolderPath, normally the extracted directory’s savedata folder.
  4. Preserve the original files in a separate backup location until the dedicated instance loads the world successfully.
  5. Start the server and verify the expected world name, progress, and player access before deleting or replacing any original copy.

Dedicated-server saves are not synchronized with Steam Cloud. Once the world is running from the named save folder, changes remain there unless you copy them elsewhere yourself. Make periodic offline copies of the entire save folder, especially before changing configuration, moving the server, or installing a different game version.

Can I run more than one dedicated server on the same PC?

Yes, but every instance needs its own configuration file, log file, port, and save-folder path. Reusing a port or save directory makes the instances compete for the same network endpoint or world data.

For example, a second instance can be started with:

pk_dedicated_server -config world2.json -log world2.log

Set a different UDP port in world2.json, point saveFolderPath to a different directory, and create a matching router/firewall rule if players will reach that instance from the internet. Keep each world’s backups separate so restoring one does not replace another.

Should I self-host or use managed hosting?

Self-hosting is the right choice when you want direct access to the executable, JSON settings, save files, passwords, and network rules. A managed service can reduce operating-system and router work by providing a control panel, but you delegate infrastructure and must check its current game-version support, availability, pricing, and backup/restore policy.

Consideration Self-hosted server Managed server
Control You edit the executable’s configuration, permissions, saves, and network rules directly. The provider supplies a panel and controls the underlying machine; available settings depend on that panel.
Setup effort Requires extracting files, editing JSON, configuring a firewall, and forwarding a port. Usually supplies connection information and a guided panel, reducing local networking work.
Backups You must copy the save folder yourself because it is outside Steam Cloud. Read the provider’s backup and restore terms; do not assume a hosted world is automatically protected.
Access control Group passwords and rights are visible in server_config.json. The panel may expose equivalent controls, but the exact interface and limits vary by provider.
Mobile access Mobile players can join only when the host is a desktop server and versions match. The same game-version and desktop-host requirements still apply; hosting does not remove them.

A managed service is therefore a convenience trade-off, not a different game rule set. Confirm that it supports the current Portal Knights server build and that you can retrieve your world files before committing to it.

What should I check when the server does not work?

The executable closes immediately

  • Open the generated log and read the startup error.
  • Check that server_config.json is valid JSON with matching braces, commas, and quotation marks.
  • Confirm that the save path exists and that the account running the process can write to it.

Friends cannot connect from outside the network

  • Verify that the router forwards UDP, not only TCP.
  • Confirm that the forwarded port matches the value in the configuration.
  • Check that the destination is the host’s current local IPv4 address and that DHCP has not assigned a new one.
  • Allow the executable through the host firewall.
  • Make sure friends are using the external IPv4 address rather than the private address.

Local players can join, but remote players cannot

This pattern points to router forwarding, firewall rules, or the external address rather than the world files. Test on the local network first, then recheck the forwarding destination and the public address you distributed.

A player receives a version-related error

Bring the desktop server and every client to matching game versions. This requirement is explicit for mobile players joining private desktop-hosted servers; a mismatch should be treated as the first check before changing ports or permissions.

The wrong world opens

Stop the process, inspect saveFolderPath, and confirm that the intended files are in that exact directory. When running multiple instances, verify that each command-line configuration points to a unique save folder and that you did not copy a world into a different instance’s directory.

A friend can enter but has too much access

Review the password used and the rights enabled for its group. Move regular players to the users or guests credentials as appropriate, and never distribute the administrators password.

I cannot stop a hidden server

Use Windows Task Manager to terminate the server process, which is the documented stop method when the console window is hidden. For routine administration, consider leaving the console visible so startup and shutdown are easier to observe.

How should I maintain and secure the server?

  • Keep the administrator password private and use separate group passwords when privilege levels differ.
  • Back up the entire dedicated save folder on a schedule; Steam Cloud will not create those copies for you.
  • Record the configured port, save path, and host address so a router or DHCP change can be repaired quickly.
  • Before importing a world or changing configuration, stop the process and preserve a known-good copy.
  • When moving to another machine or provider, transfer the save data deliberately and verify the destination path before starting the new instance.

An optional Cat 6 Ethernet cable can connect the host PC to the router if you prefer a wired link, but the dedicated-server guide does not require a particular cable. The important requirements are a reachable host, consistent addressing, and matching configuration values.

Frequently Asked Questions

What does the server log tell me during setup?

The first launch creates a log alongside the configuration and save-data folder. Read it after each restart to confirm which configuration the process loaded and to identify file or startup errors before changing router settings.

Should I keep a copy of server_config.json before editing it?

Yes. Save a copy of the generated file before making changes, then edit the working copy. If a typo prevents startup, restoring the known-good file is faster than reconstructing every setting.

Is a wired connection mandatory for the host computer?

No. A wired Cat 6 connection is an optional host-to-router accessory, not a stated server prerequisite. The documented setup depends on correct addressing, firewall access, and port forwarding rather than a specific cable type.

What should I verify before giving the address to friends?

Start the server with the final configuration, confirm that the intended save folder is loaded, and check that the router forwards the same UDP port shown in the JSON. Then provide the external address and the appropriate group password, keeping the administrator credential private.