Self-Hosted Cloud Storage: Setting Up Nextcloud on My Unraid Server

Share
Self-Hosted Cloud Storage: Setting Up Nextcloud on My Unraid Server

Self-Hosted Cloud Storage: Setting Up Nextcloud on My Unraid Server

By Anthony Booth — 8 Apr 2026

I've been meaning to get off Google Drive for a while. Not because I have anything against it — it works fine — but because I've got a perfectly capable home server sitting in my office, and it felt wrong to keep paying for cloud storage when I could host it myself. After getting Immich running for photos and Ghost for this blog, Nextcloud was the obvious next step: a proper self-hosted file store for the whole family.

This post is a real-world walkthrough of how I got Nextcloud running on Cyborg (my Unraid server), accessible from anywhere via cloud.albl.co.uk. As usual, it wasn't entirely smooth sailing — but that's what makes it worth writing about.

What Is Nextcloud?

If you haven't come across it before, Nextcloud is an open-source, self-hosted alternative to Google Drive or Dropbox. You get file sync, sharing, a web interface, and mobile apps — all running on your own hardware, with your data staying on your own disks. There's also a huge ecosystem of apps you can install on top: calendars, contacts, notes, and more.

I'm running the lscr.io/linuxserver/nextcloud Docker image, which is maintained by the LinuxServer team and is generally the most straightforward way to get Nextcloud running in a container.

The Setup

My server, Cyborg, already runs several Docker containers managed through Unraid's Docker interface. I already had a MySQL container running for the Booth Family Hub app, so my plan was to reuse that same MySQL instance for Nextcloud — just a separate database. This keeps my container count down and avoids spinning up another database server.

The Nextcloud container was added through Unraid's Community Applications, and I set it to use port 4343 on the host. Storage is mapped to /mnt/user/appdata/nextcloud/ for config and /mnt/user/data/nextcloud/ on the array for the actual file data.

The Database Problem

The first hurdle was getting Nextcloud to talk to MySQL. When you go through the Nextcloud setup wizard and select MySQL/MariaDB, it asks for a hostname — and I naively typed in booth-family-hub-db (the name of my MySQL container). That gave me a "Name does not resolve" error immediately.

The reason is that Nextcloud was running on Docker's default bridge network, while my MySQL container was on a custom internal network called booth-internal. Different networks, no name resolution between them.

The fix was simple once I understood the problem: in Unraid's Docker settings for the Nextcloud container, I changed the Network Type to Custom : booth-family-hub_booth-internal. That connected Nextcloud to the same internal network as MySQL, and suddenly booth-family-hub-db resolved perfectly.

Before running the setup wizard, I also needed to create the database and user in MySQL:

docker exec -it booth-family-hub-db mysql -u root -pYOURPASSWORD -e "CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;CREATE USER IF NOT EXISTS 'nextcloud'@'%' IDENTIFIED BY 'YOURPASSWORD';GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%'; FLUSH PRIVILEGES;"

With that done, the wizard completed without complaint and Nextcloud installed its recommended apps.

Getting It Online: Cloudflare Tunnel + NPM

My external access setup follows the same pattern I use for everything else on Cyborg: Cloudflare Tunnel routes traffic to Nginx Proxy Manager (NPM), which then forwards to the appropriate container. I've written about this pattern before — it means I never have to open ports on my router, and everything gets a proper SSL certificate.

 For Nextcloud, I added cloud.albl.co.uk as a new public hostname in my Cloudflare Tunnel config, pointing at http://npm_80:80 (NPM's container name on the Docker network). Then in NPM I created a new proxy host:

•        Domain: cloud.albl.co.uk

•        Scheme: https (because Nextcloud's container runs its own internal HTTPS)

•        Forward to: 192.168.31.10:4343

•        Websockets: enabled

•        SSL: Let's Encrypt certificate

The SSL certificate request worked first time, which was a relief after the trouble I had with some earlier setups. 

Fixing the Reverse Proxy Settings

Once Nextcloud was accessible at cloud.albl.co.uk, there were a couple of configuration tweaks needed to make it behave properly behind a reverse proxy. Without these, Nextcloud can generate incorrect redirect URLs or complain about insecure connections.

docker exec -it nextcloud php /app/www/public/occ config:system:set overwriteprotocol --value=https

docker exec -it nextcloud php /app/www/public/occ config:system:set overwrite.cli.url --value=https://cloud.albl.co.uk

docker exec -it nextcloud php /app/www/public/occ config:system:set trusted_domains 1 --value=cloud.albl.co.uk

docker exec -it nextcloud php /app/www/public/occ config:system:set trusted_proxies 0 --value=192.168.31.3

Note that the occ command path for the LinuxServer image is /app/www/public/occ — not the more commonly documented /var/www/html/occ. I wasted a few minutes on that one

The Result

Nextcloud is now running at https://cloud.albl.co.uk, accessible from anywhere in the world, with a valid SSL certificate and proper reverse proxy configuration. The Nextcloud mobile app connects without any fuss, and file sync is working on my phone and laptop.

Next steps are to set up accounts for the rest of the family and configure automatic photo backup from the boys' devices as a secondary backup alongside Immich. I'll also look at enabling the Nextcloud Calendar and Contacts apps to see if they're worth integrating with the Family Hub.

If you're thinking about self-hosting your own file storage, Nextcloud is genuinely one of the more polished self-hosted applications out there. The setup has a few rough edges — particularly around networking when you're running multiple containers — but once it's running, it's solid.

Running on: Cyborg (Unraid), Docker, MySQL 8, Nginx Proxy Manager, Cloudflare Tunnel