How to Sync Lutris Game Save Files

Introduction#
When playing offline games using Lutris on multiple machines, save files are not conveniently synced like using Steam. This can be solved by using Syncthing π€
Setup#
- π° Environment Setup
- π Configuring Lutris Save Files Folder
- π Installing Syncthing
- π Configuring Folder Sync
π° Environment Setup#
- For this tutorial, we will use the game Clair Obscur: Expedition 33
- These steps need to be done for every machines / PCs
- For the game files to sync, both machines need to be online. I personally set this up on my VPS which is running 24/7 to act as intermediary, but this is optional
π Configuring Lutris Save Files Folder#
In recommended Lutris setup, each installed game is to have its own prefix folder. Save data can be found in ...\AppData\Local\* from each prefix folder. We will make a centralized save folder to make sync easier.
Create a new folder for all save files. We will later symlinks all Save Data folders here, for example:
~/LutrisSavesor/home/yourusername/LutrisSavesFor the game Clair Obscur: Expedition 33, the save files are located in
/path/to/prefix/<prefix-name>/c_drive/users/<myusername>/AppData/Local/Sandfall
- <prefix-name> : The folder specified during game installation, you can find this in the game configuration from Lutris
- <myusername> : Lutris by default set this to the same username as the host machine
Sandfall: The AppData generated that contains configuration and save files for this game
Move the Save Files to LutrisSaves folder, then make a symlink to the previous folder. Run these commands (edit the placeholders)
mv /path/to/prefix/c_drive/users/<myusername>/AppData/Local/Sandfall ~/LutrisSaves
ln -s ~/LutrisSaves/Sandfall /path/to/prefix/c_drive/users/<myusername>/AppData/Local/
Now we’re set up to sync this folder LutrisSaves to the other machines using syncthing. Note that this process needed to be done for each game that wants to be synced. Here is the folder structure
|-LutrisSaves
|--Sandfall => /path/to/prefix/c_drive/users/<myusername>/AppData/Local/Sandfall
|--AnotherGameSaveFolder => /path/to/another-prefix/c_drive/users/<myusername>/AppData/Local/AnotherGameSaveFolder
π Installing Syncthing#
Download Syncthing here I’m using bazzite in this setup.
syncthingcan be installed by downloading the prebuilt binary and moving it to/usr/local/binor/usr/bin. For other distros such as Debian & Ubuntu, it can be installed byapt install syncthing. Since we’re using bazzite (Linux based) with Ryzen 5 5600, we will choose the “Intel/AMD (64βbit)” download link. Then, run these commands to installsyncthingcd ~/Downloads tar -xzvf syncthing-*.tar.gz sudo mv syncthing*/syncthing /usr/local/binAdding Syncthing as Service to run in background
mkdir -p ~/.config/systemd/user touch ~/.config/systemd/user/syncthing.serviceCopy this systemd configuration to
syncthing.service(use Text Editor)[Unit] Description=Syncthing - Open Source Continuous File Synchronization for %I Documentation=man:syncthing(1) After=network.target StartLimitIntervalSec=60 StartLimitBurst=4 [Service] Environment="STLOGFORMATTIMESTAMP=" Environment="STLOGFORMATLEVELSTRING=false" Environment="STLOGFORMATLEVELSYSLOG=true" ExecStart=/usr/local/bin/syncthing serve --no-browser --no-restart Restart=on-failure RestartSec=1 SuccessExitStatus=3 4 RestartForceExitStatus=3 4 # Hardening ProtectSystem=full PrivateTmp=true SystemCallArchitectures=native MemoryDenyWriteExecute=true NoNewPrivileges=true # Elevated permissions to sync ownership (disabled by default), # see https://docs.syncthing.net/advanced/folder-sync-ownership #AmbientCapabilities=CAP_CHOWN CAP_FOWNER [Install] WantedBy=multi-user.targetThen install as service & add to startup
systemctl --user enable syncthing.service systemctl --user start syncthing.service sudo loginctl enable-linger <myuser>
π Configuring Folder Sync#
On First Machine (Game Save origin)#
- Access syncthing dashboard in browser: http://localhost:8384/#
- Choose [+ Add Folder] under
Folders(top left) - Set Folder Path to
~/LutrisSaves - (optional) To keep files safe (in case of conflicts). Under
File Versioning, choose Simple File Versioning. - Save β
- Under
This Devicesection in the dashboard, copy the identification string that has this format:*****-******-******-******-******-******-******-******
For the other Machines#
- Access syncthing dashboard in browser: http://localhost:8384/#
- Under
Remote Devicessection, choose [+ Add Remote Device] - Paste the identification copied earlier on
Device ID, Save β
Back to the First Machine#
- Under
Folders, choose theLutrisSavesthen press [βοΈ Edit] - Under
Sharingcheck all the device(s), Save β
Back to the other Machines#
Accept the sharing invitation on the dashboard (there will be prompt).
π You are done and now all game saves data will be synced between machines! π
Conclusion#
While it’s now possible to do save sync between machines. It is still not convenient or nearly as seamless as what Steam offers. There seemed to be plan to have this feature built-in to Lutris for a while, which hopefully can be used soon π
If anything, this post just proves the value of buying games directly on Steam and being able to play it on any machines without needing to tinker around.
Another possible alternative is to install the game in only 1 machine, and do remote play using Sunshine / Moonlight Setup. But, with even with my servicable setup:
- AC1200 867Mbps 5Ghz Router
- AX201 WiFi 6 Machine (~80% Signal Strength)
- Another machine wired directly using Ethernet cable
It can’t handle 4K nor 1440P stream smoothly… Not to mention if the stream is not local… For now, this sync setup will be what I use until there is another convenient solution for Non-Steam Games that I’m playing. Ciao π