Repository navigation
Read rcon password from settings.json and bind rcon to localhost - #135
Merged
Merged
Conversation
The rcon password was a hardcoded constant, so every server started with the same, publicly known password. Since Refactorio#132 this also applies on Linux. Add an optional rcon_password setting to the wrapper's settings.json. If it's empty or missing, a random password is generated each time the wrapper starts, so existing settings files keep working. The password is also no longer written to the wrapper log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--rcon-port makes Factorio listen for rcon on all interfaces. The wrapper only connects to rcon on 127.0.0.1, so bind it there and keep it off the public network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
grilledham
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wrapper started Factorio with a hardcoded rcon password, so every server used the same password, and that password is in this repo. It also used
--rcon-port, which makes Factorio listen for rcon on all interfaces. Since #132 the rcon arguments are also added on Linux.Changes
rcon_passwordsetting to the wrapper'ssettings.json(also added tosettings.template.json).settings.jsonfiles keep working without changes.--rcon-bind 127.0.0.1:<port>instead of--rcon-port <port>, so rcon is only reachable from the same machine. The wrapper already connects to127.0.0.1, so nothing else changes. Remote rcon access is no longer possible; use an SSH tunnel if you need it.Testing
cmdsyntax, so on Linux I built a copy with that step removed.--rcon-port 34299:Starting RCON interface at IP ADDR:({0.0.0.0:34299}), listening on0.0.0.0:34299--rcon-bind 127.0.0.1:34299:Starting RCON interface at IP ADDR:({127.0.0.1:34299}), listening on127.0.0.1:34299only. The game's UDP port is unaffected.🤖 Generated with Claude Code