Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3546

Raspberry Pi OS • A guide to pre configuring a static IP with Trixie and cloud-init

$
0
0
This must be done after writing your boot media but before first boot.

The short version:
  1. Find your subnet (e.g. 10.0.0.0/24)
  2. Find your gateway (e.g. 10.0.0.1)
  3. Find your nameserver (e.g. 10.0.0.1)
  4. Find a free IP address (e.g. 10.0.0.101)
  5. Open the file network-config (in the boot partition)
  6. For each interface requiring a static address:
    1. Remove

      Code:

          dhcp4: true
    2. Replace with

      Code:

          addresses: [10.0.0.101/24]    routes:     - to: default       via: 10.0.0.1   nameservers:     addresses: [10.0.0.1]
Remember to preserve indentation and change IP addresses as required. If your boot media was written without using RPi Imager you may need to uncomment some lines in network-config,

For the long version see attached:

Statistics: Posted by thagrol — Mon Feb 23, 2026 9:18 pm



Viewing all articles
Browse latest Browse all 3546

Trending Articles