DEV Community

astromodem
astromodem

Posted on

Headless Raspberry Pi Homelab – Part 1: OS Configuration & Remote Access

Project Overview

This project documents the process of imaging and configuring a Raspberry Pi to function as a headless database server on a local network, with a focus on OS deployment, remote access, and preparing the system for headless database hosting and homelab expansion.

Hardware Used

Hardware used to configure the Raspberry Pi

Installing the OS & Writing to the microSD card

For the official step-by-step process, the Raspberry Pi Foundation provides documentation. I followed their documentation while performing my own process.

Official Raspberry Pi Getting Started Documentation

Step 1: Install the Raspberry Pi Imager

Download and install the Raspberry Pi Imager for your operating system

Official Raspberry Pi Imager Software

After installation, ensure the software is fully updated before proceeding.

Raspberry Pi Imager Software Update

Step 2: Select Device & Operating System

  1. Launch Raspberry Pi Imager
  2. Select your Raspberry Pi model (I'm using a Raspberry Pi 4)
  3. Choose the Raspberry Pi OS (64-bit is recommended)

Select Raspberry Pi model menu

Why 64-bit?

The 64-bit OS provides better memory handling and compatibility with modern services such as databases and containerized applications.

Select Raspberry Pi OS menu

Step 3: Prepare the Storage Device

  1. The Samsung microSD card and adapter.
    Samsung microSD card and adapter

  2. Insert the Samsung microSD card and adapter into the Uni SD Card Reader.
    Storage device complete

  3. Connect the storage device to your computer.
    Storage device connected to computer

Once connected and granted access to your computer, the storage device should appear in the Select Storage menu of the Imager.

Storage device

Step 4: Configure OS Customization Settings

Before writing the OS, the Raspberry Pi Imager allows several important pre-boot configurations.

Hostname

Set a custom hostname to easily identify the device on the network.

Hostname menu

Localization

Configure the timezone and keyboard layout based on your geographical location.
Localization menu

Username & Password

Create a user account that will be used for SSH access.
User account menu

Step 5: Network & Access Configuration

Wi-Fi (Optional)

The Wi-Fi setup was skipped in favor of Ethernet.

Why Ethernet?

  • More stable connection
  • Lower latency
  • Easier to troubleshoot
  • Common practice in server environments

Choose Wi-Fi menu

SSH

SSH was enabled during imaging using password authentication.

SSH Authentication menu

This ensures the Pi can be accessed remotely without requiring a display.

Step 6: Raspberry Pi Connect (Optional)

Raspberry Pi Connect provides secure remote access features. Since this was new to me, I enabled it to explore its capabilities.

Raspberry Pi Connect menu

If you choose to enable Raspberry Pi Connect, you'll have to create an account and verify it.

Raspberry Pi Connect account creation form

Step 7: Write the OS Image

After reviewing all customizations, proceed with writing the OS to the microSD card.

Warning: This process erases all existing data on the microSD card.

Write Image menu

Once the writing process successfully finishes, the Write Complete page will populate, the Finish button can be selected, and you can remove your storage device that contains the newly imaged microSD card.

Write Image complete

Step 8: Booting the Raspberry Pi

Insert the newly imaged microSD card into the Raspberry Pi. The Raspberry Pi is now ready to be integrated into your home network.

Raspberry Pi 4 with microSD card inserted

Next Steps (Part 2)

  • Connect the Raspberry Pi to the home network via Ethernet, using a Netgear switch and Xfinity router.
  • Verify that the Pi is properly recognized on the network using the Xfinity admin tool and Netgear admin tool.
  • Test connectivity by pinging the Pi from another device on the network or accessing it via SSH.

Top comments (0)