Maker.io main logo

How to Set a Static IP on Raspberry Pi?

2025-09-15 | By Rinme Tom

License: General Public License Raspberry Pi SBC

This project tutorial explains how to set a static IP address on a Raspberry Pi using two modern and reliable methods: the NetworkManager command-line tool (nmcli) and the Raspberry Pi OS desktop GUI. It addresses the common issue where the Raspberry Pi frequently changes its IP address due to dynamic DHCP assignment by the router, creating difficulties in reliably accessing the Pi remotely or over the network.

Project Overview

  • Problem Addressed: The Raspberry Pi obtains a dynamic IP address by default via DHCP, which changes after reboot or router lease renewal, resulting in inconsistent network access.

  • Why Static IP: A static IP address keeps the Pi accessible with a fixed address, which is crucial for SSH, web servers, IoT projects, home automation, port forwarding, and multi-device networks.

  • Traditional Method Limitation: Editing /etc/dhcpcd.conf is no longer effective on recent Raspberry Pi OS versions because NetworkManager manages the network, overriding the old configuration.

  • Preferred Solution: Use NetworkManager’s CLI tool nmcli for a robust, headless-compatible approach to configure static IP for both Wi-Fi and Ethernet. Alternatively, use the Desktop GUI method on Pi OS with a graphical environment

    Set a Static IP on Raspberry Pi

    Key Steps in nmcli Method:

    1. Identify current IP, gateway, and network connection profile.

    2. Use nmcli connection modify to assign a manual static IP, gateway, and DNS.

    3. Restart the network connection for changes to take effect.

  • GUI Method: Change the connection profile from Automatic DHCP to Manual, enter IP address, gateway, subnet mask, and DNS via network settings in the desktop environment.

  • Static IP Best Practices: Select an IP outside the DHCP pool but within the same subnet to avoid conflicts.

    Raspberry Pi static IP WiFi

    Benefits:

    Ensures stable, predictable network presence for the Raspberry Pi, improving usability for remote access and server roles.

    Additional Notes:

    The tutorial includes troubleshooting tips, FAQs about static IP conflicts, performance impact (none), and suitable use cases for each method.

    This Set a Static IP on Raspberry Pi is ideal for anyone needing a persistent IP for Raspberry Pi setups related to IoT, local hosting, or remote administration, reflecting modern networking management on Pi OS. It provides clear commands and GUI instructions to help beginners and advanced users configure a static IP effectively on their Raspberry Pi devices.

Mfr Part # SC0192(9)
SBC 1.5GHZ 4 CORE 1GB RAM
Raspberry Pi
$312.67
View More Details
Mfr Part # SC1285
RASPBERRY PI 500 US - KIT
Raspberry Pi
$1,113.90
View More Details
Mfr Part # SC1566
CM5004064 (COMPUTE MODULE CM5, 4
Raspberry Pi
$574.77
View More Details
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.