Search for previous posts

Blog History

May 2, 2020

Docker + Portainer + Unifi on Odroid XU4 SBC

Here is a concise list of how to install Docker [1] container running the Unifi controller and managed via Portainer [2] on a SBC, such as my Odroid XU4. The main reason for this is the issue with MongoDB <3.6 not playing nice on 32-bit armhf. Containerizing solves this issue as it is abstracted away from the underlying OS.

SSH into whatever Ubuntu SBC you're using and follow the below instructions.

Run the following commands:
$sudo apt install docker
$sudo docker volume create portainer_data
$sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

Now run the following and copy the "Mountpoint" from the results:
$sudo docker volume inspect portainer_data

Navigate to your IP:9000, then Stacks>Add Stack>Web Editor and paste the following, while inserting the above Mountpoint into the <path to data> [3,4]. It should look something like this:

version: "2.1"
image: linuxserver/unifi-controller
container_name: unifi-controller
- PUID=1000
- PGID=1000
- MEM_LIMIT=1024M #optional
- /var/snap/docker/common/var-lib-docker/volumes/portainer_data/_data:/config
- 3478:3478/udp
- 10001:10001/udp
- 8080:8080
- 8081:8081
- 8443:8443
- 8843:8843
- 8880:8880
- 6789:6789
restart: unless-stopped

Once finished, you will have a fully functional Unifi controller in the "Containers" tab. Navigate to your IP:8443 and you know the rest.


No comments:

Post a Comment