You should be able to access your PI/OctoPrint from a device running macOS or iOS (iPhones, iPads) without the IP address by using
<hostname>.local in your web browser or when accessing via SSH (OctoPi's default is
octopi.local). On Windows you should be able to see your OctoPrint instance pop up in the Explorer under "Network > Other Devices". On Linux and Android devices, you will need to access by the IP address.
Finding Your Pi's IP address
Option A: Access your router's set-up/control page
If you have access to your router's set up page, there is usually an option to show all connected devices. The details of doing this are beyond what I'll go into here, since each router brand/model is different. In short, you access the page by entering the router's IP address in your web browser's address bar. The Router's IP address varies, but two commonly used setups are 192.168.1.1 and 192.168.0.1 (or you can find it in your computers network information). You'll most likely need a username and password to log on to your router (get those from your ISP, if they will give that information out). Then poke around the various options. Look for something that says DHCP, or LAN, or WLAN and see if it brings up a list of connected devices. Look for a device named "octopi" in that list (if you have renamed your octopi hostname to something else, look for that name). If you see the name in the list as an active device, your Pi is connected and is using the IP address indicated.
Option B: Use a Network scanner
There are a number of free apps you can download. I use the free Angry IP Scanner (works on Windows, macOS, and Linux - I have not tried running the Linux version on a Pi). Fing is also a good free option (runs on Windows, macOS, Linux - and has a Pi version. You can also find the Fing app for Android and iOS devices.)
Log on to your WiFi network with the device on which you will be running the network scanner app, launch the app and tell it to scan the network. Look through the result for a device named "octopi" (or whatever name you have given your OctoPi setup). Note that some IP scanners will remember devices from a previous scan and show them even if they are not presently on the network (in this case, usually dimmed out). You are looking for active devices. (If you app shows both active and inactive, you can usually set a filter to show only active devices.) If you see the name in the list as an active device, your Pi is connected and is using the IP address indicated.
An advanced option is
nmap -p 22 192.168.0.* (or whatever your network prefix is).
Option C: Connect to the Pi via Ethernet
If your Pi is connected to your local network (or directly to a computer) via an Ethernet cable, you can SSH into it to enter commands on the command line. Follow the commands listed under Option D.
Option D: Plug in a monitor and keyboard
You can also access the Pi by plugging in a keyboard and monitor. This is the recommended failsafe if you can't find it with the above options. Log into your Pi and enter the following command on the command line:
If your Pi is connected to the WiFi network, a section of the output should look something like this:
wlan0 Link encap:Ethernet HWaddr xx:yy:zz inet addr:192.168.aa.bb (followed by other stuff)
The four-part number is the IP address assigned to your Pi by your router for WiFi access. (The "
192.168." start of the number is a very common sequence for home WiFi networks. Another common starting number sequence is "
10.". Unless you have an unusual network/router setup, yours will likely look similar. Large corporate or school networks will likely be different.)
If the Pi is not connected to a WiFi network, the
wlan0 section of the output from that command should start with something like this:
wlan0 Link encap:Ethernet HWaddr xx:yy:zz UP BROADCAST MULTICAST MTU:1500 Metric:1
In other words, there's no line listing "inet addr:" for wlan0.
If you have connected by Ethernet cable, look for the section starting with '
eth0' instead of '
wlan0'. Reading the output is the same as for the wlan0 entry.
Alternatives to Hunting for an IP Address Each Time:
Unless you have set up a static IP for your Pi, it will most likely change from time to time. If you don't want to have to hunt for the IP address each time it changes, you have several options:
Access Method A: Access your Pi by Name:
The Raspian OS (on which OctoPi is built) comes with Zeroconf installed (Zero Configuration Networking standard), and OctoPrint has a bundled discovery plugin so devices which also have some form of Zeroconf installed (included with Apple iOS/MacOS, can be added to Windows ) should be able to find OctoPrint by entering
hostname.local into their browser (in OctoPi this would be
octopi.local unless you have changed the default setting). You should also be able to SSH into the Pi using:
Access Method B: Set up a Static IP address for your Pi:
A Static IP address assures that your Pi has the same address each time it connects to your network. You still need to remember an IP address, but it will not change over time.
You can set up a Static IP address from your router's configuration page. Since how to do this varies from brand to brand, and even between models within a brand, a how-to is beyond the scope of this post. Try a Google search on your modem's brand and model with the words "Static IP" included to find instructions on how to do this.
It is also possible to have your Pi request a Static IP from your router. (This may not always work, especially on complex networks).
To do: add link to instructions for requesting a Static IP from the Pi.
Access Method C: Have your Pi email you its IP address upon Startup:
Your Pi can email you its IP address and a greeting message at each startup. This is one of my favorite solutions, as it both sends the IP address, and the email confirms that the Pi is up and running. Find instructions at this YouTube video: Auto-mailing the Pi's IP.
Click 'Show More' in the video's description to find the text instructions. In the "Running the emailer on Boot" section, do not use the method entitled UPDATED METHOD FOR PIXEL NEW PI. The OctoPi image is based on a 'Lite' version of the Raspian operating system which does not include some of the files necessary for this method to work. Instead, scroll down to line 142: OLD METHOD THAT USED TO WORK WITH OLDER PI.
I did vary their instructions slightly. I set up a separate gmail account for the PI to use, as they suggested (you need to make some changes to the security settings for the account in order for the Pi to have access, and this is not recommended for your main email account). They have the Pi send the email from it's own account and to its own account. I changed the "To:" address in the script to my own email address, since I can receive these emails without lowering the security settings in my own account.
I have used this successfully in OctoPi 0.13 and 0.14. Please reply if you've used this with other versions.
Access Method D: dynip
Access Method E: AWS Route 53