Skip to content

Run Plex Through Ngrok to Bypass CGNAT or Double-NAT Scenario

License

Notifications You must be signed in to change notification settings

Yawnz/docker-ngrok-plex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a modified version of the original ngrok-plex that allows you to specify the tunnel ip address if plex is running somewhere other than localhost. All credits go to the original authors.

ngrok-plex Docker Pulls Docker Image Size (tag) GitHub Repo stars

ngrok-plex is a command line utility to run Plex through ngrok to bypass CGNAT or Double-NAT scenario.

Supported Architectures

We utilise the docker buildx for multi-platform awareness. More information is available from docker here.

Simply pulling daemosofchaos/ngrok-plex-daemos:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64-<version tag>
armhf arm32v7-<version tag>

Usage

You will have to extract the Plex token sets for you and provide it to the CLI. But don't worry, I'll guide you through the entire process.

Extracting the Plex token

  • Go to any media in your Plex library.
  • Go to the Kebab Menu (⋮)
  • Click on Get Info
  • Click on View XML — a new tab should open up.
  • Go to the very end of the URL. You should see a 20 character string after X-Plex-Token=. Copy this string.

Here are the commands you'll need:

docker run -d --network host \
  --name=ngrok-plex \
  -e TZ=Europe/London `#optional` \
  -e PLEX_BaseIP=127.0.0.1
  -e PLEX_BasePort=32400
  -e PLEX_Token=XXXXXXXXXX
  -e NGROK_Token=XXXXXXXXXX
  daemosofchaos/ngrok-plex-daemos:latest

A cronjob will update new ngrok URL every 6 hours.

Parameters

Container images are configured using parameters passed at runtime (such as those above).

Parameter Function
-e TZ=Europe/London Specify a timezone to use EG Europe/London.
-e PLEX_BaseIP=127.0.0.1 Specify Plex IP to use. This also sets the tunnel IP.
-e PLEX_BasePort=32400 Specify Plex Port to use.
-e PLEX_Token=XXXXXXXXXX Specify Plex token to use.
-e NGROK_Token=XXXXXXXXXX Specify ngrok token to use.

Github Repository

https://github.com/Yawnz/docker-ngrok-plex

Docker Hub

https://hub.docker.com/repository/docker/daemosofchaos/ngrok-plex-daemos

Acknowledgements

All credit goes to @nagleaidan. Special thanks to @Rihcus for fixing many issues.

Warning

Use of this software may constitute a breach in the ngrok Terms of Service. Use at your own risk.

About

Run Plex Through Ngrok to Bypass CGNAT or Double-NAT Scenario

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 69.9%
  • Dockerfile 22.4%
  • Shell 7.7%