Setting Up A Fixed Static IP Address from the Pi Desktop

Setting up a static IP on the Raspbian Desktop (Pixel or Stretch), that doesn’t change, is really simple! But 1st, why do that? 

Back Story!

I have been using a Pi Zero W (the one with on board wifi) setup headless with a USB sound card, to control the volume on a set of boosted external speakers I have connected to my TV.

When I want to adjust the volume level, I just use an ssh client or the VNC app from my phone, to access the Pi Zero W and move the volume slider up and down. And, It works ok.

Only problem with this setup, is when we have had a power outage, my router would assign a new IP address to the Pi. Then I would have to connect the Pi Zero to an HDMI port on the TV to find the new address.

I am sure there is probably a better way to get the address while running headless, like pinging it with Windows or something, but have not bothered to look it up yet (yes I tried using raspberrypi.local but I have more than one Pi running usually, and that doesn’t always work for some reason). 

Anyway, I found a solution! I just assigned a static IP to the Pi Zero W!
Worked like a charm and now the address never changes on my home network! And here is how you do that!
BTW, this setup is only good if you don’t need to access to the internet with your pi. Because once you have assign the static IP, you will no longer have access the internet outside your home network, unless you have an extra wifi dongle attached. 
I have a usb hub attached to my Pi Zero W, so I have added an extra wifi dongle. I just have to put in my passkey, and now I have a static IP and a regular IP, to go online!
1. Go to the WIFI icon on the task bar and right click it.
2. Then click on the Wireless & Wired Network Settings.
3. Under Network Preferences, choose “interface” in the 1st selection box on the left.
4. Then click on the selection box on the right to show your WIFI connection.
Example: wlan0 usually is the default on the Pi, unless you have more than one WIFI connection. I am using a Pi Zero W but with an additional USB wireless network dongle, so I show wlan0 and wlan1.
5. Then in the box labeled IPv4 Address, put in something similar to your current IP address but change the last 3 numbers to something not already associated with a device connected to your router and that is not likely to get auto assigned to any other device you connect to WiFi with (i.e. your phone).
6. Then click Apply and close.
7. Then reboot!
Now you should have a fixed static IP address to connect to the PI, via ssh or VNC, that won’t change when say like the router gets shut off or reset due to a loss of power or other reason.
Need to Change It Back?
To do so, simply VNC into the Pi or connect it to a monitor again and go back to the wireless settings. Then click on the “clear” button at the bottom. This will remove the settings. Then click the “apply” and close button. Then reboot the Pi. Then you should be able connect to a regular WIFI signal and get online.
Anyway! I might not have the best way of doing this but it worked for me!


P.S. I have the comment section turned off at the moment! If you have any questions or comments about this or anything else on my site, please send me an email at! Or visit my facebook page where you will find this article shared, and post your comments or questions there, or like my page and send me a message!

About Robby 92 Articles
I am just your Friendly Neighborhood Computer Nerd ready to lend a keyboard to others who need IT help without the IT cost! I also love to cook, play golf and try to make people laugh!