How to find the IP Address of your Plex Media Server
Learn hwo to get your server's IP address and set it to be what you want
An IP Address is a way to identify a device on your network. There are times when it is important to known what the IP address of your Plex Server is in order to communicate with it and send it messages. For instance you may need to know your Plex Server's IP in order to SSH into it and update it.
First some background on IP addresses in general. Most home networks have a setup like this:
Public vs Local IP Address
The router is assigned a public IP address (Red) by your Internet Service Provider (Cox, Verizon, Comcast, CenturyLink, etc). Your router can communicate with the internet using that IP address. When you connect a device to your local network, it is assigned a local IP address (Blue) by your router. This IP address is only meaningful inside your local network.
Devices on your local network can communicate with each other with local IPs. If you want to do something like SSH into your Plex Server from another computer in your local network you will want to know the server's local IP.
When a device on your local network wants to communicate with the internet (check email, view a webpage, or stream Plex to a remote device), the local device will talk to the router which will in turn use the public IP address to talk to the outside world.
Although this can vary, it is common for local IP addresses to be in the form 192.168.1.XXX with the router assigning itself 192.168.1.1 and other devices on the network being assigned IP addresses between 192.168.1.2 and 192.168.1.255.
Finding your Plex Server's Local IP Address
Finding your Plex Server's Local IP Address from Server (Windows)
If you are running your Plex Server on a Windows machine, you can find its IP address by opening up network properties.
Once you have the properties open and can scroll down and your should see a few properties of your network, one of them will be your IPv4 Address.
Finding your Plex Server's Local IP Address from Server (Linux)
If your Plex Server is running on Linux, you can find your local IP address easily by running the following command:
ifconfig
The command will list information about all of your network interfaces. Interfaces are named so the wired ethernet interfaces usually start with "e", wireless interfaces start with "w" and loopback device (which we don't care about) are "lo". The command will print out something like this:
lo:
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
wlp4s0:
inet 192.168.1.7 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe70::42e1:1053:9ca7:397 prefixlen 64 scopeid 0x20
In this example the local IP address for the wireless interface would be 192.168.1.7.
Finding your Plex Server's Local IP Address from Another Computer (Linux)
Sometimes, you may not be able to easily access your server to check its IP address. For instance if you run your Plex Server headless (without a monitor) and need to SSH into it. You can scan your local network from another computer on the network to find the server's IP. If you have a linux computer on the local network, you can run the following command (you may need to install nmap from you package manager):
nmap -p 32400 192.168.1.0/24
This command will scan all IP address on your network and check if port 32400 is open. Plex uses port 32400 so it should only be open on your server. You should see the IP addresses of the devices on your network listed out. Most of them will say that port 32400 is closed. One IP address should say that port 32400 is open. That IP address is your server's local IP address.
Nmap scan report for 192.168.1.3
Host is up (0.090s latency).
PORT STATE SERVICE
32400/tcp closed plex
Nmap scan report for 192.168.1.5
Host is up (0.011s latency).
PORT STATE SERVICE
32400/tcp open plex
In this example 192.168.1.5 has an open port 32400 and is the Plex Server on the network.
Finding your Plex Server's Local IP Address from Your Router
You can also find your server's IP address by going through your router's web interface. There is usually a reserved domain that your router will use for the interface. This web address is often on a sticker on the router. It's usually something like "routerlogin.com." If you can't find it you can try just typing in the IP address of the router in your web browser. As we said above, your router's IP is usually 192.168.1.1. If not you can find your router's IP address with this command:
ip route
Your router's IP address will be the one listed as the default route. In this case it is 192.168.1.1.
default via 192.168.1.1 dev wlan0 proto dhcp metric 600
Once you are able to login to your router's web interface there is usually a section for "attached devices" which list all devices connected to your router and their assigned IP addresses. If you know your server's host name, you can match it to an IP address. For example the host name for a raspberry pi plex server is usually "raspberrypi."
The Problems with Dynamic IP Addresses
When a new device connects to your local network, it will be assigned an IP address by your router, usually with the DHCP protocol (The details of this aren't important). What is important is that IP addresses are assigned dynamically (The D in DHCP). This means that the router can pick whatever IP address that it wants to give to the device, as long as its not already assigned to a different device. The router does not always have to give the same device the same IP address.
For instance when you come home and your cell phone reconnected to your home network WiFi, your router may assign it the last IP address that it had, or it may pick a new one. It's up to the router. Even if you have a device like a Plex Server that stays connected to your home network at all times, its IP address is not guarenteed to stay the same. Devices only "lease" a certain IP address from the router for a certain period of time after which they will have to ask the router for a new IP address. At this time the router often gives back the same IP address that was assigned but it does not have to. This can be a problem if you want to connect to your server and you need to know it's IP address
Using a Static IP Address for your Plex Server
The way to get around the problems of dynamic IPs is to assign your server a static local IP address, which means that it will always be assigned the same IP. In general there are two ways to go about doing this: 1) You can tell your server to request that the router assign it a certain IP address when it asks for one. If the address is not already taken, the router should comply with the request. Or 2) tell the router to reserve a specific IP address for your server, which mean that it will always give the server the same IP address and never give that address out to anything else. The second way is preferable if your router allows it (which it should). Each router does this a little differently. We are going to go over doing this for a Netgear router, but other router generally should have a similar process.
Which static IP should I use?
Most home routers will give out IP addresses between 192.168.1.1 and 192.168.1.255 to devices that connect to it. You can reserve any IP in the range that you want for your server. I tend to choose an address that is on the higher end and is easy to remember - 192.168.1.100
Set Static Local IP Address from Router (Netgear)
Log into your router's web interface. The directions for doing this, as well as the default username and password are usually on the router. For Netgear routers, you can access the web interface by opening a browser and entering routerlogin.com. The default username is usually "admin" and the default password is "password" (You should really change that). When you login in you should have something like this:
Click the "Advanced" tab to get more options. Then go to [Setup]->[LAN Setup] on the left hand side.
In the "Address Reservation" section, hit "Add".
You should see a list of all of the devices connected to your router. Find your Plex server in the list and select it. It should auto populate the bottom fields with its hostname, current IP address, and MAC address. Change the last digits of the IP address to be whatever would like. We use 192.168.1.100, a nice easy to remember round number. Then hit "Add"
You can now hit Apply on the LAN Setup page to put the address reservation into effect. Your server with probably need to be restarted for the change to take effect. But after that it should have whatever IP address you chose while it it on your network.
A static IP address for your Plex Server can make your life a lot easier.