IMPORTANT! – How to setup a dedicated server for Portal Knights

Home Forum Steam Discussions IMPORTANT! – How to setup a dedicated server for Portal Knights

Questo argomento contiene 9 risposte, ha 8 partecipanti, ed è stato aggiornato da Avatar CasselCoff Agosto 19, 2019 at 2:56 pm.

  • Autore
    Articoli
  • #12668
    PK_CM505
    PK_CM505
    Amministratore 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:
    a) basicServerData
    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.
    d) admins/users/guests
    i) Credentials
    (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

  • #12705
    Avatar
    NeoNe
    Partecipante

    Is there linux dedicated server I would like to host my server on digitalocean so its always online 🙂

  • #13114
    Avatar
    appzetta
    Partecipante

    Reading your 9th point you said we should use what is my ip website to get public/external IP address. What if website shows only IPv6 address not IPv 4 ?

  • #13306
    Avatar
    portnite
    Partecipante

    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.

  • #13532
    Avatar
    xtexistenz
    Partecipante

    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?

    Thanks

    • Questa risposta è stata modificata 1 anno, 5 mesi fa da Avatar xtexistenz.
  • #13534
    Avatar
    Tolein
    Partecipante

    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.

    Thanks

    • #13536
      Avatar
      Tolein
      Partecipante

      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.

  • #13610
    Avatar
    Tolein
    Partecipante

    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.

    Thanks

  • #13639
    Avatar
    Subtrahero
    Partecipante

    Hi,

    If you want to run this on linux you can use wine.

    its all the same steps just use wine to start the server

  • #15305
    Avatar
    CasselCoff
    Partecipante

    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.

This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.

Accept this cookie Find out more