Page 1 of 1

[1.1.26] Headless server fails to start if a config.ini is specified

Posted: Sat Mar 06, 2021 8:07 am
by CovertKraken
Factorio 1.1.26 (build 58172, linux64, headless)

Server fails to start if the --server-settings argument specifies a config.ini. The error message is "Unexpected character (;) at /opt/factorio/config/config.ini:1"

Removing the first three lines (each starting with a semicolon) results in a similar error complaining about subsequent lines. The server starts successfully if a config.ini is NOT specified as an argument.

factorio-current.log
(1.55 KiB) Downloaded 73 times
config.ini
(16.2 KiB) Downloaded 98 times

Re: [1.1.26] Headless server fails to start if a config.ini is specified

Posted: Sat Mar 06, 2021 8:11 am
by posila
--server-settings argument expects server settings JSON file (for example Factorio/data/server-settings.example.json), so it fails to parse INI file. To specify config.ini, use --config argument.

Re: [1.1.26] Headless server fails to start if a config.ini is specified

Posted: Sat Mar 06, 2021 8:41 am
by CovertKraken
Using --config allowed the server to start, but unfortunately it is now not respecting my config options, most notably the requirement for a password. Tested connecting both from LAN and over the internet; not sure if this makes a difference. I've confirmed in the log that the executable is recognizing the --config option. No changes to the config from before.

Re: [1.1.26] Headless server fails to start if a config.ini is specified

Posted: Sat Mar 06, 2021 9:00 am
by bormand
Pass server-settings.json to --server-settings, pass config.ini to --config.

Re: [1.1.26] Headless server fails to start if a config.ini is specified

Posted: Sat Mar 06, 2021 10:41 am
by CovertKraken
More info here: viewtopic.php?f=49&t=96702&p=540048#p540048

tl;dr - headless uses json, gui uses ini.