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#

  • 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.

  1. Create a new folder for all save files. We will later symlinks all Save Data folders here, for example: ~/LutrisSaves or /home/yourusername/LutrisSaves

  2. For 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#

  1. Download Syncthing here I’m using bazzite in this setup. syncthing can be installed by downloading the prebuilt binary and moving it to /usr/local/bin or /usr/bin. For other distros such as Debian & Ubuntu, it can be installed by apt 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 install syncthing

    cd ~/Downloads
    tar -xzvf syncthing-*.tar.gz
    sudo mv syncthing*/syncthing /usr/local/bin
    
  2. Adding Syncthing as Service to run in background

    mkdir -p ~/.config/systemd/user
    touch ~/.config/systemd/user/syncthing.service
    

    Copy 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.target
    

    Then 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)#

  1. Access syncthing dashboard in browser: http://localhost:8384/#
  2. Choose [+ Add Folder] under Folders (top left)
  3. Set Folder Path to ~/LutrisSaves
  4. (optional) To keep files safe (in case of conflicts). Under File Versioning, choose Simple File Versioning.
  5. Save βœ…
  6. Under This Device section in the dashboard, copy the identification string that has this format: *****-******-******-******-******-******-******-******

For the other Machines#

  1. Access syncthing dashboard in browser: http://localhost:8384/#
  2. Under Remote Devices section, choose [+ Add Remote Device]
  3. Paste the identification copied earlier on Device ID, Save βœ…

Back to the First Machine#

  1. Under Folders, choose the LutrisSaves then press [✏️ Edit]
  2. Under Sharing check 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 πŸ‘‹