How to authorize Plex server on Synology NAS

Hi all, I’m playing with synology (using xpenology on re-purposed pc) and have successfully installed Plex. The problem is the server doesn’t appear. On the web app xxx.xxx.xxx.xxx:32400 it allows me to sign in using my plex account credentials and shows me all the users in my account. I can sign in with those users but there are no plex servers showing.

On my iphone app I can see the plex server but it is unathorized. I remember having to authorize my original plex server (different PC, different IP and currently turned off) but I can’t work out how to authorize this one.

Any help would be greatly appreciated! Thanks!!

Since you’re using a repurposed PC, and DSM is designed to be headless but does support SSH, even though on your same network, SSH tunnel your browser connection to it and jump in that way.

on your computer:

  1. ssh -l admin -L 8888:localhost:32400 To establish the tunnel
  2. Log in and let the terminal session sit there. We’re going to use the port forwarded channel for our needs
  3. Return to your computer’s browser: Open http://127.0.0.1:8888/web
  4. (Local port 8888 is port forwarded to port 32400 in DSM)
  5. Proceed in that window just like you would anywhere else since you are on the loopback with full authority

Hi Chuck thanks for your response, but you lost me at step 1! I have some limited experience with telnet and next to no experience with ssh. I’m looking at putty / remote terminal apps on my PC but can’t seem to work out how to replicate your step 1 instruction.

I have direct access to the Synology CLI (as I haven’t removed the keyboard / mouse yet), but it looks like that’s not going to help in this case anyway.

Second question - where’d you get the 127.0.0.1 IP from? Would I replace that with the IP of the synology nas?

Thanks again.

EDIT
I can SSH into the nas using putty. It presents me with the login prompt and I can successfully login. I do get an error "Could not chdir to home directory /var/services.homes/admin: No such file or directory

Ok time to revisit this problem. I walked away from Synology and have recently come back - with a better understanding of the DSM etc. I’m still having the same problems though. I can’t seem to create a secure ssh tunnel to the server.

  1. When I try your command line using Windows (10) telnet I get a command line error
  2. I have VERY carefully followed the instructions here: https://quickbox.io/wiki/setting-up-an-ssh-tunnel-for-plex/ which seem to be what you were getting at. I can connect to the server, even login as admin, but when I try http://localhost:8888/web I get “Can’t reach this page”

I fear I’m still doing something wrong, or missing a step somewhere… Going to bed now to sleep on it. Any help or advice would be greatly appreciated!

Edit: When i say login as admin, I mean login with an account with full admin privileges. I have disabled the default admin account. Does this matter?

… and I’m no longer getting the error mentioned 2 posts above

  1. SSH, not Telnet. Screen copy and attach what you are getting. Which command? What error?
  2. In DSM -> Control Panel -> Terminal & SNMP, have you enabled ssh ?

@ChuckPa

  1. My bad. Now using ssh. I think I should expect a confirmation, but this is what I get

  2. Yep SSH has been enabled.

@trumpy81

I appreciate your time and apologise for making you cut and paste those instructions yet again! I have followed them in other threads but have still had no luck. I’ve dug into the logs and think I’ve found the cause of the problem.

Jul 08, 2017 19:59:02.229 [0x7f57c87ff700] DEBUG - Request came in with unrecognized domain / IP ‘213.123.9.62’ in header Host; treating as non-local
Jul 08, 2017 19:59:02.229 [0x7f57c87ff700] DEBUG - Request: [213.123.9.6:63248 (Subnet)] GET / (3 live) GZIP
Jul 08, 2017 19:59:02.229 [0x7f57c87ff700] DEBUG - Completed: [213.123.9.6:63248] 401 GET / (3 live) GZIP 0ms 416 bytes (pipelined: 7)
Jul 08, 2017 19:59:02.299 [0x7f57c8511700] DEBUG - Request came in with unrecognized domain / IP ‘213.123.9.62’ in header Host; treating as non-local
Jul 08, 2017 19:59:02.300 [0x7f57c1d11700] DEBUG - Request: [213.123.9.6:63248 (Subnet)] GET /identity (3 live) GZIP
Jul 08, 2017 19:59:02.300 [0x7f57c8511700] DEBUG - Completed: [213.123.9.6:63248] 200 GET /identity (3 live) GZIP 0ms 472 bytes (pipelined: 8)

Yes those are funky IPs. When I set up my home network years ago I was playing around with it, now my routers DHCP server is set up with a bunch of custom IPs for my home network and I’m loathe to change it… but I digress.

I have tried editing the preference.xml to include this custom network but adding:

<?xml version="1.0" encoding="utf-8"?>

When I do this I can’t access http://my.server.ip.here:32400 at all.

I’ve got to rush off to work now. Thanks both for your time!

I will help clarify the ssh command. You have the first parts right… The only thing you forgot to add is the actual IP address of your Synology

ssh -l admin -L 8888:localhost:32400 ip.addr.of.synology

:slight_smile:

1 Like

I will help clarify the ssh command. You have the first parts right… The only thing you forgot to add is the actual IP address of your Synology

ssh -l admin -L 8888:localhost:32400 ip.addr.of.synology

damn! So my ssh skill shine through. That’s got it!! Adding media now, will wait until things settle down and see how it all performs.

Thanks so much to both of you!

Hi Guys.

Quite desperate here as when creating SSH tunnel, I get the following message:
channel_setup_fwd_listener_tcpip: cannot listen to port: 8888
Could not request local forwarding.

I access synology via SSH via macOS terminal and type “ssh 5.5.5.3 -L 8888:localhost:32400”. Tried also “ssh -l admin -L 8888:localhost:32400 5.5.5.3”.

It seems unless I overcome this and setup up the SSH tunneling, I cannot authorize the plex server and get it listed on synology web interface => recognized by other devices.

Many thanks in advance for your help!

@crishtal said:
Hi Guys.

Quite desperate here as when creating SSH tunnel, I get the following message:
channel_setup_fwd_listener_tcpip: cannot listen to port: 8888
Could not request local forwarding.

I access synology via SSH via macOS terminal and type “ssh 5.5.5.3 -L 8888:localhost:32400”. Tried also “ssh -l admin -L 8888:localhost:32400 5.5.5.3”.

It seems unless I overcome this and setup up the SSH tunneling, I cannot authorize the plex server and get it listed on synology web interface => recognized by other devices.

Many thanks in advance for your help!

The command, as you’ve typed it, is out of sequence. Also, it leaves the remote host reference susceptible to IPv4 / IPv6 flipflop

Therefore, it is recommended ssh -l admin -L 8888:127.0.0.1:32400 ip.addr.of.syno (options before remote IP address) This makes certain to call out IPv4 on the remote and guarantees the default loopback adapter on all hosts.