docker-palworld-dedicated-server icon indicating copy to clipboard operation
docker-palworld-dedicated-server copied to clipboard

RCON is possible, maybe add the ports to expose it?

Open Khyretos opened this issue 1 year ago • 14 comments
trafficstars

Have you read the Important information text above

  • [X] Yes i did

Current behavior

I can enable the RCON in the server if i expose the port, maybe it could be added to the docker-compose.yml?

Desired behavior

Add it either to the description of the repo or the docker-compose file it could be usefull for other people.

Links to screenshots

image

To Reproduce

  • Add this to the docker compose file:
    ports:
      - "25575:25575/udp"
      - "25575:25575/tcp"
  • enable RCONEnabled=True and setup a port in RCONPort=25575 in the /game/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini

You wil need a way to connect to the RCON of the game. i use: https://github.com/gorcon/rcon-cli

Software setup

  • OS: Ubuntu 22.04 LTS
  • Docker: Docker version 25.0.0, build e758fe5

Hardware setup

  • vCPU: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
  • RAM: 16GB
  • Disk: 500GB

Additional context

No response

Khyretos avatar Jan 22 '24 00:01 Khyretos

Hey @Khyretos Sure thats easy and no problem at all. Are you available on Discord or Teaspeak for a few questions?

jammsen avatar Jan 22 '24 09:01 jammsen

Hey @Khyretos Sure thats easy and no problem at all. Are you available on Discord or Teaspeak for a few questions?

Discord Khyretos#5151

Khyretos avatar Jan 22 '24 09:01 Khyretos

Added you, feel free to call me

jammsen avatar Jan 22 '24 09:01 jammsen

Might even be nice to add outdead/rcon as a service to the docker-compose.yml, too.

services:
  palworld-dedicated-server:
    environment:
      # ...
      - ADMIN_PASSWORD=THE_ADMIN_PASSWORD
    #...

  rcon:
    image: outdead/rcon:latest
    entrypoint: ['/rcon', '-a', 'palworld-dedicated-server:25575', '-p', 'THE_ADMIN_PASSWORD']
    profiles: ['rcon'] # prevents booting up with `docker compose up`

Usage: docker compose run --rm rcon ShowPlayers

You don't even have to open those ports then to the host.

uncaught avatar Jan 22 '24 11:01 uncaught

Might even be nice to add outdead/rcon as a service to the docker-compose.yml, too.

services:
  palworld-dedicated-server:
    environment:
      # ...
      - ADMIN_PASSWORD=THE_ADMIN_PASSWORD_AS_ABOVE
    #...

  rcon:
    image: outdead/rcon:latest
    entrypoint: ['/rcon', '-a', 'palworld-dedicated-server:25575', '-p', 'THE_ADMIN_PASSWORD_AS_ABOVE']
    profiles: ['rcon'] # prevents booting up with `docker compose up`

Usage: docker compose run --rm rcon ShowPlayers

You don't even have to open those ports then to the host.

this! +1

Khyretos avatar Jan 22 '24 11:01 Khyretos

Might even be nice to add outdead/rcon as a service to the docker-compose.yml, too.

services:
  palworld-dedicated-server:
    environment:
      # ...
      - ADMIN_PASSWORD=THE_ADMIN_PASSWORD
    #...

  rcon:
    image: outdead/rcon:latest
    entrypoint: ['/rcon', '-a', 'palworld-dedicated-server:25575', '-p', 'THE_ADMIN_PASSWORD']
    profiles: ['rcon'] # prevents booting up with `docker compose up`

Usage: docker compose run --rm rcon ShowPlayers

You don't even have to open those ports then to the host.

Hey @uncaught This looks like a really cool solution, im gonna adapt it but in a different way. Your version only works when both containers are in the same docker-compose-network, but palworld needs network-type: bridge, therefore its not joining the docker-compose-network and it cant be accessed like that, you know?

I would just add the rcon-port to the ports list and then you have the choice in your firewall to forward/nat the port to the internet or not. If you choose to not do that, fine either way, you still can access it over the internal IP then.

This should be the best solution of 3 worlds.

jammsen avatar Jan 22 '24 13:01 jammsen

Might even be nice to add outdead/rcon as a service to the docker-compose.yml, too.

services:
  palworld-dedicated-server:
    environment:
      # ...
      - ADMIN_PASSWORD=THE_ADMIN_PASSWORD
    #...

  rcon:
    image: outdead/rcon:latest
    entrypoint: ['/rcon', '-a', 'palworld-dedicated-server:25575', '-p', 'THE_ADMIN_PASSWORD']
    profiles: ['rcon'] # prevents booting up with `docker compose up`

Usage: docker compose run --rm rcon ShowPlayers You don't even have to open those ports then to the host.

Hey @uncaught This looks like a really cool solution, im gonna adapt it but in a different way. Your version only works when both containers are in the same docker-compose-network, but palworld needs network-type: bridge, therefore its not joining the docker-compose-network and it cant be accessed like that, you know?

I would just add the rcon-port to the ports list and then you have the choice in your firewall to forward/nat the port to the internet or not. If you choose to not do that, fine either way, you still can access it over the internal IP then.

This should be the best solution of 3 worlds.

image

yes! I can't wait for the next release

Khyretos avatar Jan 22 '24 13:01 Khyretos

Hey @uncaught This looks like a really cool solution, im gonna adapt it but in a different way. Your version only works when both containers are in the same docker-compose-network, but palworld needs network-type: bridge, therefore its not joining the docker-compose-network and it cant be accessed like that, you know?

To my knowledge, bridge is the default network mode and thus I've commented out that line in the docker-compose.yml in my setup. palworld works fine without specifying the network mode and rcon works perfectly fine, too. They are in the same docker network and all is well.

uncaught avatar Jan 22 '24 13:01 uncaught

Hey @uncaught This looks like a really cool solution, im gonna adapt it but in a different way. Your version only works when both containers are in the same docker-compose-network, but palworld needs network-type: bridge, therefore its not joining the docker-compose-network and it cant be accessed like that, you know?

To my knowledge, bridge is the default network mode and thus I've commented out that line in the docker-compose.yml in my setup. palworld works fine without specifying the network mode and rcon works perfectly fine, too. They are in the same docker network and all is well.

Not for me, im using the 3 days old Docker 25.0.0

jammsen avatar Jan 22 '24 14:01 jammsen

Might even be nice to add outdead/rcon as a service to the docker-compose.yml, too.

services:
  palworld-dedicated-server:
    environment:
      # ...
      - ADMIN_PASSWORD=THE_ADMIN_PASSWORD
    #...

  rcon:
    image: outdead/rcon:latest
    entrypoint: ['/rcon', '-a', 'palworld-dedicated-server:25575', '-p', 'THE_ADMIN_PASSWORD']
    profiles: ['rcon'] # prevents booting up with `docker compose up`

Usage: docker compose run --rm rcon ShowPlayers You don't even have to open those ports then to the host.

Hey @uncaught This looks like a really cool solution, im gonna adapt it but in a different way. Your version only works when both containers are in the same docker-compose-network, but palworld needs network-type: bridge, therefore its not joining the docker-compose-network and it cant be accessed like that, you know? I would just add the rcon-port to the ports list and then you have the choice in your firewall to forward/nat the port to the internet or not. If you choose to not do that, fine either way, you still can access it over the internal IP then. This should be the best solution of 3 worlds.

image

yes! I can't wait for the next release

Coming right up, im finishing things.

jammsen avatar Jan 22 '24 14:01 jammsen

Have you configured the default network mode somewhere globally? I don't think this was anything but bridge for the past 8 years that I've been working with docker.

Mine shows up as bridge without specifying anything: image

The fact remains, bridge is the one where all services in the yaml share the same network. If you have somehow overridden this, then all you needed was to add bridge to all the services.

uncaught avatar Jan 22 '24 14:01 uncaught

Please go ahead and test things. New Docker-Compose File is needed. You can find now examples in the README.md. The docker-compose.yml was removed because of dublicate code.

jammsen avatar Jan 22 '24 14:01 jammsen

Have you configured the default network mode somewhere globally? I don't think this was anything but bridge for the past 8 years that I've been working with docker.

Mine shows up as bridge without specifying anything: image

The fact remains, bridge is the one where all services in the yaml share the same network. If you have somehow overridden this, then all you needed was to add bridge to all the services.

i didnt overwrite this, but this docker-node im using is older then docker 19.03 xD - Maybe somethings changed interally, but i dont remember touch global settings, i would always refrain from that.

jammsen avatar Jan 23 '24 00:01 jammsen

If this issue is solved, please give me feedback on the patch and please consider giving me a Star here and on Docker-Hub.

jammsen avatar Jan 23 '24 00:01 jammsen