[2.0.13] Headless server: /config changes do not persist

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
yiip
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Nov 02, 2024 4:53 pm
Contact:

[2.0.13] Headless server: /config changes do not persist

Post by yiip »

Changes made via the /config command are not written to the server-settings.json file.

Server: Debian Bookworm 12.7 running in an lxc container.
Version information:

Code: Select all

factorio@factorio ~/test2/server $ ./bin/x64/factorio --version
Version: 2.0.13 (build 79912, linux64, headless)
Version: 64
Map input version: 1.0.0-0
Map output version: 2.0.13-1
Start command:

Code: Select all

factorio@factorio ~/test2/server $ ./bin/x64/factorio \
    --start-server ./data/saves/testserver.zip \
    --server-settings ./server-settings.json \
    --use-server-whitelist \
    --server-whitelist ./server-whitelist.json \
    --server-adminlist server-adminlist.json
File timestamps before changes:

Code: Select all

factorio@factorio ~/test2/server $ ls -l server-*
-rw-r--r-- 1 factorio factorio    4 Nov  2 18:27 server-adminlist.json
-rw-r--r-- 1 factorio factorio 3716 Nov  2 18:27 server-settings.json
-rw-r--r-- 1 factorio factorio    4 Nov  2 18:27 server-whitelist.json
The config values are set, but not written to the server-settings.json:

Code: Select all

/config get name
Server name: Name of the game as it will appear in the game lis
/config get description
Server description: Description of the game that will appear in the listing
/config set name testing123
Server name changed to: testing123
/config set description testing123
Server description set to: testing123
/config get name
Server name: testing123
/config get description
Server description: testing123
Checking if values are written to the file:

Code: Select all

factorio@factorio ~/test2/server $ grep testing123 server-settings.json 
factorio@factorio ~/test2/server $ ls -l server-settings.json 
-rw-r--r-- 1 factorio factorio 3716 Nov  2 18:27 server-settings.json
As can be seen, the config remains untouched. Other commands like /whitelist or /promote however, seem to work correctly:

Code: Select all

/whitelist get
The whitelist is empty.
/whitelist add testing123
Added testing123 to the whitelist.
/whitelist get
Whitelisted players: testing123
/promote testing123
2024-11-02 18:32:54 [PROMOTE] testing123 was added to the admin list by <server> and will be promoted upon joining the game.
The timestamps of those files changed and they were indeed updated:

Code: Select all

factorio@factorio ~/test2/server $ ls -l server-*
-rw-r--r-- 1 factorio factorio   20 Nov  2 18:32 server-adminlist.json
-rw-r--r-- 1 factorio factorio 3716 Nov  2 18:27 server-settings.json
-rw-r--r-- 1 factorio factorio   20 Nov  2 18:32 server-whitelist.json
factorio@factorio ~/test2/server $ grep testing123 server-adminlist.json 
  "testing123"
factorio@factorio ~/test2/server $ grep testing123 server-whitelist.json 
  "testing123"
It doesn't matter if the /config command is used via the server console, rcon, or in-game (server configuration GUI). The GUI screenshot is from another test where I set name, description, game_password, and tags, but with the same result: The settings work for the currently running server, but are not persisted to the server-settings.json file.

Am I doing something wrong?
Attachments
Screenshot from 2024-11-02 18-18-41.png
Screenshot from 2024-11-02 18-18-41.png (36.17 KiB) Viewed 317 times
factorio-current.log
(4.38 KiB) Downloaded 12 times
User avatar
burisk
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Mar 12, 2017 1:58 pm
Contact:

Re: [2.0.13] Headless server: /config changes do not persist

Post by burisk »

I have the same experience with Factorio 2.0.14 (build 79988, linux64, headless, space-age). Changes within /config command are not persisted. What's more, /whitelist enable doesn't do anything - I mean when I'm changing whitelist with /whitelist command it works and it is persisted but I can't enable whitelist or make it work either.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14800
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.13] Headless server: /config changes do not persist

Post by Rseding91 »

Thanks for the report. As far as I can tell, server-settings.json is only ever used at startup and once started changes to those settings do not get written back to that file. by the time the game is running it doesn't' even know if it came from a file or not (it's entirely possible it did not). It seems to have worked this way since forever and I don't see a clear way for the logic to know if it should overwrite a given file on disk when one changes or not.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Minor issues”