Request info from headless server via local network

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Edgar_VL
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jun 02, 2022 7:30 am
Contact:

Request info from headless server via local network

Post 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?
Last edited by Edgar_VL on Fri Jun 03, 2022 2:38 pm, edited 1 time in total.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Request info from headless server via local network

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Edgar_VL
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jun 02, 2022 7:30 am
Contact:

Re: Request info from headless server via local network

Post 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?

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2540
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Request info from headless server via local network

Post 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
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

Edgar_VL
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jun 02, 2022 7:30 am
Contact:

Re: Request info from headless server via local network

Post 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 😅
But this doesn't work either.

Nidan
Fast Inserter
Fast Inserter
Posts: 227
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Request info from headless server via local network

Post 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.

Post Reply

Return to “Technical Help”