All guides
Install Debian/Ubuntu on Raspberry Pi

Install Debian/Ubuntu on a Raspberry Pi

Prepare a Raspberry Pi for MikRouter by writing Raspberry Pi OS (Debian-based) or Ubuntu to a microSD card, enabling remote access, and completing the first boot.

What you need

A Raspberry Pi and its power supply, a microSD card (8 GB or larger), a card reader, an Ethernet cable, and a Windows, macOS or Linux computer. Writing the card erases it.

Imager sets up SSH for you — do not skip Customisation

Raspberry Pi Imager writes your username, password and SSH setting onto the card before you boot. That is how you reach the Pi from your own computer with no monitor or keyboard. If you press SKIP CUSTOMISATION, none of it is applied and you will need a screen.
1

Download and open Raspberry Pi Imager

Get it from https://www.raspberrypi.com/software and open it, then put the microSD card in your reader. The examples here are v2.0.10, which walks through the steps down the left-hand side.
2

Choose your Raspberry Pi model

Pick the exact model you will use. Imager then only offers images that run on it. The examples here use a Raspberry Pi 3 Model B, which is the Raspberry Pi 3 entry — one row covers the A+, B and B+.
Raspberry Pi Imager v2.0.10

Select your Raspberry Pi device

Raspberry Pi 5Raspberry Pi 5, 500 / 500+, and Compute Module 5
Raspberry Pi 4Raspberry Pi 4 Model B, 400, and Compute Module 4 / 4S
Raspberry Pi 3Raspberry Pi 3 Model A+ / B / B+ and Compute Module 3 / 3+
Raspberry Pi 2Raspberry Pi 2 Model B
APP OPTIONSNEXT
3

Choose Ubuntu Server

Ubuntu is not in the first list. Choose Other general-purpose OS, then Ubuntu.
Raspberry Pi Imager v2.0.10

Choose operating system

Select an operating system to install on your Raspberry Pi

Raspberry Pi OS (other)Other Raspberry Pi OS based images
Other general-purpose OSOther general-purpose operating systems
Media player OSMedia player operating systems
APP OPTIONSBACKNEXT

Then take an LTS release — Ubuntu Server 24.04.4 LTS (64-bit) here. Server, not Desktop: it is smaller and needs no screen.

Raspberry Pi Imager v2.0.10

Choose operating system

Select an operating system to install on your Raspberry Pi

Ubuntu Server 26.04 (64-bit)Server OS for RPi Zero 2W/3/4/400/5Online - 1.4 GB download
Ubuntu Server 24.04.4 LTS (64-bit)Server OS for RPi Zero 2W/3/4/400/5Online - 1.2 GB download
Ubuntu Server 22.04.5 LTS (32-bit)Server OS with long-term support for RPi Zero 2W/2/3/4/400Online - 950.9 MB download
APP OPTIONSBACKNEXT

Raspberry Pi OS Lite works too

If you prefer Debian, Raspberry Pi OS (other) Raspberry Pi OS Lite (64-bit) is the Debian-based equivalent. The rest of this guide is the same.
4

Select the microSD card

Pick your card. The capacity shown must match the card in your hand.
Raspberry Pi Imager v2.0.10

Select your storage device

MXT-USB Storage Device Media7.5 GBMounted as /Volumes/BOOT
Exclude system drives
APP OPTIONSBACKNEXT

Check the card before going on

Writing erases the whole drive and there is no undo. Unplug any other removable drives first.
5

Set the hostname

Customisation starts here. Give the Pi a hostname — letters, numbers and hyphens only. This is the name you will look for in your router later.
Raspberry Pi Imager v2.0.10

Customisation: Choose hostname

Enter your hostnameRaspberryPi

A hostname is a unique name that identifies your Raspberry Pi on the network. It should contain only letters, numbers, and hyphens.

APP OPTIONSSKIP CUSTOMISATIONBACKNEXT
6

Set your location

Pick your capital city. Imager fills in the time zone and keyboard layout from it, so there is usually nothing else to change.
Raspberry Pi Imager v2.0.10

Customisation: Localisation

Select your location for suggested time zone and keyboard layout

Capital city:Manila (Philippines)
Time zone:Asia/Manila
Keyboard layout:ph
APP OPTIONSSKIP CUSTOMISATIONBACKNEXT
7

Create the user account

This is the account you will log in with, so write both down.
Raspberry Pi Imager v2.0.10

Customisation: Choose username

Create a user account for your Raspberry Pi

Username:Enter your usernameadminPassword:Enter password••••Confirm password:Re-enter password••••

The username must be lowercase and contain only letters, numbers, underscores, and hyphens.

APP OPTIONSSKIP CUSTOMISATIONBACKNEXT
FieldValue
Usernameadmin
Passwordyour own
8

Wi-Fi — skip it if you are on Ethernet

Leave all three boxes empty and click NEXT. Imager shows Enter a password in red, which is only telling you the boxes are blank — it does not stop you moving on.
Raspberry Pi Imager v2.0.10

Customisation: Choose Wi-Fi

SECURE NETWORKOPEN NETWORK
SSID:Network namePassword:Network passwordConfirm password:Re-enter password

Enter a password

Hidden SSID
APP OPTIONSSKIP CUSTOMISATIONBACKNEXT

Ethernet is steadier than Wi-Fi and is what MikRouter recommends. Fill this in only if the Pi has no network cable, in which case type the network name and password exactly.

9

Turn on SSH — do not skip this one

On Remote access, switch Enable SSH on and leave Use password authentication selected.
Raspberry Pi Imager v2.0.10

Customisation: SSH authentication

Configure SSH access

Enable SSHLearn about SSH
Authentication mechanism:Use password authenticationUse public key authentication
APP OPTIONSSKIP CUSTOMISATIONBACKNEXT

Without SSH there is no way in

You install the MikRouter agent by typing one command on the Pi, and SSH is what lets you type it from your own computer. If this is off, the Pi boots with no way to reach it — you would need an HDMI monitor and a USB keyboard, or you write the card again from step 1.
10

Review and write

Check the summary — device, operating system, card, and the four customisations — then click WRITE.
Raspberry Pi Imager v2.0.10

Write image

Review your choices and write the image to the storage device

Summary

Device:Raspberry Pi 3
Operating system:Ubuntu Server 24.04.4 LTS (64-bit)
Storage:MXT-USB Storage Device Media

Customisations to apply:

  • Hostname configured
  • Localisation configured
  • User account configured
  • SSH enabled
APP OPTIONSBACKWRITE

Imager asks you to confirm, because this erases the card. On macOS it also asks for your computer's password to write to the disk.

You are about to ERASE all data on: MXT-USB Storage Device Media

This action is PERMANENT and CANNOT be undone.

CANCELI UNDERSTAND, ERASE AND WRITE
11

Wait for Write complete!

Do not unplug the reader while it writes. Imager verifies what it wrote, then ejects the card for you.
Raspberry Pi Imager v2.0.10

Write image

Writing in progress — do not disconnect the storage device

Writing… 50%

APP OPTIONSBACKCANCEL WRITE
Raspberry Pi Imager v2.0.10

Write complete!

Your choices:

Device:Raspberry Pi 3
Operating system:Ubuntu Server 24.04.4 LTS (64-bit)
Storage:MXT-USB Storage Device Media

Customisations applied:

  • Hostname configured
  • Localisation configured
  • User account configured
  • SSH enabled

The storage device was ejected automatically. You can now remove it safely.

APP OPTIONSWRITE ANOTHERFINISH
12

Boot the Pi

Card in, Ethernet in, then power. The first boot takes a few minutes — leave it alone until it settles.
13

Find the Pi's IP address in your router

Open your router's admin page and look at its list of connected devices — Network Map on TP-Link, Attached Devices or DHCP Clients elsewhere. Look for the hostname you set in step 5.
tp-link
Network MapInternetWirelessHomeShieldAdvanced
LaptopAA-BB-CC-DD-EE-01192.168.1.505G
RaspberryPiAA-BB-CC-DD-EE-02192.168.1.100Wired
PhoneAA-BB-CC-DD-EE-03192.168.1.1502.4G

Here it is 192.168.1.100. If the Pi is not listed yet, wait a minute and refresh.

14

Log in over SSH

Connect with the username you chose in step 7:
On your own computer
ssh admin@192.168.1.100

The first connection asks you to accept the Pi's fingerprint: type the whole word yes and press Enter, then your password. Nothing appears as you type the password — that is normal. A prompt ending in admin@RaspberryPi:~$ means you are in.

macOS Terminal
user@macbook ~ % ssh admin@192.168.1.100The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.ED25519 key fingerprint is: SHA256:9tKfR2xQwLpN4cVbHs71yMdEuZoAj3XgP6TnQrW8BkYThis key is not known by any other names.Are you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added '192.168.1.100' (ED25519) to the list of known hosts.admin@192.168.1.100's password:Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-1021-raspi aarch64)  * Documentation:  https://help.ubuntu.com * Management:     https://landscape.canonical.com * Support:        https://ubuntu.com/pro admin@RaspberryPi:~$

The hostname may work too

On Raspberry Pi OS you can often use ssh admin@raspberrypi.local instead of the address. It depends on the image, so the router's list is the route that always works.

Next: install the MikRouter Linux agent

Debian or Ubuntu is now ready. Continue with Set up an agent on Linux for the one-line installer, network selection, portal, tunnel host, and Agent Token steps.