Pritunl VPN-Client for Alpine Linux

Dear @zach ,

I finally managed to setup my Pritunl VPN-Servers.
I would love to use Pritunl VPN-Client in a small (minimal) Alpine Linux LXC-Container on my Proxmox-Homeserver.

Any change that Alpine Linux will be supported for pritunl-client?

Best regards,
MacGyver

If you only need the CLI client it’s very easy to install it directly from the source. The pritunl/pritunl-client repository has information on doing this.

Got a build-script with help of AI; has worked on Alpine Linux 3.24:

#!/bin/sh
set -eu

GO_VERSION="1.25.5"
GO_ARCHIVE="go${GO_VERSION}.linux-amd64.tar.gz"
GO_URL="https://go.dev/dl/${GO_ARCHIVE}"
GO_SHA256="9e9b755d63b36acf30c12a9a3fc379243714c1c6d3dd72861da637f336ebb35b"

SUDO=""

echo "Installiere benötigte Alpine-Pakete ..."
${SUDO} apk add --no-cache \
    ca-certificates \
    git \
    openvpn \
    wireguard-tools \
    wget \
    tar

${SUDO} update-ca-certificates

echo "Installiere Go ${GO_VERSION} ..."

# Cache-Verzeichnis anlegen, falls es noch nicht existiert
mkdir -p "${HOME}/.cache"

rm -rf "${HOME}/.cache/${GO_ARCHIVE}"
wget -O "${HOME}/.cache/${GO_ARCHIVE}" "${GO_URL}"

cd "${HOME}/.cache"

echo "${GO_SHA256}  ${GO_ARCHIVE}" | sha256sum -c -

${SUDO} rm -rf /usr/local/go
${SUDO} mkdir -p /usr/local

${SUDO} tar -C /usr/local -xzf "${GO_ARCHIVE}"

rm -f "${GO_ARCHIVE}"

echo "Konfiguriere Go-Umgebung ..."

PROFILE="${HOME}/.profile"

touch "${PROFILE}"

if ! grep -q 'export GOPATH=' "${PROFILE}" 2>/dev/null; then
    cat >> "${PROFILE}" <<'EOF'

# Go
export GOPATH="$HOME/go"
export GOROOT="/usr/local/go"
export PATH="/usr/local/go/bin:$GOPATH/bin:$PATH"
EOF
fi

export GOPATH="${HOME}/go"
export GOROOT="/usr/local/go"
export PATH="/usr/local/go/bin:${GOPATH}/bin:${PATH}"

echo "Go-Version:"
go version

echo "Kompiliere Pritunl Client ..."

go install github.com/pritunl/pritunl-client/service@latest
go install github.com/pritunl/pritunl-client/cli@latest

${SUDO} install -m 0755 \
    "${GOPATH}/bin/service" \
    /usr/bin/pritunl-client-service

${SUDO} install -m 0755 \
    "${GOPATH}/bin/cli" \
    /usr/bin/pritunl-client

echo "Erstelle OpenRC-Service ..."

${SUDO} tee /etc/init.d/pritunl-client >/dev/null <<'EOF'
#!/sbin/openrc-run

name="Pritunl Client Daemon"
description="Pritunl VPN Client Daemon"

command="/usr/bin/pritunl-client-service"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"

respawn_delay=5

depend() {
    need localmount
    need net
    after bootmisc
}
EOF

${SUDO} chmod 0755 /etc/init.d/pritunl-client

echo "Aktiviere und starte Pritunl Client ..."

${SUDO} rc-update add pritunl-client default
${SUDO} rc-service pritunl-client start

echo
echo "Installation abgeschlossen."
echo
echo "Status des Dienstes:"
${SUDO} rc-service pritunl-client status

echo
echo "Verfügbare Befehle:"
echo "  sudo pritunl-client add <profile_uri>"
echo "  sudo pritunl-client list"

All of the full build scripts for Pritunl packages are in the pritunl/pritunl-pacur repository. This can be used with AI to create source installations for other distributions and other packages including the Electron GUI client.