So you have created a config file to connect your mobile to your wireguard VPN which looks something like


Address =
PrivateKey = QB+xJziH9NNd0kcf/M7pCW34hdhfjdhOlZA48LBE0=

# server
PublicKey = TY08u8fu98euf89ssxKTHw4K2GWBThIVvbyuFPPks=
AllowedIPs =
EndPoint =

Now you could copy that file over to your mobile with some file sharing service, or email it to yourself. But the wireguard app (at least on Android) supports reading the config from a QR code which can be quicker. The QR code can also be generated and shown in your terminal so you don't need to be running X or use any image viewer software. To create the code and display it in your terminal you need to install the qrencode package first which is available in most distros, then run the command

qrencode -t ansiutf8 < test.conf

and you will be shown a QR code which you can scan on your phone. Something like this


Previous Post Next Post