Zwift on Linux
I haven’t talked about it much on this blog, but I’m really into running, cycling, and swimming. I run marathons, and do triathlons. Endurance sports are a kind of masochistic addiction. It hurts, but in a way you just keep coming back for.
I like tools and I like data, so I’ve accumulated a variety of software to track and plan my fitness, including:
- Garmin Connect for pulling data from my Garmin Fenix 7 Pro
- Training Peaks for managing my training plans
- Endurain for selfhosting all my fitness history
- Stryd for Running Power
- Waistline for FOSS nutrition tracking
- Zwift for virtual cycling
Zwift
Zwift is a pretty cool application. If you aren’t familiar, it is essentially an MMO for cycling and running. You join a virtual world where you can ride/run routes either alone or in a pack with other people, or you can do pre-planned structured workouts. If you like cycling but can’t get out to a good area often then it is a much better alternative to regular trainer ride.
It has a really thriving community as well. There are people all over the world riding around the virtual circuits at any given time of day, so it never feels empty. And as you ride you can give and receive kudos in the form of “Ride Ons”. It will also track your stats and as you complete events and earn points you can unlock near gear to customize your experience.
In short, its pretty much the most fun you can have indoors on a bike.
The Complication
Zwift is supported on a surprising number of platforms, but sadly not on Linux. It seems like it runs on virtually everything else really. Luckily Kim Eik did all the heavy lifting of solving this issue. With a little tech know-how, you can run Zwift on Linux now.
Requisites:
- Basic Linux CLI knowledge
- A relatively recent distribution of Linux
- Docker installed, and your user in the
dockergroup
If that hasn’t turned you off yet and you already hit the requirements, then you can just execute one command:
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/netbrain/zwift/master/bin/install.sh)"
On most common Linux desktop environments that will result in Zwift having an icon in your launcher.
But wait, theres more… to do
So that script gets Zwift installed, but sadly Docker and Bluetooth still don’t play nicely together and that isn’t likely to change soon. The easiest way to move forward is to install the Zwift Companion app on your phone and pair your trainer and other devices to that. Zwift should then pick them up pretty easily.
Auto-Login
It also does not save credentials by default, so another extra step is required. You can create a file in your home directory ~/.config/zwift/config and put your credentials in it like so:
ZWIFT_USERNAME='username'
ZWIFT_PASSWORD='password'
If storing your password in plain text tickles your spidey sense then you can also store it in your system’s keyring.
Conclusion
I’ve been running Zwift this way for over a year and it has rarely had any issues. I did have some weird issues with Pipewire when I was running Ubuntu, but since switching to Bazzite it has been flawless. It should be noted, that each time you launch Zwift it will check for updates and potentially download multiple gigabytes of data, so be prepared to launch the app a bit before your scheduled ride.
Ride On!