logo

Flatpak multi-user Steam on Linux

Sat April 4th 2020

As in steam multiuser setup for Linux I have been struggling with steam for some time ;-) However I finally found the most simple, clean and working solution for Steam on linux. And it is actually surprisingly easy to setup. I use this setup for at least 3 months now without any issues sofar, just today took some time to document for future references.

I set out to:

  • sharing of downloads between users
  • reduce total disk space for actual steam install
  • keep user specifics at user level (eg login credentials)
  • avoid having to install 32bit libraries on my system

How?

Flatpak! Flatpak’s flathub has a steam flatpak. Just follow the flatpak setup guide to install flatpak for your system. Add flathub as repository (all in the setup) and install steam flatpak.

Note: I installed all as root so other users can access the steam flatpak. Installing as user is also an option but you will lose the shared approach for steam (not for the steam downloads)

Install flatpak for VoidLinux:

xbps-install -S flatpak

Add flathub repository:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Add steam flatpak:

flatpak install flathub com.valvesoftware.Steam

To run steam as user run:

flatpak run com.valvesoftware.Steam

I created a local steam command wrapper /usr/local/bin/steam to ease starting, and adding a umask so all new files created and downloaded will be created with group rights (all my users are in group users)

#!/bin/sh
umask 007
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/steam-wrapper --file-forwarding com.valvesoftware.Steam $*
# chmod -R g=u /mnt/Steam
# chgrp -R users /mnt/Steam

Finally create a generic library store location with group setgid permissions and add this location in steam as the default steam library folder (steam -> settings -> downloads -> steam library folders):

$ ls -l /mnt/Steam
drwxrws--- 32 root users  4096 Apr  4 10:46 Steam

Initially if you have been running team for some time you might need to adjust file ownership etc in your steam library directory, this can help, this will set all group permissions identical to users permissions, and change the group to the shared group for all users users.

$ chmod -R g=u /mnt/Steam
$ chgrp -R users /mnt/Steam

And finally, clean up all 32bit stuff from your PC ;-)