[2.0.42] Game won't run on same system as Headless Dedicated Server. LOCK file still appearing in AppData (Windows 11)

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.
MrMusAddict
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Feb 26, 2019 8:34 pm
Contact:

[2.0.42] Game won't run on same system as Headless Dedicated Server. LOCK file still appearing in AppData (Windows 11)

Post by MrMusAddict »

Hello, I'm on Windows 11 and have followed this tutorial to a tee:

https://steamcommunity.com/sharedfiles/ ... 2843949020

In summary:
  1. Created a new folder to hold my server
    C:\Users\musad\OneDrive\Documents\Factorio-Servers\2.0.42
  2. Went in-game and created my map, and saved it.
  3. Copied my game files from steam over to that new folder
  4. Copied the map ZIP from AppData to my server root folder.
  5. Downloaded the headless files from Factorio.com, and copied/pasted the example server settings file into my root dir for the server, making sure it's just `server-settings.json`
    • Typed in my credentials and server name info
  6. Gone to my appdata and copied my config folder, pasting a copy in my server folder.
  7. Edited config.ini
    • read-data=[server dir]\data
    • write-data=[server dir]
  8. Edited config-path.cfg to point to `config-path=[server dir]\config`
  9. Created `server.bat` with the following:
start /wait C:\Users\musad\OneDrive\Documents\Factorio-Servers\2.0.42\bin\x64\factorio.exe --start-server C:\Users\musad\OneDrive\Documents\Factorio-Servers\2.0.42\saves\servermap.zip --server-settings C:\Users\musad\OneDrive\Documents\Factorio-Servers\2.0.42\server-settings.json --no-log-rotation
pause
Despite this, whenever I run the `server.bat` file, a LOCK file is generated in my AppData folder. This means that when I go to boot up Factorio, it says I cannot because the process is locked.

Here is my config.ini file:
03-22-2025, 16-38-50.png
03-22-2025, 16-38-50.png (29.18 KiB) Viewed 116 times
But the Command Line window still shows AppData as my write data path:
03-22-2025, 16-39-48.png
03-22-2025, 16-39-48.png (103.93 KiB) Viewed 116 times
MrMusAddict
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Feb 26, 2019 8:34 pm
Contact:

Re: [2.0.42] Game won't run on same system as Headless Dedicated Server. LOCK file still appearing in AppData (Windows 1

Post by MrMusAddict »

Figured it out. My BAT file seems to need to explicitly call out the config location. I noticed in my Command Prompt window, it was saying the write location was AppData still, so in the BAT file, I added:

--config C:\Users\musad\OneDrive\Documents\Factorio-Servers\2.0.42\config\config.ini
Post Reply

Return to “Technical Help”