djismgaming Posted April 26, 2022 Share Posted April 26, 2022 (edited) DEPRECATED as development for this container has been stagnant since 2020. It has stopped working for me now on the latest Plex updates so far. It's better now to use a proxy like linuxserver/swag or NPM, with a tunnel solution like Cloudflare Tunnels. Remember to add your public domain URL on Plex's Network settings after turning ON the advanced settings. Be sure to include the port 443 on the URL or Plex clients will still try to use 32400 and fail to connect: Original post: Application Name: plex-ngrok Application Site: https://github.com/andriinuts/plex-ngrok-docker Docker Image Repository: https://hub.docker.com/r/andrijn/plex-ngrok Github: https://github.com/andriinuts/plex-ngrok-docker Please post any questions/issues relating to this docker you have in this thread. If you need help but are not using unRAID, then please do not post here, instead head to the application's GitHub repository and open an issue there. Edited April 25, 2022 by djismgaming (my 2nd unRAID template ever!) Edited November 29, 2022 by djismgaming added npm and specified tunnel solution Quote Link to comment
tiny-e Posted April 28, 2022 Share Posted April 28, 2022 Hi-- Which plex token are you grabbing? One seems pretty easy... the other less so. I'm a little confused by the steps required to get a more-permanent auth token from plex. My server does work from behind Starlink, but I'm wondering if this would make things more stable as plex keeps thinking it's disconnected (fixed immediately with a manual refresh). Quote Link to comment
djismgaming Posted April 28, 2022 Author Share Posted April 28, 2022 (edited) 2 hours ago, tiny-e said: Hi-- Which plex token are you grabbing? One seems pretty easy... the other less so. I'm a little confused by the steps required to get a more-permanent auth token from plex. My server does work from behind Starlink, but I'm wondering if this would make things more stable as plex keeps thinking it's disconnected (fixed immediately with a manual refresh). Yeah! Let's see if I can help you on this login to your plex server go to a movie you have there (where you see the cast/synopsis of the movie) push the 3 dots button called "More" when you hover over it select the option "Get Info" select the option "View XML" on the window that pops up get the Plex token from the end of the URL in Chrome/Edge/Safari/Opera like this example https://someserverinfo.plex.direct:32400/library/metadata/55587?checkFiles=1&includeAllConcerts=1&includeBandwidths=1&includeChapters=1&includeChildren=1&includeConcerts=1&includeExtras=1&includeFields=1&includeGeolocation=1&includeLoudnessRamps=1&includeMarkers=1&includeOnDeck=1&includePopularLeaves=1&includePreferences=1&includeRelated=1&includeRelatedCount=1&includeReviews=1&includeStations=1&X-Plex-Token=Abcd1234abCD1234 Just the values after "Plex-Token=" Abcd1234abCD1234 in this example That's your Plex token for use in the container Hope this helps! Edited April 28, 2022 by djismgaming Quote Link to comment
scurrie20 Posted April 29, 2022 Share Posted April 29, 2022 Hi, any idea why this is occurring? Quote Link to comment
djismgaming Posted April 29, 2022 Author Share Posted April 29, 2022 (edited) 2 hours ago, scurrie20 said: Hi, any idea why this is occurring? I really don't have any. My webUI shows the same (type of display, since the domain itself is different) but the connection works perfectly. The webUI is optional by the way. Not needed for anything regarding the connection or using it, as far as I know. Says "online" so it must be working. You can go (in your case) to http://0.tcp.ngrok.io:15538 and the Plex dashboard should load. All good there. Even accessing the link directly does not show any requests on that webUI page. Interestingly, the Status page shows the section "Inspect" as disabled. Maybe that's why. I really don't know how to enable it. Has not been needed to use the connection to Plex remotely or locally. Enabling it may even use more resources, so I'll not do so anytime soon Edited April 29, 2022 by djismgaming Quote Link to comment
[email protected] Posted April 29, 2022 Share Posted April 29, 2022 thank you!!!! works nicely, do you what's the limit for a free ngrok account ? is there any number of connections limit at the same time ? Network Bandwidth ? Quote Link to comment
djismgaming Posted April 29, 2022 Author Share Posted April 29, 2022 2 minutes ago, [email protected] said: thank you!!!! works nicely, do you what's the limit for a free ngrok account ? is there any number of connections limit at the same time ? Network Bandwidth ? I took this from their pricing section. So seems to be a peak of connections, the rate in which those connections are created and 1GB/month per agent. I looked on their TOS but they only say that there are specified limits. I could not find anything in my account dashboard as to which are my limits on the free account and what I'm using of those limits. Quote Link to comment
[email protected] Posted April 29, 2022 Share Posted April 29, 2022 8 minutes ago, djismgaming said: I took this from their pricing section. So seems to be a peak of connections, the rate in which those connections are created and 1GB/month per agent. I looked on their TOS but they only say that there are specified limits. I could not find anything in my account dashboard as to which are my limits on the free account and what I'm using of those limits. limit seems ok for using it with plex. with 1 current stream i have between 7 - 10 open connections, do you think is there gonna be a problem when there's more than 15 streams ? Quote Link to comment
djismgaming Posted April 29, 2022 Author Share Posted April 29, 2022 10 minutes ago, [email protected] said: limit seems ok for using it with plex. with 1 current stream i have between 7 - 10 open connections, do you think is there gonna be a problem when there's more than 15 streams ? I would really like to know on that regard but there is no info published on ngrok's site that I'm aware of. If I know something about that at some point, I'll update the post and reply here. Quote Link to comment
tiny-e Posted April 29, 2022 Share Posted April 29, 2022 21 hours ago, djismgaming said: Yeah! Let's see if I can help you on this login to your plex server go to a movie you have there (where you see the cast/synopsis of the movie) push the 3 dots button called "More" when you hover over it select the option "Get Info" select the option "View XML" on the window that pops up get the Plex token from the end of the URL in Chrome/Edge/Safari/Opera like this example https://someserverinfo.plex.direct:32400/library/metadata/55587?checkFiles=1&includeAllConcerts=1&includeBandwidths=1&includeChapters=1&includeChildren=1&includeConcerts=1&includeExtras=1&includeFields=1&includeGeolocation=1&includeLoudnessRamps=1&includeMarkers=1&includeOnDeck=1&includePopularLeaves=1&includePreferences=1&includeRelated=1&includeRelatedCount=1&includeReviews=1&includeStations=1&X-Plex-Token=Abcd1234abCD1234 Just the values after "Plex-Token=" Abcd1234abCD1234 in this example That's your Plex token for use in the container Hope this helps! Cool -- and thanks for the response-- I was just wondering how often one would need to do this -- Plex says that token is temporary.. (not sure if you know) Quote Link to comment
djismgaming Posted April 29, 2022 Author Share Posted April 29, 2022 1 hour ago, tiny-e said: Cool -- and thanks for the response-- I was just wondering how often one would need to do this -- Plex says that token is temporary.. (not sure if you know) Don't know but I'll update this thread if it does and if I found a permanent way Quote Link to comment
[email protected] Posted April 29, 2022 Share Posted April 29, 2022 Why you guys need update the Plex token ? What version of Plex are you guys using ? I have been using the Plex token for other apps and never need to changed. Quote Link to comment
djismgaming Posted April 29, 2022 Author Share Posted April 29, 2022 Yeah, that has been my own experience with other apps that use the Plex Token and I've used the same one gotten the same way. Quote Link to comment
tiny-e Posted August 22, 2022 Share Posted August 22, 2022 OK -- I was able to try this out today (also a starlink person). Could not connect to the plex-web interface unless I changed the NGROK_PROTOCOL variable to HTTP. Is that normal? Otherwise the link generated by ngrok wouk be like tcp://blah.blah.io and wouldn't go anywhere. Please let me know if, for some reason, I shouldn't use for http for this. Thanks! Quote Link to comment
colepez Posted August 24, 2022 Share Posted August 24, 2022 Is it possible to repurpose this for another ngrok proxy? I am trying to host a minecraft server any advice? Quote Link to comment
djismgaming Posted August 25, 2022 Author Share Posted August 25, 2022 On 8/22/2022 at 5:49 PM, tiny-e said: OK -- I was able to try this out today (also a starlink person). Could not connect to the plex-web interface unless I changed the NGROK_PROTOCOL variable to HTTP. Is that normal? Otherwise the link generated by ngrok wouk be like tcp://blah.blah.io and wouldn't go anywhere. Please let me know if, for some reason, I shouldn't use for http for this. Thanks! Nice catch on your configuration. On mine I tried it and did not work for the remote iOS client I use. Relly don't know the difference this makes on the Plex access apart of changing the protocol to be used with ngrok's service. 1 Quote Link to comment
djismgaming Posted August 25, 2022 Author Share Posted August 25, 2022 On 8/24/2022 at 10:07 AM, colepez said: Is it possible to repurpose this for another ngrok proxy? I am trying to host a minecraft server any advice? There should be a ngrok container by itself. I've not yet had a reason to deploy one myself from scratch for another application but Plex. This one is made for Plex since the developer added some python extras to make the URL change inside the Plex server configuration automatically after getting the details from ngrok. Quote Link to comment
tiny-e Posted October 6, 2022 Share Posted October 6, 2022 How do I know if it's working? I can access the server interface via the ngrok link, but it doesn't seem to care about the access token. Should plex be showing me the custom access URL that the container should be generating? Thanks again for any help! Quote Link to comment
djismgaming Posted October 6, 2022 Author Share Posted October 6, 2022 (edited) 25 minutes ago, tiny-e said: How do I know if it's working? I can access the server interface via the ngrok link, but it doesn't seem to care about the access token. Should plex be showing me the custom access URL that the container should be generating? Thanks again for any help! The URL provided by this container is not to be accessed directly by any user as this will change from time to time as far as I know. This URL is just sent to PLEX for it's servers to be able to find and access the media server itself. This get's sent to your client on Roku (as example) to connect to the server and retrieve media. I did just test it and it works to access the server directly after login in to the plex account. Now the PLEX token is for the container logic (Can be found here: https://github.com/andriinuts/plex-ngrok-docker) to be able to change the URL on your local PLEX media server settings. Specifically the entry: Custom server access URLs. That is because these URLs are dynamic (change from time to time). So this makes it an automated change Also this makes it so you don't have to use the Relay (More info: https://support.plex.tv/articles/216766168-accessing-a-server-through-relay/) as that is bandwidth limited to 2Mbps for Plex Pass subscribers and 1 Mbps for PLEX Free users. (notice I have it disabled at the moment) Edited October 6, 2022 by djismgaming Quote Link to comment
scurrie20 Posted November 29, 2022 Share Posted November 29, 2022 This has been working flawlessly for the last few months then it updated a couple of days ago and now it wont stay running. I've taken some screenshots of the logs, Any help would be greatly appreciated, Cheers Quote Link to comment
djismgaming Posted November 29, 2022 Author Share Posted November 29, 2022 Logs show a connection to WebUI on port 4040 not being successful. That is the web interface for the container itself, the one you can use to inspect the connection and the status of it. I never used that portion of the software that much prior to the deprecation of the app on the Community Applications. Maybe some password/is being used for it now? There can be changes that are not accommodated in the version of the template you have for the application. I've deprecated this one as it was not updated for quite some time. Now I see a new version was created just 3 days ago on dockerhub. If someone creates another app using the template, maybe they can see what changed and accommodate the template to those changes in the container. Quote Link to comment
djismgaming Posted November 29, 2022 Author Share Posted November 29, 2022 (edited) Looking at the change 3 days ago, not much changed. The alpine version used in the container and some lightly updated way to get the ngrok URL to pass on to the Plex server. That should, in my opinion, not change how the template behaves. It does say in your logs "connection refused". Check the variables are correctly set and that port 4040 is forwarded to a good port on your host. Variable needed are: Open TCP port 4040 in the Unraid ngrok docker for the web interface NGROK_PORT = 32400 NGROK_AUTH = Ngrok Authtoken from their website after you've created an account PLEX_TOKEN = Plex Authtoken PLEX_BASE_URL = Plex server url like http://192.168.0.21:32400 NGROK_PROTOCOL = set as TCP Edited November 29, 2022 by djismgaming Quote Link to comment
ParaiseHeights Posted January 2 Share Posted January 2 On 11/29/2022 at 6:58 AM, djismgaming said: Looking at the change 3 days ago, not much changed. The alpine version used in the container and some lightly updated way to get the ngrok URL to pass on to the Plex server. That should, in my opinion, not change how the template behaves. It does say in your logs "connection refused". Check the variables are correctly set and that port 4040 is forwarded to a good port on your host. Variable needed are: Open TCP port 4040 in the Unraid ngrok docker for the web interface NGROK_PORT = 32400 NGROK_AUTH = Ngrok Authtoken from their website after you've created an account PLEX_TOKEN = Plex Authtoken PLEX_BASE_URL = Plex server url like http://192.168.0.21:32400 NGROK_PROTOCOL = set as TCP My plex-ngrok is now failing in the identical fashion with a "connection refused error". It was working perfectly yesterday and now will not continue to run more than roughly 15 seconds before failing. I'm behind CG-NAT (T-Mobile 5G Internet Gateway) and this is the only way I know of to obtain Plex access outside my home network. Does anyone have any alternative, or a fix for this problem? Thanks! -Adrian Quote Link to comment
djismgaming Posted January 2 Author Share Posted January 2 @ParaiseHeights From my comment on the start of the thread, there is a way which I use without any issue so far. As a summary: I use a cloudflare tunnel to swag (reverse proxy) towards my plex container. You could just add the linuxserver.io mod universal-cloudflared to the linuxserver/plex container too. Easier and no need for a reverse proxy. I tested it with a radarr container and works as advertised. I just removed it and setup one for swag so all my apps go through the tunnel without specific configuration of the mod on every single linuxserver-based container. Also, the reverse proxy makes it so it works for every container, not just linuxserver-based ones. https://github.com/linuxserver/docker-mods/tree/universal-cloudflared Here you can see all mods available to all linuxserver.io containers. The universal option works for any of their containers. https://mods.linuxserver.io/ Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.