Febbraio 15, 2018 alle 1:41 pm #12668
PK_CM505Amministratore del forum
Setting up a dedicated server for Portal Knights enables four players to play in the same world without having to be online at the same time.
Note: Running a server on your own computer without a clear understanding of what you are doing may make your system vulnerable for attacks from outside.
Setting up a server is not easy without some technical knowledge and takes time. We don’t recommend trying to setup a dedicated server if you don’t have some experiencewith setting up networks.
Here’s how to configure a dedicated server for Portal Knights:
1) Copy the “dedicated_server.zip” found in the Steam folder of your Portal Knights. In order to find that folder right click on “Portal Knights” in your Steam library and select properties. Switch to the “Local Files” tab and click on “Browse Local Files…”
2) Extract the dedicated_server.zip file in the desired location.
3) Start the “pk_dedicated_server.exe” – a log file, a configuration file, and a save data folder will be created.
4) Close the “pk_dedicated_server.exe” in order to set up the config file.
5) Open the “server_config.json” file with a text editor to set up the server. ALL ENTRIES MUST BE IN ASCII OR UTF-8!
6) The following settings can be viewed or changed:
i) name: The name that your dedicated server will display.
ii) ipv4: The local network IP address of your dedicated server. The address 0.0.0.0 allows the host computer to listen to all local network traffic. You probably won’t need to change this unless you’re setting up your server to work on a specific network card or interface.
iii) port: The port for the dedicated server. We recommend against changing this unless your firewall/router settings require it, or if you want to run several servers on the same PC (in which case each will need a separate port).
iv) iv. saveFolderPath: This is the location where save data will be written. This needs to be changed, if you wish to run multiple server instances on the same PC.
b) universeSize: (Small/Normal/Large) The universe size for the dedicated server.
c) hideConsoleWindow: (true/false) This will hide the console window. If this option is enabled, the server can only be closed by terminating it in the task manager.
(1) password: Choose passwords used to access your dedicated server by different user groups. There are three user groups (admin, users, and guests) which can be set up with different passwords and rights. Only give players the password for the user group rights you want them to have and keep your admin password private!
(2) canLogin: (true/false) Defines whether a particular user group can log in.
(3) canKickPlayers: (true/false) Defines whether a particular user group can kick other players from the server.
(4) canModifyWorld: (true/false) Defines whether a particular user group can mine/build blocks/props.
(5) canInteractWithLockables: Not currently functional.
7) Start the “pk_dedicated_server.exe” again to start the dedicated server with the new settings.
8) If your dedicated server is behind a router (which is usually the case), you’ll need to edit your router’s port forwarding settings to ensure game data is sent to your host computer. You can do this by locating your router’s admin page and finding the Port Forwarding settings therein. Here you can try to add a new service (or customer service) if possible. When asked to set up the new rule, you should be prompted on what to it. You can choose whatever name you wish, but we recommend “portalknights” for simplicity. Type needs to be “UDP”. For all ports (internal and external) use “16365 unless you’ve changed the port in the config file (in which case make sure the ports match what you’ve configured there). For the “output IP” or “server IP”, enter your local network address which you can find by running ipconfig via the Command Prompt. If prompted for any other information, leave it alone and continue. If you’re having difficulties with this process, please visit https://portforward.com/ for help. Note that unless you set a static IP for the computer that is hosting the game, the local network IP address can change (which can make port forwarding rules invalid). Refer to your specific router’s documentation to determine how to set up a static IP address for your computer.
9) Send your external IP address along with a user group password to people whom you’d like to have access to the server. Note that the IP address you entered for port forwarding will NOT be your external IP address, it will be the local network IP address. To find the external IP address needed for users to join, you’ll need to visit a site such as http://whatismyip.host/. Be sure to send users your IP v4 address, not IP v6 (the IP address should look like xxx.xxx.xxx.xxx — not xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx)
In order to set up multiple servers on the same PC, use the Command Prompt arguments provided below to prepare different configurations for each one and adapt the config files for each accordingly. Start the “pk_dedicated_server.exe” – a log file, a configuration file, and a save folder will be created
Febbraio 17, 2018 alle 11:01 am #12705
Is there linux dedicated server I would like to host my server on digitalocean so its always online 🙂
Marzo 22, 2018 alle 7:34 pm #13114
Aprile 29, 2018 alle 7:16 am #13306
Please make it possible to seamlessly copy the contents of a single-player universe directory to the server’s savedata directory. I have only a single universe in my single-player game and copied the data files to the server, but the server was unable to retain the player quest state.
Maggio 24, 2018 alle 11:45 pm #13532
I tried to set up the dedicated server, but my friend running the game on android (1.3.5) cannot join, my version on PC is 1.4.3. Not sure if it’s because of the version, but I noticed that if I try to add the server in the game by my public IP it will not find it, if I add my internal IP it will find it then. I did forward port 16365.. any idea what could be the problem?
- Questa risposta è stata modificata 1 anno, 5 mesi fa da xtexistenz.
Maggio 25, 2018 alle 2:34 am #13534
Quick Question, I have my server setup and everything is working great! I log in with the admin password that I set in my config file. How do I kick a player if I need to do so? Is it possibly in the chat window with something along the lines of /kickplayer playername ? I tested that and it didn’t work so I’m not sure how to do it.
Maggio 25, 2018 alle 1:48 pm #13536
Nevermind I figured out how to do this. For anyone that is interested the option is on the player name of the map screen if you are logged in as an admin.
Giugno 13, 2018 alle 12:52 pm #13610
A couple of suggestions that I would like to relay to the Devs after getting some experience with the Dedicated Server. I hope that these are taken under consideration and thank you for taking the time to go over the suggestions.
Please fix it so that the server says 4/4 instead of offline when the server is full.
Please allow me to set island specific permissions. Example: I want to restrict guest users on the home world but would like to allow them more permissions on the other islands.
Please give dedicated servers a regenerate universe button. (Doing it manually is not ideal)
LAST, please please please allow me to set a player limit on a dedicated server. If I have the bandwidth and computing power then I should be able to set a 10-16 player limit instead of 4.
Luglio 5, 2018 alle 4:10 pm #13639
If you want to run this on linux you can use wine.
its all the same steps just use wine to start the server
Agosto 19, 2019 alle 2:56 pm #15305
Hello very good I have a doubt, I hosted the server but I can not play on mobile because the server version is larger than the mobile version I was wondering if you can change the version and if that is how I can do it?
Devi essere loggato per rispondere a questa discussione.