RCON in Single Player or when hosting a MP game from the GUI

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

RCON in Single Player or when hosting a MP game from the GUI

Post by justarandomgeek »

I would like to be able to use RCON to allow other programs on my computer to inject lua commands into my game in single player, or with a multiplayer game started from the main menu, rather than with command line options (so that I only need one copy of the game running).

My specific use case is to use RCON to call Foreman's remote interface to add prints to the library, but there are obviously many uses for having RCON available in these modes.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by ssilk »

I think to open this in general is a big security issue. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by justarandomgeek »

ssilk wrote:I think to open this in general is a big security issue. :)
Presumably it would have some options that default to off, and one must turn it on if desired, just like how the headless RCON works.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by ssilk »

Let's say it so: I dunno, how other games do it.

But from security aspect I would like to have an sshd in the game and if I connect via ssh (and some special port-number), I'm directly on the game-console. Input and output is 100% identical and I can turn it off in the game as long as I have been connected.

Something like so:

Code: Select all

ssilk@ssilkPro2 [~] > ssh ssilk@localhost:44140
password: *****************
Info: Logged in as player "ssilk" to FACTORIO 0.13.24 on "ssilkPro2", WORLD "test"
> /console off
Your ingame console is turned off now. It can be turned on with "/console on" or by logging out from this terminal.
>
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by justarandomgeek »

SSHd would be nice, but RCON is already there for non-GUI servers, and it seems simpler to extend/invoke what's already present than to integrate something new ;) Plus, it means any tools that use RCON for MP games would automatically work for relevant functions in SP games too, like my compiler-to-prints.

I'd be satisfied with any mechanism to push lua commands into a non-headless game though, as long as I can remote.call("foo","bar","baz") from outside I can make the rest work somehow!

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by ssilk »

Just because I chated today with LottieVixen in IRC today
sshd in Factorio would enable
- secure connections from anywhere in internet to your server (I think the so much better security is the most important aspect of this)
- forward our connection through firewalls
- using tools like screen/tmux
- connect by authorized keys is possible (no password needed, but still possible)
- open multiple connections (one for commandline, one for logs, one for ...) and multiple windows on multiple computers, cause you are not bound to Factorio.
- and many, many more really useful things


The negative side is:
- you need an ssh-client or
- implement of an ssh-client in Factorio itself
- configuring ssh (keys, config etc.) is for new users a hurdle
- afford for integration of ssh-lib etc. is unknown...

Sorry for tech-speak, but in my world this is daily business. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by justarandomgeek »

Still seems like RCON would be an order or magnitude or two simpler, since it's already present in the game - it just needs to be loaded!

Also, many tools are already developing using RCON, including insanity such as Clusterio, which would be much easier to set up quickly if we had RCON from SP or non-headless MP servers.

timboo07up
Inserter
Inserter
Posts: 23
Joined: Wed Nov 07, 2018 8:23 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by timboo07up »

Although this topic is really old. I would still think this is a good feature to add for Single player and GUI MP games.

Since there are quite a lot of streamers for factorio, we could create a mod that performs certain actions in-game depending on chat/donations/other actions.
And setting up a separate server for that is usually a bit too much for most streamers/pc's.

I don't know if it's hard to enable the rcon in this way or that it poses problems. Like said before, disabled by default, but if its an option than it would be awesome!

adamius
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Mon Mar 19, 2018 9:18 am
Contact:

RCON singleplayer ?

Post by adamius »

Hi

Can we get RCON enabled for singleplayer?

localhost-only connections is fine. Manually enabled in settings is also fine. Command line option to enable like the headless version etc.

thanks

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by Koub »

[Koub] Merged into older topic with same request.
Koub - Please consider English is not my native language.

User avatar
Kuxynator
Inserter
Inserter
Posts: 31
Joined: Wed Sep 23, 2020 5:02 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by Kuxynator »

Some time later...
Is a connection (RCon/SSH etc.) now available in single player mode?
Starting a server and a client on local host to play with only one player only to have a connection is unnecessary effort.
For security reasons this is the same risk as starting in SP with a connection available.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2227
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: RCON in Single Player or when hosting a MP game from the GUI

Post by boskid »

RCON in single player will not happen. There is no need to run headless + client to have RCON on localhost: in the config file there is `local-rcon-socket` and `local-rcon-password` (also available through the hidden settings: while in main menu hold Ctrl+Alt and press "Settings" then go to "The rest") - with this it is possible to run single instance that is hosting MP game with graphics for local player and with rcon enabled.

Post Reply

Return to “Ideas and Suggestions”