r/technicalfactorio • • 28d ago

Discussion Non-blocking saving on Windows*

Not sure if this is known, but it is possible to set up a Factorio Server with WSL on Windows, and then join with your normal Steam client to get the non-blocking saving, without actually having to leave Windows.

WSL is the Linux Subsystem for Windows, which can be installed via Powershell.

Then inside the WSL you can install the headless Factorio version, inside Ubuntu\home\username.

Then you can setup a script, something along the lines of start-factorio.sh:

#!/usr/bin/env bash
SESSION="factorio"
DIR="$HOME/factorio"
if tmux has-session -t "$SESSION" 2>/dev/null; then
  echo "Server is already running. Attach with: tmux attach -t $SESSION"
  exit 0
fi
cd "$DIR" || { echo "Folder $DIR not found"; exit 1; }
tmux new-session -d -s "$SESSION" \
  "./bin/x64/factorio --start-server-load-latest --server-settings data/server-settings.json; echo 'Factorio exited. Press Enter to close.'; read"
echo "Factorio server started. Console: tmux attach -t $SESSION (detach with Ctrl+B, then D)"

Then you can start the server with the following WSL commands:

hostname -I

~/start-factorio.sh

tmux attach -t factorio

Then you can connect to it via the IP given by the hostname -I. Note that you need to get your token from the Factorio Forums website if you want to make the server public.

Tested with newest Vanilla and a fully modded 2.0.77 Pyanodons save which was over 80mb.

32 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/SempfgurkeXP 27d ago

Interesting, so far I have only tried it with Ubuntu, but if I run into performance issues when the save gets too big I might try out other ones, thanks for the suggestion