Skip to content

Getting Started on a Raspberry Pi

Ryan Schlesinger edited this page Mar 6, 2019 · 12 revisions

If you're new to docker, here's a great way to get started.

On mac (or any computer really):

  • Insert rasp pi sd card into mac
  • brew install pv ssh-copy-id
  • curl -LO
  • chmod +x flash
  • sudo mv flash /usr/local/bin/flash

Create cloud-config.yml

hostname: black-pearl
manage_etc_hosts: true

  - name: pirate
    gecos: "Hypriot Pirate"
    shell: /bin/bash
    groups: users,docker,video
    plain_text_passwd: hypriot
    lock_passwd: true
    ssh_pwauth: false
      - CHANGEME

package_upgrade: true

# Static IP address
  - content: |
      # static IP configuration:
      # CHANGEME: update for your network
      interface eth0
      static ip_address=
      static routers=
      static domain_name_servers=
    path: /etc/dhcpcd.conf
  # Pickup the hostname changes
  - 'systemctl restart avahi-daemon'
  • flash -u cloud-config.yml (or latest release)
  • When complete, install sd card into rpi and power on

On rpi:

  • cd /opt
  • sudo git clone unifi
  • sudo systemctl enable /opt/unifi/contrib/unifi.service
  • docker pull ryansch/unifi-rpi:latest (For download and extract progress)
  • sudo systemctl start unifi

On mac:

Unifi Image Upgrade

  • docker pull ryansch/unifi-rpi:latest
  • sudo systemctl restart unifi

Hypriot Upgrade

  • docker run -it --rm -v unifi_config:/config -v $(pwd):/backup --name=copy -w /config alpine:latest tar -zcf /backup/unifi_config.tar.gz .
  • Copy the tarball from the pi to another system
  • Run the flash and setup instructions above stopping before starting unifi.
  • Copy the tarball from another system back to the pi
  • docker volume create --name unifi_config
  • docker run -it --rm -v unifi_config:/config -v $(pwd):/backup --name=copy -w /config alpine:latest tar -zxf /backup/unifi_config.tar.gz .
  • Volume is now populated from backup. Continue with starting unifi.
Clone this wiki locally
You can’t perform that action at this time.