PIA VPN gateway (WireGuard/OpenVPN) with kill switch, for routing m3u-editor/IPTV through PIA
215
Source, issues and full docs: github.com/GeorgeAL78/pia-iptv
m3u-editor with a built-in Private Internet Access (PIA) VPN and kill switch, in one container.
The container connects to PIA first, then starts m3u-editor exactly as its own image does. Everything m3u-editor does online (playlist and guide syncs, proxied streams, logos when the logo proxy is on) uses the VPN. If the tunnel drops, that traffic stops instead of falling back to your regular connection. Players connect to m3u-editor over your LAN.
player ──LAN──▶ :36400 ──▶ ┌ pia-iptv ───────────────────────────┐
│ m3u-editor │
│ WireGuard/OpenVPN + kill switch ────┼──PIA──▶ internet
└─────────────────────────────────────┘
The VPN layer is adapted from pia-qbittorrent-docker.
/dev/net/tun available on the host (ls -l /dev/net/tun)NET_ADMIN for the containergit clone https://github.com/GeorgeAL78/pia-iptv.git && cd pia-iptv
cp .env.example .env # fill in your PIA login, region and APP_URL
docker compose up -d
Open APP_URL (by default http://<docker-host-ip>:36400). m3u-editor's default login is
admin / admin; change it.
Instead of PIA_USERNAME/PIA_PASSWORD you can mount a file as /auth.conf:ro, with the
username on line 1 and the password on line 2.
Install pia-iptv from the template in unraid/ or in
GeorgeAL78/unraid-templates. Fill in your PIA
login, pick a region, set App URL to http://<your-unraid-ip>:36400, and start it.
In m3u-editor:
In the player (TiviMate, IPTV Smarters, VLC, Kodi, ...), add an Xtream Codes playlist with
server http://<docker-host-ip>:36400 and those credentials.
Browser-based players often can't play raw MPEG-TS, AC3 audio or HEVC. If a channel fails only
in a browser, try the playlist's m3u8 output or a native player.
VPN:
| Variable | Default | |
|---|---|---|
PIA_USERNAME, PIA_PASSWORD | PIA login, or mount /auth.conf | |
PIA_REGION | us-newjersey | Region id or name, e.g. us_chicago, ca_toronto, uk, de-frankfurt |
VPN_CLIENT | wireguard | wireguard or openvpn |
LAN_NETWORK | Only these source ranges may connect (comma-separated), e.g. 192.168.0.0/24. Empty = any | |
LAN_PORTS | APP_PORT | Ports reachable from the LAN. Defaults to m3u-editor's port (plus XTREAM_PORT if set) |
DNS_SERVERS | 9.9.9.9,149.112.112.112 | Resolvers, used through the tunnel |
LEGACY_IPTABLES | false | Use iptables-legacy, if the firewall fails to build on your kernel |
TZ | Timezone |
m3u-editor:
| Variable | Default | |
|---|---|---|
APP_URL | How browsers and players reach it, e.g. http://192.168.0.10:36400 | |
APP_PORT | 36400 | Web UI and Xtream port |
AUTO_LOGIN | false | true opens the web UI without signing in. Anyone allowed by LAN_NETWORK gets admin |
PG_PASSWORD, M3U_PROXY_TOKEN | generated | Internal secrets. Generated on first start and kept in /var/www/config |
Other m3u-editor variables work as documented in its own repository.
Volumes: /var/www/config (settings), /var/lib/postgresql/data (database),
/var/www/html/storage/app/public (uploads).
Pick a PIA region close to you or to the servers m3u-editor connects to. Distance adds latency, which can cause buffering at high bitrates such as 4K.
io.github.m3u-editor.version image label). A scheduled
workflow checks every 6 hours and publishes a new pia-iptv version when m3u-editor publishes a
new stable release.GPL-3.0-or-later. See LICENSE and NOTICE. m3u-editor is a separate project by sparkison under its own license.
Content type
Image
Digest
sha256:3d7f1dd3c…
Size
220.5 MB
Last updated
about 3 hours ago
docker pull gjergjk/pia-iptv