OMV RPi5 Server Build Guide
Summary
Disclaimer: everything expressed in this post is my own opinion. Logos are trademarks of their respective owners.
This guide outlines how to setup a Raspberry Pi 5 with the RADXA Penta SATA HAT to run OMV (Open Media Vault) with a ZFS filesystem, and host NextCloud and Immich using Docker and Tailscale. Please read the motivation for this build guide here: https://www.ianwebster.ca/post/omv-rpi5-server!
1. Build Supplies
1.1 Hardware List
You'll need the following hardware components for this build:
- Raspberry Pi (8GB RAM recommended for ZFS)
- Raspberry Pi 5 Cooler (to keep the Pi cool)
- USB C Power Adapter (5.2V @ 3A = 15W, which is enough for the SSDs, SATA hat, and RPi5)
- Gigabit Ethernet Cable or Wifi (use Ethernet 🙂)
- 32 GB Micro SD Card (enough for Raspbian and OMV)
- RADXA Penta SATA Hat (for SATA SSDs/HDDs)
- SATA SSDs (2x 2TB in my case)
Optional components:
- Boot SSD/HDD instead of microSD card
- HDD instead of SSD
- Rpi5 NVME Hat for NVME SSDs (still bottlenecked by Rpi5's PCIe Gen 3.0 bus speeds, and network interface though)
- 2.5Gbps USB NIC (also router, switch, laptop and ethernet cable that supports 2.5Gbps)
1.2 Tools Required to Assemble Hardware
- Pliers (to bend off heat fins on RPi5 cooler heatsink)
- Finger dexterity (for FPC connection for SATA Hat)
- Good lighting (for FPC connection for SATA Hat)
- 3D Printer for printing a case (optional)
1.3 Hardware/Software Configuration Overview
This guide considers the following hardware/software configuration:
- OS: Raspbian (Raspberry Pi OS Lite)
- Storage: Radxa Penta SATA Hat with 2x 2TB SSDs in Mirror configuration (basically RAID1)
- Filesystem: ZFS
- NAS Solution: OMV
- Containerization: Docker
- HTTPS/TLS Encryption: Tailscale for HTTPS/TLS cert via letsencrypt and Funnel for internet access
- Reverse Proxy: Caddy (sidecar for TLS HTTPS termination for HTTP container communication)
- File Sharing: NextCloud
- Photo Sharing: Immich
Here is a diagram of the configuration at a high level:
2. Ian's Guide!
Here's my comprehensive guide to setting up the RPi5, hardware and software.
2.1 Build the Pi
First, let's build the Pi by installing the Cooler and RADX Penta Sata Hat.
2.1.1 Install the Cooler
- First, open up your fresh Raspberry Pi 5 and the Raspberry Pi 5 Cooler.
- Install the cooler on the RPi5 by aligning the push pins.
2.1.2 Install the RADXA Penta SATA Hat
- Next, open up the RADXA SATA hat. Be sure to check the package for the FPC connector! You may receive 2 if the supplier is nice. I missed my connector initially because it was not in the main package. Follow any instructions provided. There are some pictures here in 2. Assemble: step 1 (https://docs.radxa.com/en/accessories/penta-sata-hat/penta-for-rpi5#assemble). Take 4 of the short brass standoffs and install them on the bottom of the Pi, along with the 4 long standoffs on the top side of the Pi. Use your fingers; you shouldn't need any other tools. Stop before the FPC connector step.
- DISCLAIMER: this step definitely voids warranty! Following Jeff Geerling's YouTube video from 6:35, https://youtu.be/l30sADfDiM8?si=Hod9s2C35mgLHvDz&t=389, place the RADXA SATA hat on to top the RPi5 and cooler, and note which 3 heat fins of the cooler's heatsink need to be crimped off with pliers. You can mark them with a pen or marker if you'd like, or make a mental note. The heat fins need to be removed to make room for the SATA hat's barrel jack. Alternatively, you could de-solder the barrel jack from the SATA hat if you plan on powering the Pi via USB-C.
- If you choose to remove the heat fins, slowly bend the 3 heat fins back and forth to remove them, taking care not to leave any metal filings on the RPi5 cooler, heatsink, or motherboard. Use compressed air to blow off the remnants, or a paper towel to clean up.
- Reinstall the SATA hat temporarily, ensuring it sits as flush as possible with the standoffs.
- Now, remove the SATA hat.
- Find the FPC connector from your package. You may get 2 if the supplier is nice. Carefully connect the FPC connector from the RPi5's FPC port to the SATA hat (2. Assemble: step 2 and 3, https://docs.radxa.com/en/accessories/penta-sata-hat/penta-for-rpi5#assemble). Be very careful as these connectors are prone to breaking. Lay the Pi and SATA hat aligned on the short edge when doing this.
- Carefully bend over the SATA hat and install it on top of the Pi.
- You can add the 4 remaining standoffs on the top of the SATA hat to secure it to the RPi5.
- We'll add the SATA drives in section 2.4!
2.2 Flash Raspbian on your microSD Card
Raspbian is the OS that our Pi will be running. OMV will be installed on top of Raspbian.
- You can follow this OMV7 install guide which has pictures explaining each step below: https://wiki.omv-extras.org/doku.php?id=omv7:raspberry_pi_install (check this guide for any changed steps.)
- Plug your formatted microSD card into your computer.
- Get the Raspberry Pi Imager from this link https://www.raspberrypi.com/software/.
- Install the Imager and open it.
- Choose device = Raspberry Pi 5, OS = Raspberry Pi OS Lite (64-bit). We will be using ssh to access the Pi, so there is no need to attach an external display with keyboard and mouse. At the time of writing this post, OMV7 (https://wiki.omv-extras.org/doku.php?id=omv7:raspberry_pi_install) does not support the Full (64-bit) version of the OS.
- Choose Storage = your microSD card to install Raspberry Pi OS Lite on.
- Select Apply Custom OS Settings
- Set
usernamethat is notadmin, according to the OMV7 guide. - Don't set WiFi here, according to the OMV7 guide.
- Set locale.
- Under the Services tab, click Enable SSH.
- If you want to set a password, set password authentication. Otherwise you'll have to generate a public ssh key for the passwordless approach.
- Flash the microSD card.
2.3 Boot the Pi and install OMV
Next up, we'll install OMV. All the subsections below are based on this OMV7 guide https://wiki.omv-extras.org/doku.php?id=omv7:raspberry_pi_install which you should refer to for the most updated guidance. It is possible a newer version of OMV is released by the time you read this!
2.3.1 Prep the Pi
- Install the microSD card in your Pi.
- Plug in your Pi with USB-C or the 12V barrel jack, BUT NOT BOTH. Connect your ethernet cable from your router to the Pi. No wi-fi at this stage, because of OMV7's setup limitations. You can add wi-fi later if you would like.
2.3.2 SSH into the Pi and get a static IP address
- Note: for the below instructions, replace
user1with theusernameyou setup in the "Apply Custom OS Settings" earlier. - Mac (this guide): open Terminal and run
ssh user1@raspberrypi.local. - Windows: Install Putty. SSH using the user and ip, as above. More detail in the OMV7 guide.
- Once you are logged in, type
ip addto get the local ip address of your pi, for example,10.0.1.89.
2.3.3 Install OMV
Execute the following commands to install OMV:
# 1. Update
sudo apt-get update
# 2. Upgrade
sudo apt-get upgrade -y
# 3. Get OMV preinstall script
wget -O -Â [https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/preinstall](https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/preinstall "https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/preinstall")Â | sudo bash
# 4. When all commands finish, reboot:
sudo reboot
# 5. Your Pi IP address may have changed again since it is assigned a static ip. It should still be accessible using `raspberrypi.local`.
# 6. SSH into your Pi again as before
ssh user1@raspberrypi.local
# 7. Get OMV full install script
wget -O -Â [https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install](https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install "https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install")Â | sudo bash
# 8. Wait up to 30 minutes for OMV7 to install.
# 9. Once the pi reboots, you can ssh into it again.
# 10. Go to your browser and type in the local ip address of the Pi from earlier, for example `10.0.1.89`. You should be redirected to the OMV login page. The web UI user is `admin` and the default password is `openmediavault`.
# 11. Make sure to update the default password!
2.4 Install your SSDs on the SATA hat
- This section is based on the RADXA guide: https://docs.radxa.com/en/accessories/penta-sata-hat/penta-for-rpi5#assemble.
- Turn off the Pi.
- Plug in your SSDs to the Pi (see section "2. Assemble: step 4", https://docs.radxa.com/en/accessories/penta-sata-hat/penta-for-rpi5#assemble). Note that the 22-pin SATA Data/Power connector only connects one way. Secure the clear bracket to the drives using the provided screws.
- Follow "4. Start Use", https://docs.radxa.com/en/accessories/penta-sata-hat/penta-for-rpi5#start-use, to enable PCIe Gen3 for the drives. Below is a sample of the commands to execute and sample outputs.
Enabling PCIe Gen3:
# 1. SSH into your Pi
ssh user1@rasberrypi.local
# 2. Enable PCIe: Edit `/boot/firmware/config.txt` and add `dtparam=pciex1` to the end of the file, save and reboot. Use `vi` instead of `nano` if you'd like.
nano /boot/firmware/config.txt
# 2.1 Append `dtparam=pciex1` to the end of the file, save and reboot.
# 3. Check disk
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.9T 0 disk
sdb 8:16 0 1.9T 0 disk
...
# 4. Speed test
$ sudo dd if=/dev/zero of=/dev/sda bs=32M status=progress count=100 oflag=direct
3154116608 bytes (3.2 GB, 2.9 GiB) copied, 8 s, 391 MB/s
100+0 records in
100+0 records out
3355443200 bytes (3.4 GB, 3.1 GiB) copied, 8.61021 s, 390 MB/s
# 5. Force PCIe Gen 3. Use `vi` instead of `nano` if you'd like.
nano /boot/firmware/config.txt
# 5.1 Append `dtparam=pciex1_gen=3` to the end of the file
# 6. Reboot
sudo reboot now
# 7. Check link status of the SATA Hat
$ sudo lspci -vvv -s 0000:01:00.0 | grep LnkSta
LnkSta: Speed 8GT/s, Width x1 (downgraded)
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+ EqualizationPhase1+
# 8. Speed test again
$ sudo dd if=/dev/zero of=/dev/sda bs=32M status=progress count=100 oflag=direct
2986344448 bytes (3.0 GB, 2.8 GiB) copied, 6 s, 498 MB/s
100+0 records in
100+0 records out
3355443200 bytes (3.4 GB, 3.1 GiB) copied, 6.77122 s, 496 MB/s
The link speed should now be 8GT/s. Note the increase from 390MB/s to 496MB/s.
2.5 Install ZFS (optional but highly recommended)
2.5.1 ZFS Plugin Installation
You can install ZFS to protect your data from expected drive degradation over time. ZFS relies on using RAM as a filesystem cache, so I would recommend having at least an 8GB RPi5 to enable ZFS. I will make the assumption you have a 2x 2TB SSD setup attached to your SATA Hat for this subsection, and I will assume a Mirrored ZFS Pool with 2x 2TB SSDs. In this configuration, you will have 2TB of usable space, and if 1 drive fails, you may replace it to rebuild your pool.
Steps:
- Log in to your openmediavault web UI by navigating to your static ip from earlier in section 2.3:
10.0.1.89for example. - In the sidebar, navigate to
System > Pluginsand search foropenmediavault-zfs. As of writing this, the latest version isopenmediavault-zfs 7.1.4. - Install the plugin. You may see a yellow banner saying "Pending configuration changes" at the top of the screen. You will have to click the checkmark whenever OMV shows this.
- If you're facing any issues with ZFS now or later in the guide, check the troubleshooting section at the bottom of the post.
- Verify that the ZFS plugin is installed:
Storage > zfs - Create a pool for our ZFS Mirror of 2TB x 2 SSDs:
Storage > zfs > Pools > Add > Add Pool
Name: e.g. `ssd-pool`
Pool type: `Mirror`
Devices: add your two SSDs here.
Mountpoint: leave as default.
Device Alias: leave as `By ID`.
Click Save. Your new pool ssd-pool should now be created! The status should be OK.
2.5.2 Setting up TRIM Cron Job for SSD Longevity
Enabling TRIM on your ZFS pool generally extends the lifespan of your SSDs.
You can check the status on TRIM and run it manually with the following commands:
# 1. Validate if trim is on
user1@raspberrypi:~ $ sudo zpool get autotrim <your_pool_name>
NAME PROPERTY VALUE SOURCE
<your_pool_name> autotrim off default
# 2. Run trim
user1@raspberrypi:~ $ sudo zpool trim <your_pool_name>
# 3. Validate status is trimming
user1@raspberrypi:~ $ zpool status
...
NAME STATE READ WRITE CKSUM
ssd-pool
mirror-0
ata-TEAM_SSD_A ONLINE 0 0 0 (trimming)
...
To set up a recurring cron job to run TRIM on your pool:
- Log in to your openmediavault web UI by navigating to your static ip from earlier in section 2.3:
10.0.1.89for example. - Navigate to
System > Scheduled Tasksand add a task. - Set
Time of executionto weekly. Ideally set this to a time where your server is idle. - Set
Commandtosudo zpool trim <your_pool_name>.
TRIM will now run every week to maintain the health of your SSDs.
If you want to access files from your server via Finder on your Mac for example, you'll need to create a SMB share. In this section, you will create a share folder, an SMB share, and as result, you will be able to access a share folder on the ssd-pool from your Mac in Finder. You can skip this section if you don't want drag-n-drop read/write compatibility with your server, but note that some these steps are required in section 2.7.
2.6.1 Create a new user
- Log in to your openmediavault web UI by navigating to your static ip from earlier in section 2.3:
10.0.1.89for example. - First, let's setup a user to access our share.
- Navigate to
Users > Users > Createand fill out the fields below:
Name: e.g. `pooluser`
Password: fill out a password. Don't forget it.
Shell: leave as is.
Groups: `users`
Click Save.
- Next, create a Shared Folder first from the zfs pool
ssd-poolyou just created in section 2.5.
Name: e.g. `ssd-pool-share-folder`
File system: choose your ZFS pool e.g. `ssd-pool`
Relative path: e.g. `ssd-pool-share`
Tags: whatever you want.
Click Save.
- Select the
ssd-pool-share-folderand clickPermissionsat the top nav bar. Allow your newpooluserto Read/Write. - Click Save.
- Navigate back to the Shared Folders and click your
sdd-pool-share-folderagain. Click theAccess Control Listthis time. Scroll down to theUser/Group permissionsand give yourpooluserRead/Write permissions too. - Click Save.
- Now that the
pooluserand Shared folderssd-pool-share-folderare created, let's create a SMB Share. - In the sidebar, navigate to
Services > SMB/CIFS > Shares > Createand fill out the fields below:
Enabled: checked
Shared folder: e.g. `ssd-pool-share-folder`
Public: No
Browseable: checked
Time Machine support: checked if you want this
Inherit permissions: checked
Hosts allow: e.g. `ip of your client accessing the server`. If your computer has a static IP assigned, you can set that here. If you are only accessing your server from a single computer, it makes sense to use the allow list to secure access to your SMB Share.
Click save.
- To connect to your SMB share from your Mac, right click Finder in the doc, and type in your RPi5's static ip with the
smb://prefix, e.g.smb://10.0.1.89. You should see your share folderssd-pool-share-folder. - Log into the share using the login
pooluserand password you created earlier. - You should now be able to access your share and read/write files to it!
Let's prepare for installing Docker by setting up our share folders. We'll need a backup folder, a compose folder, and an appdata folder.
Create 3 more Share Folders, using the same process as in section 2.6.2:
# 1. Docker Backup Share Folder
Name: docker-backup
File system: ssd-pool
Relative path: data/docker/backup
Tags: backup, docker
# 2. Docker Compose Share Folder
Name: docker-compose
File system: ssd-pool
Relative path: data/docker/compose
Tags: compose, docker
# 3. Docker Data Share Folder
Name: docker-data
File system: ssd-pool
Relative path: data/docker/appdata
Tags: appdata, docker
If you would like, you can setup the Permissions and the Access Control List in the same way before if you want to have access to your Docker container data via your Finder on your Mac, e.g. NextCloud and Immich. My recommendation is not to do so.
2.8 Install Docker!
Now let's install Docker to host your NextCloud and Immich instances. Each instance will have its own container, and its own Tailscale container.
- Log in to your openmediavault web UI by navigating to your static ip from earlier in section 2.3:
10.0.1.89for example. - Navigate to
System > Pluginsand search foropenmediavault-compose. As of writing this, the latest version isopenmediavault-compose 7.6.12. - Install the plugin.
- Navigate to
Services > Composeto verify your Docker plugin is successfully installed.
2.9 Getting started with Tailscale
Tailscale is a pre-requisite to accessing your server's NextCloud and Immich instances outside your home network (although we'll also use Tailscale for home network access in this guide). As an alternative, you could setup port forwarding in your router, and use a reverse proxy like Caddy to forward external requests to either the NextCloud instance or the Immich instance. Tailscale offers a solution that avoids the hassle of port forwarding on your router.
- Create an account at https://tailscale.com/. Use an email account that is explicitly for this server, and nothing else. Set a strong password.
- Navigate to
DNS > Tailnetname. Choose a name that you are content with. This is the suffix of the URL you will be using to access both your NextCloud and Immich instances from the open internet, outside your network. For example, if your tailnet name ismy-tailnet.ts.net, then your NextCloud and Immich instances would be accessible fromnextcloud.my-tailnet.ts.netandimmich.my-tailnet.ts.netrespectively. - Generate an OAuth client id and client secret at https://login.tailscale.com/admin/settings/oauth. Save the client id e.g.
ABC123and client secret e.g.tskey-client-XYZ456. - Grant the least permissions possible. For troubleshooting purposes, you can give Read/Write access for All scopes, but make sure to limit the scope after you are finished.
- Important for sections 2.11 and 2.12: Navigate to
DNS > MagicDNS > Enable MagicDNS(https://tailscale.com/kb/1153/enabling-https) andDNS > HTTPS Certificates > Enable HTTPS. This allows you to access your NextCloud and Tailscale instances inside and outside your network using HTTPS with TLS encryption, e.g.https://nextcloud.my-tailnet.ts.net. - Later, we will revisit your Tailscale account to add ACL (Access controls) to define a policy for which devices and users can connect to your network.
We'll revisit Tailscale after installing NextCloud.
2.10 Installing NextCloud
To install NextCloud, you'll need to create Docker compose file. You can do this by SSHing into the Pi, creating the Compose file, and using the CLI to build the compose file, but the more convenient approach for OMV is to copy and paste it into the UI.
To get started, let's build the Docker Compose file. I have adapted the compose file from this GitHub discussion from NextCloud: https://github.com/nextcloud/all-in-one/discussions/5439. I made a few improvements to make this file more OMV-friendly, such as inline-ing the Caddyfile and Tailscale Serve.json file. Ideally, you would keep the Caddyfile and Serve.json files separate, but we are limited by the OMV UI 🙂
2.10.1 Setup the NextCloud Docker Compose and env Files
- Log in to your openmediavault web UI by navigating to your static ip from earlier in section 2.3:
10.0.1.89for example. - Navigate to
Services > Compose > Addand fill out the fields below: - Name: e.g.
nextcloud - File: copy my GitHub Gist
nextcloud.ymlfrom here https://gist.github.com/iWebster28/37fb9fb7a6ae9708ad2ad461ce3d0a92. Read it thoroughly, be sure to replace the environment variables, and update any parameters you see updated from the community discussion on https://github.com/nextcloud/all-in-one/discussions/5439. You will need to setTS_AUTH_KEYinnextcloud.envto the Tailscale OAuth client key from section 2.9: e.g.tskey-client-XYZ456. Also make note of the tag,tag:nextcloudinnextcloud.yml- you will need that for later in updating the Tailscale ACL. - Show environment file: check this box and paste in the contents of
nextcloud.envfrom the Gist. Read it thoroughly and update it accordingly. - Click Save.
- Navigate to
Services > Compose > Files, select yournextcloudfile, clickCheckto verify if there are any errors in the file. Once this passes, clickupto create and start your NextCloud containers!
2.10.2 Compose the NextCloud containers and Setup NextCloud AIO
- Once the the main container starts, the
Statuswill change toUp. You can now navigate to the NextCloud install. - To begin the NextCloud install, navigate in your browser to your static ip from earlier in section 2.3, and append the HTTP port:
10.0.1.89:8080. - Follow the NextCloud AIO install steps. Assuming from
nextcloud.env, yourNC_DOMAINenvironment variable isnextcloud.my-tailnet.ts.net, this will be your NextCloud AIO instance IP! - Check the
Install NextCloud Hub 10for the latest features. You can always useHub 9if you would like. - Download and start the containers.
2.10.3 "Backup" Config (optional)
You can optionally add a backup for your NextCloud config. Under Create a backup location, add ssd-pool/docker-backup that you created earlier in section 2.7 under OMV > Docker > Compose > Settings. Please review the nextcloud.yml to understand the implication of using CHANGE_TO_COMPOSE_DATA_PATH. Also navigate to and read this link http://10.0.1.89/#/services/compose/settings (replacing your static ip accordingly). Importantly, by setting our NEXTCLOUD_DATADIR: CHANGE_TO_COMPOSE_DATA_PATH/nextcloud_data in nextcloud.yml https://gist.github.com/iWebster28/37fb9fb7a6ae9708ad2ad461ce3d0a92#file-nextcloud-yml-L18, you are storing all user-uploaded data outside of our NextCloud container, e.g. docker-data/nextcloud_data - this means that user-uploaded data won't be backed up by default.
- To access from SSH,
sudo cd /ssdpool/data/docker/appdata/nextcloud_data. From Finder,docker-data > nextcloud_data. - Make sure you changed the correct Permissions and ACL from section 2.6.
- There are two implications of using
CHANGE_TO_COMPOSE_DATA_PATH: - First, NextCloud's Borg Backup will exclude this nextcloud_data directory from backups. As a result, in this configuration, Borg Backup will only backup your configuration, not user data. As this server is for backups only, it is assumed that this is not the only copy of your data.
- The second implication of using the
CHANGE_TO_COMPOSE_DATA_PATHis that if you ever need to prune (delete) your NextCloud Docker containers, then the user data will conveniently be retained in thenextcloud_datafolder. You can always delete the user data manually if you want to do a completely fresh install.
Note: It is possible to add the NEXTCLOUD_DATADIR from nextcloud.yml https://gist.github.com/iWebster28/37fb9fb7a6ae9708ad2ad461ce3d0a92#file-nextcloud-yml-L18 as a backup location, if you are curious:
Back up additional directories and docker volumes of your host: Below you can enter directories and docker volumes of your host that will be backed up into the same borg backup archive. Make sure to press the submit button after changing anything.
2.11 Enabling NextCloud Access from Tailnet (Home/External Network)
Now that you have your NextCloud containers running, the next step is to revisit Tailscale to ensure your can access your NextCloud instance from inside and outside your network. Since we have NextCloud running behind a reverse proxy (Caddy) and Tailscale, you will need to access it from nextcloud.my-tailnet.ts.net, even on your own network.
2.11.1 Update your Tailscale ACL
- Recall from section 2.9 the
tag:nextcloudinnextcloud.yml- you need this to update your Tailscale ACL. - Navigate to Tailscale ACL https://login.tailscale.com/admin/acls/fileand update it according to your tag:
// Define the tags which can be applied to devices and by which users.
"tagOwners": {
"tag:nextcloud": ["your_email@mail_provider.com"],
},
2.11.2 Get an HTTPS certificate for your domain
Next, SSH into your server to get an HTTPS cert for your domain nextcloud.my-tailnet.ts.net:
# 1. SSH into your server
ssh user1@raspberrypi.local
# 2. Find your tailscale container, e.g. `nextcloud-nextcloud-aio-tailscale`
docker ps | grep tailscale
# 3. Open a shell inside the Tailscale container
docker exec -it nextcloud-nextcloud-aio-tailscale sh
# 4. Get HTTPS cert to verify funnel works
/ # tailscale cert nextcloud.my-tailnet.ts.net
# 5. Exit the container
/ # exit
2.11.3 Copy your HTTPS certificate and key temporarily
(Development purposes only; do not do this otherwise) Copy your key and certificate to a temporary directory and delete them once your setup is working. This will save you the hassle of needing to regenerate keys and hitting the ACME request limit for generating HTTPS certs. You can see what HTTPS certs you have generated here: https://crt.sh/?q=nextcloud.my-tailnet.ts.net (replace your domain name).
# 1. Copy cert to your temporary directory and delete them later
docker container cp nextcloud-nextcloud-aio-tailscale:nextcloud.my-tailnet.ts.net.crt /home/user1/tailscale-keys-to-delete
# 2. Copy key to your temporary directory and delete them later
docker container cp nextcloud-nextcloud-aio-tailscale:nextcloud.my-tailnet.ts.net.key /home/user1/tailscale-keys-to-delete
If you want to copy these keys back to your tailscale container:
docker container cp /home/user1/tailscale-keys-to-delete/nextcloud.my-tailnet.ts.net.crt nextcloud-nextcloud-aio-tailscale:/
docker container cp /home/user1/tailscale-keys-to-delete/nextcloud.my-tailnet.ts.net.key nextcloud-nextcloud-aio-tailscale:/
Then navigate to https://login.tailscale.com/admin/machines and remove the old machine, and any new machine e.g. nextcloud-1.
Restart the Tailscale container:
docker restart nextcloud-nextcloud-aio-tailscale
2.11.4 Download the Tailscale client and connect to your Tailnet
- Next, download the Tailscale client on your computer or phone, login, and connect to your tailnet.
- You should now be able to navigate to
nextcloud.my-tailnet.ts.netfrom your browser on your computer or phone. Login using your admin account. You can create new users from there! Now that you have an HTTPS certificate, you should be able to access your NextCloud instance from your home network when you are logged into the Tailscale client on your computer or phone.
2.12 Enabling NextCloud Access from outside your Tailnet (No Tailscale client required)
To open your server to the open internet, you can use Tailscale's beta feature called Funnel.
- Add the relevant tag to your Tailscale ACL at https://login.tailscale.com/admin/acls/file:
// Funnel
"nodeAttrs": [
{"target": ["tag:nextcloud"], "attr": ["funnel"]},
],
- You may need to give access to your server specifically via a link like so: https://login.tailscale.com/f/funnel?node=qN2LCK4RnBgc6TVQ1, or directly from https://login.tailscale.com/admin/machines. You are ready to access your server from at home and anywhere on the open internet without using the Tailscale client; do so at your own risk! Note that download/upload may be slower since we are using Funnel.
2.13 Install Immich
Setting up Immich is similar to sections 2.9 through 2.12 for NextCloud!
2.13.1 Getting started with Tailscale - Steps 3-4 from Section 2.9
- Generate an OAuth client id and client secret at https://login.tailscale.com/admin/settings/oauth. Save the client id e.g.
ABC123and client secret e.g.tskey-client-XYZ789. - Grant the least permissions possible. For troubleshooting purposes, you can give Read/Write access for All scopes, but make sure to limit the scope after you are finished.
2.13.2 Installing Immich - From Section 2.10
- Log in to your openmediavault web UI by navigating to your static ip from earlier in section 2.3:
10.0.1.89for example. - Navigate to
Services > Compose > Add. - Name: e.g.
immich - File: copy my GitHub Gist
immich.ymlfrom here https://gist.github.com/iWebster28/ae0ba47184204d1d094bb5f222016736. Read it thoroughly, be sure to replace the environment variables, and update any parameters you see updated latest docker file https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml and discussion on the guide https://immich.app/docs/install/docker-compose. You will need to setTS_AUTH_KEYinimmich.envto the new Tailscale OAuth client key that you just made: e.g.tskey-client-XYZ789. Also make note of the tag,tag:immichinimmich.yml- you will need that for later in updating the Tailscale ACL. - Show environment file: check this box and paste in the contents of
immich.envfrom the Gist. Read it thoroughly and update it accordingly. - Click Save.
- Navigate to
Services > Compose > Files, select yourimmichfile, clickCheckto verify if there are any errors in the file. Once this passes, clickupto create and start your NextCloud containers! - Once the the main container starts, the
Statuswill change toUp.
2.13.3 Enabling NextCloud Access from Tailnet - From Section 2.11
2.13.3.1 Update your Tailscale ACL
- Recall from Section 2.9 the
tag:immichinimmich.yml- you need this to update your Tailscale ACL. - Navigate to Tailscale ACL https://login.tailscale.com/admin/acls/fileand update it according to your tag:
// Define the tags which can be applied to devices and by which users.
"tagOwners": {
"tag:nextcloud": ["your_email@mail_provider.com"],
"tag:immich": ["your_email@mail_provider.com"],
},
2.13.3.2 Get an HTTPS certificate for your domain
SSH into your server to get an HTTPS cert for your domain immich.my-tailnet.ts.net:
# 1. SSH into your server
ssh user1@raspberrypi.local
# 2. Find your tailscale container, e.g. `immich-immich-tailscale`
docker ps | grep immich-tailscale
# 3. Open a shell
docker exec -it immich-immich-tailscale sh
# 4. Get HTTPS cert to verify funnel works
/ # tailscale cert immich.my-tailnet.ts.net
Wrote public cert to immich.my-tailnet.ts.net.crt
Wrote private key to immich.my-tailnet.ts.net.key
2.13.4 Enabling NextCloud Access from outside your Tailnet - From Section 2.12
- Add the relevant tag to your Tailscale ACL at https://login.tailscale.com/admin/acls/file:
// Funnel
"nodeAttrs": [
{"target": ["tag:nextcloud", "tag:immich"], "attr": ["funnel"]},
],
- You may need to give access to your server specifically via a link like so: https://login.tailscale.com/f/funnel?node=qN2LCK4RnBgc6TVQ1, or directly from https://login.tailscale.com/admin/machines.
- Follow the Immich install steps. Assuming from
immich.env, yourIMMICH_DOMAINenvironment variable isimmich.my-tailnet.ts.net, this will be your Immich instance IP!
Build Complete!
You have now completed building a friends-and-family shareable, internet-accessible NextCloud and Immich instance on a Raspberry Pi 5 running OMV on Raspbian with a RADXA Penta SATA HAT using SDDs in a ZFS Mirror, drawing under 15W at load, and occupying the space of a small reusable water bottle! Great job!
References
- Tailscale, Caddy, and NextCloud AIO Docker files and community discussion: https://github.com/nextcloud/all-in-one/discussions/5439
- Install Guide for Immich on Docker and OMV: https://www.youtube.com/watch?v=7nHlSjuu8qA
- Tailscale HTTPS Cert Alternatives - Duck DNS and Cloudflare: https://github.com/dani-garcia/vaultwarden/wiki/Running-a-private-vaultwarden-instance-with-Let%27s-Encrypt-certs#getting-a-custom-caddy-build
- Logging user IP in NextCloud AIO behind Tailscale as Reverse Proxy: https://www.reddit.com/r/NextCloud/comments/17eitbg/tailscale_funnel_xforwardedfor_and_apache2/
- Possible alternative to Tailscale Funnel using TSDproxy: https://www.reddit.com/r/unRAID/comments/1i8h5q2/create_a_tailscale_funnel_to_nextcloud_with/
- Example Docker config for TsdProxy + Tailscale + Nextcloud AIO: https://github.com/almeidapaulopt/tsdproxy/discussions/29
- On Nginx as Reverse Proxy not being officially supported by NextCloud: https://www.reddit.com/r/NextCloud/comments/18nvn3b/why_do_most_tutorials_include_apache_instead_of/
- Tailscale Funnel: https://tailscale.com/kb/1223/funnel
- Tailscale Funnel: https://tailscale.com/kb/1223/funnel
- Docker Tailscale Guide with Funnel: https://tailscale.com/blog/docker-tailscale-guide
- On not using Caddy: https://github.com/nextcloud/all-in-one/discussions/5439#discussioncomment-11185080
- On why to use Caddy: https://github.com/nextcloud/all-in-one/discussions/5439#discussioncomment-11894807
Troubleshooting / Q&A
If browser can't load the OMV Web UI
Clear your browser cache, restart your browser, try incognito mode, or try another browser.
Out of space on microSD card on Pi
Likely, Docker is the cause. The following command clears many GB of space. Another possible solution is moving the docker build cache to the SSDs instead of the SSD card and symlinking it back on the OS drive. Alternatively, get a dedicated boot drive.
# 1. Check reclaimable space
sudo docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 39 13 16.34GB 11.49GB (70%)
Containers 14 13 951kB 0B (0%)
Local Volumes 36 15 1.984GB 7.797MB (0%)
Build Cache 23 0 1.274GB 1.274GB
# 2. Prune
sudo docker system prune -a
# 3. See reclaimed space! About 11GB.
sudo docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 12 12 6.018GB 15.89MB (0%)
Containers 13 13 951kB 0B (0%)
Local Volumes 36 15 1.984GB 7.797MB (0%)
Build Cache 0 0 0B 0B
Can I use NextCloud Talk via the open internet using this guide?
No. Here's the exact thread that answers this: https://github.com/nextcloud/all-in-one/discussions/5439#discussioncomment-11894807.
Basically, Funnel is a beta feature that only supports forwarding ports 443 and 80. NextCloud Talk uses 3478 and 3479, which cannot be forwarded with Funnel. You can however use NextCloud talk if both clients (and server of course) are connected to the Tailnet.
Talk uses TCP and UDP, and currently, funnel forces TCP.
I have tried forcing TCP to see if Talk would work over funnel, but to no avail. This is the configuration I used in Tailscale if you're curious:
tailscale funnel 443 on
tailscale funnel 3478 on
tailscale funnel 3479 on
/ # tailscale serve status
# Funnel on:
# - https://nextcloud.my-tailnet.ts.net
# - tcp://nextcloud.my-tailnet.ts.net:3478
# - tcp://nextcloud.my-tailnet.ts.net:3479
|-- tcp://nextcloud.my-tailnet.ts.net:3478 (TLS over TCP, Funnel on)
|-- tcp://<ipv4_address>:3478
|-- tcp://[<ipv6_address>]:3478
|--> tcp://127.0.0.1:3478
|-- tcp://nextcloud.my-tailnet.ts.net:3479 (TLS over TCP, Funnel on)
|-- tcp://<ipv4_address>:3479
|-- tcp://[<ipv6_address>]:3479
|--> tcp://127.0.0.1:3479
https://nextcloud.my-tailnet.ts.net (Funnel on)
|-- / proxy http://127.0.0.1:80 # Alt for using Apache over port 11000
Regardless, the config from the main guide allows you to use Talk as long as both clients are on logged onto their Tailscale clients, which is more secure.
ZFS install fails
If your ZFS install fails when updating OMV packages, then you may see this red popover error when running docker: 500 Internal Server Error - No file system backend exists for 'zfs'. Occasionally, this happen when you update packages too.
SSH into your Pi and try loading your pool name:
ssh user1@raspberrypi.local
sudo zpool import -f <your_pool_name>
If the zpool command fails, then you may need to install the zfs packages from debian (since at the time of writing this, raspbian may not fully support the dependent zfs packages)
echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list.d/backports.list
sudo apt update
sudo apt install -t bookworm-backports zfsutils-linux zfs-dkms
sudo dkms autoinstall
sudo modprobe zfs
And run again
sudo zpool import -f <your_pool_name>
There should be no errors. You should see your pool again at http://10.0.1.89/#/storage/zfs/pools. You may need to restart your Pi for NextCloud/Immich to pick up the ZFS pool again.
Tailscale cert fails
If this hangs:
/ # tailscale cert nextcloud.my-tailnet.ts.net
Check Tailscale container logs:
# 1. Check logs
docker logs nextcloud-nextcloud-aio-tailscale
...
2025/03/28 20:54:59 cert("nextcloud.my-tailnet.ts.net"): already had ACME account. 2025/03/28 20:55:59 cert("nextcloud.my-tailnet.ts.net"): getCertPEM: 429 urn:ietf:params:acme:error:rateLimited: too many certificates (5) already issued for this exact set of domains in the last 168h0m0s, retry after 2025-03-29 22:56:38 UTC: see https://letsencrypt.org/docs/rate-limits/#new-certificates-per-exact-set-of-hostnames
...
You can only request 1 cert every 34 hours. Copy the keys to an external directory as in my guide to prevent this from happening during dev!
500 Internal Server Error: your Tailscale account does not support getting TLS certs
When running this inside your Tailscale container:
/ # tailscale cert nextcloud.my-tailnet.ts.net
If you get this error:
500 Internal Server Error: your Tailscale account does not support getting TLS certs
Then make sure you have HTTPS enabled in your Tailscale account: https://login.tailscale.com/admin/dns.
# 1. Open a shell within the Tailscale container itself for debugging:
docker exec -it nextcloud-nextcloud-aio-tailscale sh
# 2. Sanity: Check the status of connected clients
/ # tailscale status
101.79.153.11 nextcloud nextcloud.my-tailnet.ts.net linux ...
101.65.97.20 your_phone your_email@mail_provider.com ...
...
# 3. Sanity: Check your ip
/ # tailscale ip -4
101.79.153.11
# 4. Request a TLS cert
/ # tailscale cert nextcloud.my-tailnet.ts.net
500 Internal Server Error: your Tailscale account does not support getting TLS certs
# 5. Fix: Enable HTTPS in your tailscale account
# 6. Re-run the cert command
/ # tailscale cert nextcloud.my-tailnet.ts.net
Wrote public cert to nextcloud.my-tailnet.ts.net.crt
Wrote private key to nextcloud.my-tailnet.ts.net.key
Tailscale Funnel
If you are having issues with Funnel, you can test from CLI:
# 1. Open a shell in the Tailscale container
docker exec -it nextcloud-nextcloud-aio-tailscale sh
# 2. Try to open a funnel on port 443
/ # tailscale funnel 443
# 3. You will get a link to allow Funnel access here https://login.tailscale.com/f/funnel?node=xyzABC.
# 4. Check the status of funnel
/ # tailscale serve status
# Funnel on:
# - https://nextcloud.my-tailnet.ts.net
https://nextcloud.my-tailnet.ts.net (Funnel on)
|-- / proxy http://nextcloud-aio-apache:11000
Note: tinkering with Funnel/Tags/ACL may end up creating multiple machines in your Tailscale account. You can always delete them and Tailscale will recreate them https://login.tailscale.com/admin/machines.
Tailscale keeps adding machines! Help!
Sometimes, you may end up with multiple duplicates of your service/machine e.g. nextcloud, nextcloud-1, and so on. Be sure to stop your containers in OMV UI or from the CLI over SSH. You can delete your containers from the machines page https://login.tailscale.com/admin/machines and then troubleshoot the issue. Remember that Funnel uses the ACL based on the emitted tag to route traffic, so if your machine has a name of nextcloud-1 or immich-1, then it will break, and will likely create a domain name clash with NextCloud's configuration.
"I need to start over" for NextCloud
If you want to start over, you can optionally delete your NextCloud DATADIR. Do not do this if you do not want to lose your account and user data. This is not a requirement to start fresh if you just want to prune your containers and verify your config works.
ssh user1@raspberrypi.local
# This is a recursive deletion command; use at your own risk:
sudo rm -rf /ssdpool/data/docker/appdata/nextcloud_data
You can also run some CLI Docker commands to dive deep into debugging. Here are some helpful Docker commands you can run if you SSH into your Pi:
Run containers
You can always find the compose file from OMV and run it from your CLI after SSHing into your Pi:
ssh user1@raspberrypi.local
sudo ls /ssdpool/data/docker/compose/<compose_file_name>
# e.g. compose_file_name == nextcloud
sudo cd /ssdpool/data/docker/compose/nextcloud/
docker compose up --built --wait
docker compose logs --follow
Stop all containers (stops everything; be careful):
sudo docker stop $(sudo docker ps --format "{{.Names}}" | tr '\n' ' ')
sudo docker ps --filter "status=exited"
Prune containers (prune => delete)
sudo docker container prune
Remove network
sudo docker network rm nextcloud-aio
sudo docker volume ls --filter "dangling=true"
Remove volumes
Caution: if you did not set your NEXTCLOUD_DATADIR to be outside your container, then this command will delete all your user data stored in the container! Only run this if you want a completely fresh start.)
sudo docker volume prune --filter all=1
sudo docker ps --format "{{.Names}}" | tr '\n' ' '
sudo docker volume rm <volume_name>
Error response from daemon: failed to create task for container
If you run this command:
docker compose up --build --wait
And get this error:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: can't get final child's PID from pipe: EOF: unknown
Fix it by running:
# 1. List containers
docker ps
# 2. Stop all containers
sudo docker stop $(sudo docker ps --format "{{.Names}}" | tr '\n' ' ')
# 3. Note: `prune` will delete all your containers! Remember that if your NEXTCLOUD_DATADIR is set externally, then your user and account data won't be deleted.
docker container prune
# 4. Remove caddy volumes
docker volume rm caddy_certs caddy_config caddy_data
# 5. Run compose up from CLI, or just do it from the OMV UI.
sudo ls /ssdpool/data/docker/compose/<compose_file_name>
# e.g. compose_file_name == nextcloud
sudo cd /ssdpool/data/docker/compose/nextcloud/
docker compose up --build --wait
Storage > zfs > Pools > ssd-pool has State: DEGRADED
This may happen if you have a power outage and one of the SSDs is writing during that time period. To fix it, start a scrub by going to Storage > zfs > Pools > Select your ssd-pool > Tools > Scrub. You can check the status of the scrub from CLI:
# 1. SSH into pi
ssh user1@raspberrypi.local
# 2. Before scrub: check pool status
user1@raspberrypi:~ $ zpool status
pool: ssd-pool
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
scan: scrub repaired 0B in 00:24:44 with 0 errors on Sun Jun 8 00:48:45 2025
config:
NAME STATE READ WRITE CKSUM
ssd-pool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
ata-TEAM_SSD_A ONLINE 0 0 0
1234567891234567890 UNAVAIL 0 0 0 was /dev/disk/by-id/ata-TEAM_SSD_B-part1
# 3. After scrub: check pool status
user1@raspberrypi:~ $ zpool status
pool: ssd-pool
state: ONLINE
status: One or more devices has experienced an unrecoverable error. An
attempt was made to correct the error. Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P
scan: scrub repaired 42.8G in 00:04:04 with 0 errors on Mon Jul 28 18:23:22 2025
config:
NAME STATE READ WRITE CKSUM
ssd-pool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-TEAM_SSD_A ONLINE 0 0 0
ata-TEAM_SSD_B ONLINE 0 0 364K
You may have to wait a few hours. Once this is done, the drive should come back online.
Storage > zfs > Pools > ssd-pool has State: DEGRADED and drive has State: REMOVED
This may happen if a drive completely fails. In this case, you may need to RMA your failing drive. Once you have a replacement drive, shut down your server and attach the new drive.
Replace the drive in your ZFS pool using the following commands:
# 1. SSH into pi
ssh user1@raspberrypi.local
# 2. Before replacement: check pool status
user1@raspberrypi:~ $ zpool status
pool: ssd-pool
state: DEGRADED
status: One or more devices has been removed by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using zpool online' or replace the device with
'zpool replace'.
scan: scrub repaired 0B in 01:22:31 with 0 errors on Sun Mar 8 01:46:32 2026
config:
NAME STATE READ WRITE CKSUM
ssd-pool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
ata-TEAM_SSD_A REMOVED 0 0 0
ata-TEAM_SSD_B ONLINE 0 0 0
errors: No known data errors
# 3.1 Validate with lsblk which drive you just added
user1@raspberrypi:~ $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.9T 0 disk
sdb 8:16 0 1.9T 0 disk
├─sdb1 8:17 0 1.9T 0 part
└─sdb9 8:25 0 8M 0 part
...
# 3.2 Use lsblk -f as sanity check on pool label on existing drive
user1@raspberrypi:~ $ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
sdb
├─sdb1 zfs_member 7000 ssd-pool 12345678987654321
└─sdb9
# 4. Replace drive with STATE: REMOVED
sudo zpool replace ssd-pool ata-TEAM_SSD_A /dev/sda
# 5. Check resilvering status
user1@raspberrypi:~ $ zpool status
pool: ssd-pool
state: DEGRADED
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Fri Apr 17 21:51:03 2026
376G / 814G scanned at 41.8G/s, 291M / 814G issued at 32.4M/s
275M resilvered, 0.03% done, 07:09:03 to go
config:
NAME STATE READ WRITE CKSUM
ssd-pool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
replacing-0 DEGRADED 0 0 0
ata-TEAM_SSD_A REMOVED 0 0 0
sda ONLINE 0 0 0 (resilvering)
ata-TEAM_SSD_B ONLINE 0 0 0
errors: No known data errors
# 6. When complete, you should see the state restored to ONLINE
Thank you for reading until the end:)