Install Docker Compose Raspberry Pi 4

  • Install HASS.io on Docker. There are several ways to install HASS.io, with Raspberry Pi setup being the most common one. But as I said before, pretty soon you will realize that Raspberry Pi is underpowered if your setup grows. Even on my AMD 5350 Ubuntu Server NAS, I found that Home Assistant was running slow.
  • I was thrilled to learn that I could install Guacamole on Docker. So in this Guacamole Docker tutorial, I will show you how to setup Guacamole using Docker and remotely administer various systems using just a modern web browser. I will also provide the Docker-compose file to make Guacamole setup much easier.

One way you can use Raspberry Pi and Docker together is for Swarm. Used together, they can create a computer cluster. With Swarm containers on a bunch of networked Raspberry Pis, you can build a powerful machine and explore how a Docker Swarm works. Alex shows you how in this video.

In this post we’ll look at how to Install NextCloud on a Raspberry Pi 4 with OpenMediaVault and Docker.

We’re going to use the setup from https://hub.docker.com/_/nextcloud, but we’re going to change one thing: the database.

The database that is being used in the docker-compose file on the site isn’t compatible with ARM processors, so we’ll need to change that in a bit.

But first, we need to get logged in to our Raspberry Pi’s Portainer. This tutorial assumes that you already have Docker and Portainer installed, most likely via OpenMediaVault.

Prerequisites

  • You’ll need a domain name.
  • You’ll need to a CloudFlare account with your domain name pointed to it.
  • You’ll need to point a subdomain to your home’s IP address. Make sure that Proxy Status is “DNS Only”. Also make sure that you change SSL/TLS to “Full”.
  • You’ll need to forward ports 80 and 443 to your Raspberry Pi.
  • You’ll need NGINX Proxy Manager installed.
  • You’ll need to create a volume in OpenMediaVault for your NextCloud file storage.

Installation

Open Portainer on your Raspberry Pi and create a new Stack.

Paste the following into your new stack:

Change the few things as noted above.

Install Docker Compose Raspberry Pi 4

Click the “Deploy the Stack” button.

Next, go to your NGINX Proxy Manager dashboard. Create a new Proxy Host.

  • Fill in the domain name (or subdomain) you designated for your NextCloud install.
  • Scheme should be http.
  • Forward Hostname/IP should be your Raspberry Pi’s IP address.
  • Foward port should be 8080.
  • Click the “Block Common Exploits” toggle.

Go to the SSL tab.

Raspberry
  • Change “None” to “Request a New SSL Certificate”.
  • Click the “Force SSL” and “HTTP/2 Support” toggles.
  • You can click the HSTS toggles if you’ve enabled HSTS in CloudFlare.
  • Click “Save”.

Install Docker Compose Raspberry Pi 4 Software

After a moment, you should see that everything has deployed correctly.

Next, go to https://nextcloud.yourdomain.com (change this to your actual domain) and you should see the NextCloud install page.

Docker
  • Enter an Admin username and password.
  • Change the database type to MySQL/MariaDB.
  • Enter the username, password, and database name as you have them in your Portainer Stack.
  • Change Database location to from “localhost” to “db” (without quotes).
  • Toggle the option for additional app installation to meet your needs.
  • Click “Finish setup”.

At this point, you can go get some lunch or something as the install process will take a while since we’re on a 4 core ARM processor.

Once the install is complete, you’ll be taken to the NextCloud dashboard and then you should be good to go!

30 Sep 2019

Home Assistant on Docker is easier than running it with HASSIO IMO.

Here is a high-altitude overview of how I run Home Assistant -and- then I’ll dig into the details of my setup.

  • Setup Raspbian with Docker and Docker-Compose
  • Plugin my Aeon Z-wave script; make sure it’s on /dev/ttyACM0
  • Setup scripts for Docker-Compose
  • Setup scripts so it runs on startup
  • Create a backup process

Okay, details… here is how I run Home Assistant on Docker on a Raspberry Pi 4.

Install Docker Compose Raspberry Pi 4 Download

  • Install Raspbian on the Raspberry Pi 4.
  • Install Docker and Docker-Compose.
  • Create /root/docker-compose.yml consisting of the following (NOTE: I use the Aeon z-wave stick at /dev/ttyACM0):

Install Docker Compose Raspberry Pi 4 Downloads

  • Create the following file for automating the service on startup /etc/systemd/system/home-assistant.service
Compose
  • Run this systemctl enable home-assistant.service
  • Run this systemctl enable docker
[ dockerhome-automationhome-assistant ]

Install Docker Compose Raspberry Pi 4

Related Posts