OpenFactorioServerManager / factorio-server-manager

A tool to help manage Factorio multiplayer servers including mods and save games.
MIT License
544 stars 132 forks source link

RCON port cannot be exposed through docker #240

Open egladil opened 3 years ago

egladil commented 3 years ago

In order to expose a port through docker it needs to be known before starting the container. But since the RCON port is always randomized this is not possible. It would be useful to have a setting of some kind for forcing the RCON port to a specific port number

mroote commented 3 years ago

Good idea we should have an optional flag to specify the RCON port.

daggers953 commented 3 years ago

Yes i need this to use the factorio chat bot. I need to set the rcon port. https://github.com/Corbris/FactorioChatBot

Mirdinus commented 3 years ago

Hi @mroote, I think that issue should be changed to bug as rcon_port parameter is ignored and randomized every time config is loaded FactorioRconPort is assigned random value (config.go#L176) every time loadServerConfig is called

https://github.com/OpenFactorioServerManager/factorio-server-manager/blob/1d42f87e55aa246001e9b44e0caa5ec8456407ce/src/bootstrap/config.go#L176