Synology, Plex, ports and missing URLs
I’ve had a Synology for many years, and the interface has changed over time, obscuring useful information for installed apps.
One of my favorite apps to run on it is Plex. In the Synology interface, it used to be easy to open Plex. The URL was shown in the “Package Center” when looking up the app.
Below is a screenshot of how the interface used to look. This is not a screenshot I created. I can’t show one of my own since mine no longer shows the URL.
As the big arrow points out, there was a handy URL showing how to access the Plex application running on the Synology. Other web apps running on the Synology also had this handy URL in the “Package Center” interface.
At some point, that URL part of the interface was no longer there.
That URL short cut is very useful. It turns out that it’s not missing from the Synology interface entirely. It’s just moved.
Below are two screenshots. The first points to the icon in the upper left corner. If you hover your mouse over this icon, you’ll see it referred to as the “Main Menu”. I would argue that this is a poor name for what this actually represents, but it’s what you’ll need to click to find the following screen with icons on it.
Clicking on the Plex icon takes me to
http://192.168.1.20:32400/web/index.html, a URL on my local network. Take note of that port number in the URL,
32400, I’ll reference that again in a bit.
Each of the icons shown is a clickable link to a web app running on the Synology. I did not say all web apps running on your Synology though, and that’s why the rest of this post exists. This shortcut does work for some apps and not for others. My assumption is that some apps are written to pass information back to Synology to allow this, but some aren’t.
How else might you find what the URL for Plex was if this didn’t exist? Figuring this out will help find apps that don’t show up in this menu.
An example of an app that doesn’t show up in this icon list is DarkStat. It’s a useful app that provides a way to “capture network traffic, and has a web interface that serves up reports of statistics,” according to its homepage. The web interface is something you’ll need to track down on your own though because it doesn’t show up in the list of icons we just used to find Plex.
netstat to the rescue
To find the ports that are being used on your Synology, we’ll need to log into it via the terminal.
I won’t go into much detail on how to do that here. It’s easily findable on your search engine of choice, but the basics are that you need to enable it and know the IP address of your Synology. For example, you’d type something like this into your terminal.
ssh firstname.lastname@example.org -p 22
This basically means login with the username “admin” to some IP address on the local network specifying a port, 22 in this example.
Assuming you’ve logged in, run
netstat along with
grep to filter the results. (You can learn more on the netstat Wikipedia page.) In this example, we’ll filter by “Plex Media”. I’ve wrapped it in quotes because it has a space in the text.
sudo netstat -lpna | grep "Plex Media"
When I clicked the Plex icon in the Synology Main Menu, it took me to a URL with a specific port of
Look at the first few lines returned by the
netstat command. There are references to the
tcp protocol and some of those lines reference the port
32400. One references an IP of
0.0.0.0:32400 and one
192.168.20:32400. That’s our Plex URL. We’ve found it without relying on the Main Menu in the Synology interface.
Finding DarkStat’s IP
Now that we see how to use
netstat to find something we already know, we can try to find the DarkStat URL, which we don’t know.
sudo netstat -lpna | grep dark
There are fewer lines returned this time around, but only a single port is referenced,
667. Trying to load the Synology IP address in my browser with that port number shows the DarkStat web interface.
That’s how you can find the port and URL of an app running on a Synology.