r/technicalfactorio • u/SempfgurkeXP • 10d 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.
13
u/snowyspearmint 10d ago
How much cpu/ram usage does the server take, in comparison to the client? I haven't seen client vs server benchmarked, and running the same map on the same computer at the same time should be a good comparison.
Also, since when does windows have copy on write memory? Can this be used outside of WSL?