Last active 1 month ago Unlisted

Since there's some blocking going on with a certain German host

Alex's Avatar Alex revised this gist 10 months ago. Go to revision

1 file changed, 1 insertion, 1 deletion

docker-compose.yml

@@ -10,7 +10,7 @@ services:
10 10 net.ipv6.conf.all.disable_ipv6: 0
11 11 volumes:
12 12 ## Your WireGuard configuration file. Can be from any provider that allows you to generate WireGuard configurations for connections (e.g. Mullvad, AirVPN).
13 - ## Or if you're running a server from another non-Hetzner provider, you can also set up WireGuard on that. Using something like: https://github.com/Nyr/wireguard-install
13 + ## Or if you're running a server from another non-Hetzner provider, you can also set up WireGuard on that and use it as a VPN server. Something like this would work fine: https://github.com/Nyr/wireguard-install
14 14 ## The VPN service does not need to support port forwarding.
15 15 - ./my-vpn-provider.conf/etc/wireguard/vpn.conf
16 16 ports:

Alex's Avatar Alex revised this gist 10 months ago. Go to revision

1 file changed, 2 insertions, 1 deletion

docker-compose.yml

@@ -9,7 +9,8 @@ services:
9 9 net.ipv4.conf.all.src_valid_mark: 1
10 10 net.ipv6.conf.all.disable_ipv6: 0
11 11 volumes:
12 - ## Your WireGuard configuration file. Can be from any provider that allows you to generate WireGuard configurations for connections (e.g. Mullvad, AirVPN)
12 + ## Your WireGuard configuration file. Can be from any provider that allows you to generate WireGuard configurations for connections (e.g. Mullvad, AirVPN).
13 + ## Or if you're running a server from another non-Hetzner provider, you can also set up WireGuard on that. Using something like: https://github.com/Nyr/wireguard-install
13 14 ## The VPN service does not need to support port forwarding.
14 15 - ./my-vpn-provider.conf/etc/wireguard/vpn.conf
15 16 ports:

Alex's Avatar Alex revised this gist 10 months ago. Go to revision

1 file changed, 1 insertion

docker-compose.yml

@@ -15,6 +15,7 @@ services:
15 15 ports:
16 16 ## Expose the Plex port locally, so the host can reverse proxy it. In my case I have NGINX installed directly on the host, and I basically just: `proxy_pass http://127.0.0.1:32400;`
17 17 ## If you run NGINX Proxy Manager or similar, you will likely have to figure out slightly different solution
18 + ## This will allow you to serve streaming traffic between your Plex server and your users, directly from the Hetzner server. It's only using the VPN for "calling home" from Plex media server (the software) to Plex.tv servers (the Plex company's servers).
18 19 - "127.0.0.1:32400:32400"
19 20 restart: unless-stopped
20 21

Alex's Avatar Alex revised this gist 10 months ago. Go to revision

1 file changed, 46 insertions

docker-compose.yml(file created)

@@ -0,0 +1,46 @@
1 + services:
2 + vpn:
3 + container_name: plex-vpn
4 + image: jordanpotter/wireguard
5 + cap_add:
6 + - NET_ADMIN
7 + - SYS_MODULE
8 + sysctls:
9 + net.ipv4.conf.all.src_valid_mark: 1
10 + net.ipv6.conf.all.disable_ipv6: 0
11 + volumes:
12 + ## Your WireGuard configuration file. Can be from any provider that allows you to generate WireGuard configurations for connections (e.g. Mullvad, AirVPN)
13 + ## The VPN service does not need to support port forwarding.
14 + - ./my-vpn-provider.conf/etc/wireguard/vpn.conf
15 + ports:
16 + ## Expose the Plex port locally, so the host can reverse proxy it. In my case I have NGINX installed directly on the host, and I basically just: `proxy_pass http://127.0.0.1:32400;`
17 + ## If you run NGINX Proxy Manager or similar, you will likely have to figure out slightly different solution
18 + - "127.0.0.1:32400:32400"
19 + restart: unless-stopped
20 +
21 + plex:
22 + image: plexinc/pms-docker:latest
23 + container_name: plex
24 + depends_on:
25 + - vpn
26 + ## The important line, makes all network traffic for the Plex container go through the VPN container.
27 + network_mode: "service:vpn"
28 + environment:
29 + ## I don't actually remember if these are necessary lmao
30 + - PUID=1000
31 + - PLEX_UID=1000
32 + - PGID=1000
33 + - PLEX_GID=1000
34 + - VERSION=docker
35 + ## Claim token, if needed
36 + # - PLEX_CLAIM=claim-rr-blah-blah-blah
37 + volumes:
38 + ## Plex configuration/logs/etc.
39 + - ./config:/config
40 +
41 + ## Change this to where you have your media stored.
42 + - /data/media:/media
43 + restart: unless-stopped
44 + ## Expose the [i]GPU to the container. For hardware transcoding
45 + devices:
46 + - /dev/dri:/dev/dri
Newer Older