Page 1 of 1
Request info from headless server via local network
Posted: Thu Jun 02, 2022 8:00 am
by Edgar_VL
Hello forum users.
I wrote a small web service which allows to my friends to turn on the factorio host (wol) and start factorio server on it.
For further development of this service I whant to get server information on local network. Specifically I'am interested in getting number of online players.
I know about matchmaking API (
https://wiki.factorio.com/Matchmaking_API), but it requires authentication, and i think that spamming requests on a timer to multiplayer.factorio.com is not very good idea.
So is it possible to get server information directly from the server?
Re: Request info from headless server via local network
Posted: Thu Jun 02, 2022 2:09 pm
by Rseding91
Yes, you can use RCON locally to talk to the server and ask for the player count that way. See the wiki about how.
Re: Request info from headless server via local network
Posted: Sat Jun 04, 2022 12:50 pm
by Edgar_VL
Thanks, never heard about RCON before.
I've got new question about rcon configuring. It's working only if i set arguments to the factorio executable, but also there ara same parameters at /factorio/config/config.ini
I've set these options like this:
Code: Select all
; Socket to host RCON on when lauching MP server from the menu.
; local-rcon-socket=0.0.0.0:25575
; Password for RCON when launching MP server from the menu.
; local-rcon-password=strongPass
But this does not work, what I'm doing wrong?
Re: Request info from headless server via local network
Posted: Sat Jun 04, 2022 2:39 pm
by FuryoftheStars
Edgar_VL wrote: Sat Jun 04, 2022 12:50 pm
Thanks, never heard about RCON before.
I've got new question about rcon configuring. It's working only if i set arguments to the factorio executable, but also there ara same parameters at /factorio/config/config.ini
I've set these options like this:
Code: Select all
; Socket to host RCON on when lauching MP server from the menu.
; local-rcon-socket=0.0.0.0:25575
; Password for RCON when launching MP server from the menu.
; local-rcon-password=strongPass
But this does not work, what I'm doing wrong?
Try this:
Code: Select all
; Socket to host RCON on when lauching MP server from the menu.
local-rcon-socket=0.0.0.0:25575
; Password for RCON when launching MP server from the menu.
local-rcon-password=strongPass
Re: Request info from headless server via local network
Posted: Sat Jun 04, 2022 3:20 pm
by Edgar_VL
FuryoftheStars wrote: Sat Jun 04, 2022 2:39 pm
Try this:
Code: Select all
; Socket to host RCON on when lauching MP server from the menu.
local-rcon-socket=0.0.0.0:25575
; Password for RCON when launching MP server from the menu.
local-rcon-password=strongPass
Thasnks
![😅](//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f605.svg)
But this doesn't work either.
Re: Request info from headless server via local network
Posted: Sat Jun 04, 2022 4:39 pm
by Nidan
The comments for the options say "when launching MP server from the menu". Are you actually doing that? If you are starting the server via command line instead, check the output from --help, it should mention similar options.