v5

Raspberry Pi

OpenC3 5 Running on Raspberry Pi 4

The Raspberry Pi 4 is a low-cost powerful ARM-based minicomputer that runs linux. And because it runs modern linux, it can also run OpenC3! These directions will get you up and running.

What you’ll need:

  • Raspberry Pi 4 board (tested with 8GB RAM)
  • A Pi Case but Optional
  • Raspbeerry Pi Power Supply
  • 32GB or Larger SD Card - Also faster the better
  • A Laptop with a way to write SD Cards

Let’s get started!

  1. Setup 64-bit Raspian OS Lite on the SD Card

    Make sure you have the Raspberry Pi Imager app from: https://www.raspberrypi.com/software/

    1. Insert the SD Card into your computer (Note this process will erase all data on the SD card!)
    2. Open the Raspberry Pi Imager App
    3. Click the “Choose OS” Button
    4. Select “Raspberry Pi OS (other)”
    5. Select “Raspberry Pi OS Lite (64-bit)”
    6. Click the “Choose Storage” Button
    7. Select Your SD Card
    8. Click the Gear Icon
    9. If prompted if you would like to prefill the Wifi information, select OK
    10. Click all the checkboxes, except for “Enable Telemetry”
    11. Set the hostname to: openc3.local
    12. You can either use Password auth, or public-key only if your computer is already setup for passwordless SSH
    13. Set the username and password. The default username is pi, you should also set a password to make the system secure
    14. Fill in your Wifi info, and set the country appropriately (ie. US)
    15. Set the correct time zone
    16. Click “Save” when everything is filled out
    17. Click the “Write” button, Yes to Are You Sure, and Wait for it to complete
  2. Make sure the Raspberry Pi is NOT powered on

  3. Remove the SD Card from your computer and insert into the Raspberry Pi

  4. Apply power to the Raspberry Pi and wait approximately 1 minute for it to boot

  5. SSH to your raspberry Pi

    1. Open a terminal window and use ssh to connect to your Pi

      1. On Mac / Linux: ssh pi@openc3.local
      2. On Windows, use Putty to connect. You will probably have to install Bonjour for Windows for .local addresses to work as well.
  6. From SSH, Enter the following commands

    sudo sysctl -w vm.max_map_count=262144
    sudo sysctl -w vm.overcommit_memory=1
    sudo apt update
    sudo apt upgrade
    sudo apt install git -y
    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    sudo usermod -aG docker $USER
    newgrp docker
    sudo apt-get install libffi-dev libssl-dev python3-dev python3 python3-pip -y
    sudo pip3 install docker-compose
    git clone https://github.com/OpenC3/openc3.git
    cd OpenC3
    ./openc3.sh start
    

Note: It takes awhile to build OpenC3 on a Pi (about an hour). Be patient, and in the future we’ll have precompiled containers that will make first launch way faster.

  1. After about 2 minutes, open a web browswer on your computer, and goto: http://openc3.local:2900

  2. Congratulations! You now have OpenC3 5 running on a Raspberry Pi!