WireGuard
How to use WireGuard VPNs on SailfishOS. Tutorials for various VPN providers
- Installing WireGuard
- [EXAMPLE]: Using WireGuard with MullvadVPN
- Where's the configuration file saved?
Installing WireGuard
Install necessary tools
With Sailfish OS 5.0 (2026)
Since there is no official documentation so far, there is a short how-to make WireGuard working.
devel-su pkcon remove wireguard-go wireguard-tools # for those whom previously installed those two packages in a previous setup or attempt
devel-su pkcon install jolla-settings-networking-plugin-vpn-wireguard # adds Wireguard among the proposed VPN in the settings
devel-su systemctl restart connman # restart the connexion manager to load the new Wireguard plugin
Then, especially for those that have been using WireGuard already, you have to forget WireGuard configs and set it from scratch or import again.
Once your file is imported, you are presented a WireGuard-VPN-connexion configuration interface and it is advised to activate two settings:
- Advanced > Remember authentication information
- Advanced > Enable IPv6 data leak protection
Thanks to @kan_ibal https://forum.sailfishos.org/t/wireguard-in-sailfishos-5-0/22346 and @dopi04 https://forum.sailfishos.org/t/wireguard-in-sailfishos-5-0/22346/26
With previous versions (2024)
SailfishOS doesn't provide WireGuard functionality out-of-the-box, so we first need to install a few third-party programs from OpenRepos. You can get all of these either by downloading the RPMs manually from openrepos.net or by using Storeman.
Wireguard userspace implementation
Install the package wireguard-go : Download from OpenRepos
Wireguard userspace tools
Install the package wireguard-tools : Download from OpenRepos
Connman plugin for integrating Wireguard into Sailfish network manager
Install the package "WireGuard for Sailfish (connman plugin)" (connman-plugin-vpn-wireguard): Download from OpenRepos
VPN plugin for Sailfish OS settings app
Install the package "WireGuard for Sailfish (Settings UI)" (jolla-settings-networking-plugin-vpn-wireguard): Download from OpenRepos
This plugin is optional but makes using WireGuard much easier.
[EXAMPLE]: Using WireGuard with MullvadVPN
Step 1: Obtain a WireGuard config file from Mullvad
To get a config file, head over to https://mullvad.net/de/account/wireguard-config (you will need to login with your account number).
1. For the "platform" select "Linux".
2.Next, click on "Generate key" (or something like that in your language).
3. Select a country
4. Select a city for your country
5. For the "Tunnel traffic", choose "Only IPv4"
6. Click on "Download file". You will get a .conf-file.
7. Copy the file to the storage of your SailfishOS-device
Step 2: Importing the file on Sailfish
- Open the settings-app and navigate to "VPN"
- In the pull-down menu, choose "Add new VPN"
- Choose "WireGuard" for the VPN-Type (typically located at the bottom of the list)
- On the next page, choose to import a "wg-quick.conf" file.
- A file-chooser-dialog will open. Choose the
.conf-file we downloaded earlier. - The setup will tell you that the import was successful. Now you just need to give the VPN a name.
- I recommend to choose "Remember login credentials" (or something like that in your language) under the "Advanced"-settings
- You can now select the VPN in the list to connect to it.
NOTE: If SailfishOS asks for credentials to login, the username is your account number and the password is just the letter "m"
Needing help?
If you run into troubles, feel free to ask for help here
Where's the configuration file saved?
Wireguard on Sailfish OS: where's the configuration file saved?
As usual, posting it on my blog for me, but it will probably be useful to others: I was (re)configuring Wireguard on my X10iii the other day, cause it stopped working after upgrading to Sailfish OS 5.
I could not find where the configuration was saved, but Peter G. on the Sailfish OS Telegram channel pointed me to:
/home/defaultuser/.local/share/system/privileged/connman-vpn
and indeed it's there:
[root@Xperia10III connman-vpn]# ls -l
total 12
drwx------ 2 root root 4096 Mar 14 09:02 provider_XXX_sailfishos_org
drwx------ 2 root root 4096 Mar 14 09:02 vpn_XXX_sailfishos_org
the provider_XXX_sailfishos_org/settings file contains everything you've defined in the SFOS GUI (IP addresses have been hidden by me):
[XXX_sailfishos_org]
Name=Soucelles
Type=wireguard
Host=X.X.X.X
VPN.Domain=sailfishos.org
WireGuard.Address=D.C.B.A/32
WireGuard.DNS=A.B.C.D
WireGuard.PrivateKey=<YOUR CLIENT PRIVATE CLIENT>
WireGuard.PublicKey=<YOUR SERVER PUBLIC KEY>
WireGuard.AllowedIPs=<REMOTE NETWORK>
WireGuard.EndpointPort=<WIREGUARD PORT>
WireGuard.PersistentKeepalive=15
WireGuard.DisableIPv6=false
and the vpn_XXX_sailfishos_org/settings file itself contains:
[vpn_XXX_sailfishos_org]
Name=Soucelles
SplitRouting=false
AutoConnect=true
Modified=2025-03-14T09:02:04Z
IPv4.method=fixed
IPv4.netmask_prefixlen=32
IPv4.local_address=D.C.B.A
IPv4.gateway=X.X.X.X
IPv6.method=off
IPv6.privacy=disabled