Raspberry Pi & Self Hosting

Give the Raspberry Pi a predictable local IP address

October 3, 2026•Beginner•20–30 min
Beginner20–30 minStep 3

Port forwarding and administration are much easier when the Pi always receives the same LAN address.

Goal
The Pi should keep the same LAN IPv4 address after a reboot and remain reachable by SSH.

Step-by-step

01

Find the current address

Log in to the Pi and identify the active IPv4 address and default gateway.

ip -4 addr
ip route
02

Open your router administration page

From a computer on the same network, sign in to your router or ISP gateway. Look for LAN, DHCP, connected devices, or address reservation settings.

03

Create a DHCP reservation

Reserve the Pi current address—or another unused LAN address—for the Pi MAC address. A reservation is usually safer than manually configuring a static address on the Pi because the router remains the source of truth.

04

Reboot or renew the lease

Restart the Pi or renew networking and confirm it receives the reserved address.

hostname -I
ip route
05

Test name and IP access

From another LAN device, connect by the reserved IP and, if local DNS/mDNS works, by hostname.

ssh [email protected]
Verify before moving on
The Pi should keep the same LAN IPv4 address after a reboot and remain reachable by SSH.

Troubleshooting

If a command or screen differs from the lesson, stop and verify the version you are using before forcing a change.

What you learned

You now understand the purpose of this part of the system and have a concrete result you can verify before continuing to the next lesson.