Raspberry Pi Setup Guide

Error

We recommend using Viam on a 64-bit Linux distribution. Support for older Raspberry Pis running on 32-bit ARM v7 is in beta.

If you already have a Linux distribution installed on your Pi, you can skip ahead to install viam-server.

Click to check whether the Linux installation on your Raspberry Pi is 64-bit or 32-bit

To check whether the Linux installation on your Raspberry Pi is 64-bit or 32-bit, ssh into your Pi and then run lscpu.

Example output:

Screenshot of a terminal running the 'lscpu' command. The output lists of this command on a Raspberry Pi. A red box highlights the command and the top of the output which reads 'Architecture: aarch64.'

If the value of “Architecture: ‘xxxxxx’” ends in “64”, you can skip ahead to install viam-server.

Hardware requirements

Install Raspberry Pi OS

The Raspberry Pi boots from a microSD card. You need to install Raspberry Pi OS (formerly called Raspbian) on the microSD card you will use with your Pi:

  1. Connect the microSD card to your computer.

  2. Download the Raspberry Pi Imager and launch it.

    Raspberry Pi Imager launcher window showing a 'Choose OS' and 'Choose Storage' buttons.
  3. Click CHOOSE DEVICE. Select your model of Pi.

    Raspberry Pi Imager window showing available pi models.
  4. Click CHOOSE OS. Select Raspberry Pi OS (other).

    Raspberry Pi Imager window showing Raspberry Pi OS (Other) is selected.

    Select Raspberry Pi OS Full (64-bit) or Raspberry Pi OS Full (32-bit) from the menu.

    Raspberry Pi Imager window showing Raspberry Pi OS (Legacy, 64-bit) Full is selected.

    You should be brought back to the initial launch screen.

  5. Click CHOOSE STORAGE. From the list of devices, select the microSD card you intend to use in your Raspberry Pi.

    If no devices are listed, make sure your microSD card is connected to your computer correctly.

    The storage screen is shown with a generic SD card available as an option.
  6. Configure your Raspberry Pi for remote access. Click Next. When prompted to apply OS customization settings, select EDIT SETTINGS.

    Raspberry Pi Imager window showing gear-shaped settings icon is selected.

    Check Set hostname and enter the name you would like to access the Pi by in that field:

    Raspberry Pi Imager window showing the advanced options menu with set hostname checked and set to my-machine.local.

    There are two ways you can secure your Raspberry Pi: with an SSH key or with password authentication.

    • For a learning project or a fun hobby project, we recommend using password authentication because it is easiest to set up for first-time users.
    • For production use, we recommend using SSH keys for more secure authentication; only someone with the private SSH key will be able to authenticate to your system.
    1. Select the checkbox next to Set username and password and set a username (for example, your first name) and a unique password that you will use to log into the Pi:

      Raspberry Pi Imager window showing the 'Set username and password' option is selected. The user has entered username 'Robota' and some hidden password.
    2. Select the SERVICES tab.

    3. Check Enable SSH.

    To set up SSH authentication:

    1. Select the checkbox for Set username and password and set a username (for example, your first name) that you will use to log into the Pi. If you skip this step, the default username will be pi (not recommended for security reasons). You do not need to specify a password.

      Raspberry Pi Imager with username specified as 'Robota' and the password field left blank.
    2. Select the SERVICES tab.

    3. Check Enable SSH.

    4. Select Allow public-key authentication only.

      If you select Allow public-key authentication only, and the section Set authorized_ keys for ‘’ is pre-populated, that means you have a public SSH key that is ready to use. In that case, you can leave the pre-populated key as-is. If this section is empty, you can either generate a new SSH key using these instructions, or you can use password authentication instead.

      Raspberry Pi Imager window showing 'Set Hostname' and 'Enable SSH' both selected.

    Lastly, connect your Pi to Wi-Fi so that you can run viam-server wirelessly. Check Configure wireless LAN and enter your wireless network credentials. SSID (short for Service Set Identifier) is your Wi-Fi network name, and password is the network password. Change the section Wireless LAN country to where your router is currently being operated:

    Raspberry Pi Imager window showing the 'Configure wireless LAN' option selected with SSID and password information for a wireless network.

    Click SAVE.

  7. Double check your OS and Storage settings and then click YES:

    Edit image customization options window

    You will be prompted to confirm erasing your microSD card: select YES.

    Edit image customization options window

    You may also be prompted by your operating system to enter an administrator password:

    macOS admin password confirmation screen.

    After granting permissions to the Imager, it will begin writing and then verifying the Linux installation to the MicroSD card.

    Remove the microSD card from your computer when the installation is complete.

  8. Place the SD card into your Raspberry Pi and boot the Pi by plugging it in to an outlet. A red LED will turn on to indicate that the Pi is connected to power.

Next steps

Continue setting up viam-server on your Raspberry Pi in the Viam app: