AirNav RadarBox
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Enabling WiFi & SSH on RaspberryPi OS Bookworm BEFORE First Boot  (Read 2604 times)

0 Members and 1 Guest are viewing this topic.


  • Hero Member
  • *****
  • Posts: 866
  • CYYZ - Toronto
Enabling WiFi & SSH on RaspberryPi OS Bookworm BEFORE First Boot
« on: February 28, 2024, 11:36:21 PM »
This How-to pertains to Raspberry Pi OS BOOKWORM

Enable SSH & WiFi BEFORE First boot
Image written to microSD Card using Balena Etcher or Win32DiskImager
No Monitor+Keyboard required.

Headless (Lite) RPi OS Bookworm
Unlike previous releases Bullseys, Buster, Stretch etc, the current release Bookworm does not let configure WiFi or enable SSH by adding files wpa_supplicant.conf & ssh in /boot partition while microSD card is still plugged into Desktop / Laptop.

However enabling SSH & WiFi configuration can still be done in Bookworm by addin a file custom.toml. Below is the guide to do it.

This is a temporary/experimental sytstem, working till the day of this post, but may be replaced by cloud_init in future.
After writing RaspberryPi OS image Bookworm (LITE) to microSD card, using Balena Etcher or Win32DiskImager, do not eject the card reader / microSD card.

While the microSD card is still in card reader of your Laptop / Desktop, open the card reader drive. This will open /boot partition of microSD card. In this partition, create a blank file named custom.toml.

IMPORTANT: Make sure there is no hidden or visible file extension .txt at the end of file name custom.toml

In the newly created blank file custom.toml, copy paste following code.
Please replace values of parameters by your custom values.
Save File custom.toml

Slip out microSD card from card reader, slip into RPi and power up. The WiFi and SSH both will ber available.

Contents of file custom.toml
Please replace values of parameters by your own values.


config_version = 1

hostname = "raspberrypi"

name = "pi"
password = "my-rpi-password"
password_encrypted = false

enabled = true
password_authentication = true

ssid = "my-wifi-ssid"
password = "my-wifi-password"
password_encrypted = false
hidden = false
country = "CA"

keymap = "us"
timezone = "America/Toronto"


(1) custom.toml example for Raspberry Pi OS · GitHub

(2) wifi - Headless Wi-Fi setup without the RPi Imager: bootfs/wpa_supplicant.conf not supported since Bookworm - Raspberry Pi Stack Exchange

« Last Edit: March 03, 2024, 05:05:18 PM by abcd567 »