Private Internet Access App in Gentoo.
Private Internet Access (PIA) is a widely used virtual private network (VPN) service known for its strong focus on privacy, security, and affordability. Owned by Kape Technologies since 2019, PIA operates under a verified no-logs policy, which has been audited by Deloitte and tested in court.
For many Openrc init users like myself, PIA does not natively work and there is the need to manually work around in order to lauch the application. I will guide you through this simple trick to get your vpn up and running!
First, head over to the PIA downloads page and get the linux file. As at the writing of this post , the only version which works great is the v3.6.0
Now navigate to the downloaded file path in your terminal and execute this code:
bash pia-linux-<version>-<revision>.run -- --skip-service
Create the OpenRC Init Script:
sudo nano /etc/init.d/pia-daemon
Paste the following content:
#!/sbin/openrc-run
name="pia-daemon"
description="Private Internet Access Daemon"
command="/opt/piavpn/bin/pia-daemon"
command_background=true
pidfile="/run/${name}.pid"
directory="/opt/piavpn"
user="pia"
group="pia"
want net
depend() {
after firewall
after dns
after logger
need localmount
need sysfs
need devfs
}
start_pre() {
if [ ! -d "/run/pia-daemon" ]; then
mkdir -p /run/pia-daemon
chown pia:pia /run/pia-daemon
fi
return 0
}
Make it executable:
sudo chmod +x /etc/init.d/pia-daemon
Ensure Required Dependencies Are Installed
PIA requires libgssapi_krb5.so.2. Install MIT Kerberos:**
sudo emerge --ask app-crypt/mit-krb5
Enable the Service at Boot
sudo rc-update add pia-daemon default
Start the Daemon:
sudo rc-service pia-daemon start
sudo rc-service pia-daemon status

That's it! You can now launch the PIA app in Gentoo Openrc.