service-token gets overwritten on start

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
WeaselThrash
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jul 20, 2022 7:11 pm
Contact:

service-token gets overwritten on start

Post by WeaselThrash »

I recently set up an unRAID server and am trying to set up Factorio in a Docker container on it, but am having issues I can't seem to solve.

tl;dr: the service-username and service-token get overwritten when the docker container starts.

1. Opened unRAID and went to Apps
2. Searched Factorio and installed it (not Factorio Server Manager)
3. It installed successfully and showed running, but if I went to the IP and port there was nothing there.
4. Checked the logs, and the error indicated that I was missing the server token
5. Went to the factorio site and got my token
6. SSH'd into the box, navigated to /mnt/disk1/appdata/factorio and opened player-data.json
7. Found service-username and service-token and filled them out. Saved the file
8. Opened the file to ensure that the data saved properly. It did
9. Refreshed the webpage. I figured I'd need to restart the server, but didn't hurt to check. Page still not available.
10. Go back to unRAID, stop the Factorio service, start the Factorio service. Same error
11. Check player-data.json, and note that the values I'd added and saved are now gone and overwritten.
12. Checked inside the settings for Factorio on the unRAID page and there is no place to set them.

Can anyone tell me what I'm missing? Thanks in advance.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: service-token gets overwritten on start

Post by ptx0 »

well, that seems to be just how Docker works. it always rebuilds everything from scratch. you probably need to create your own Dockerfile to extend that one and have a COPY command that pulls in your json config.

that said, i don't think the Docker container is something that Wube made, or supports.

WeaselThrash
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jul 20, 2022 7:11 pm
Contact:

Re: service-token gets overwritten on start

Post by WeaselThrash »

Someone on reddit helped me out. The answer was to install Factorio Server Manager. After that, it all worked out.

Post Reply

Return to “Technical Help”