Docker makes this so easy

When I was first learning Nextcloud, I tried almost every option for installing. Snap, univention, manual… The one that finally stuck was Docker, although I basically had no experience with Docker at the time.

I had installed small instances for some of my clients for various things. In some cases as a server to receive electronic bids from vendors who had guest accounts on it. I had a case there other day where one had been shut down for I don’t know how long. They hadn’t used it since before COVID. Suddenly they wanted it fired back up to use again, and on a completely different domain and IP address.

When I looked at it, it was sitting on Ubuntu 18.04 and Nextcloud 17. One of my colleagues had already fixed the DNS and port forwards, but wasn’t sure about moving Nextcloud because I had it on a reverse procedure named virtual host.

So I started by patching Ubuntu 18.04 and then upgrading it to 20.04, and then updated Docker. Then I updated my Nextcloud config, Apache config, and certbot for the new domain name.

Then I pulled the latest image for NC 17, and from there I stepped it through each version by changing the image tag to 18-apache, 19-apache, and so on.

  • Increment the image tag in docker-compose.yml
  • docker compose pull
  • docker compose up -d; docker compose logs -f
  • Wait a minute for it to upgrade
  • Run any OCC command listed on the settings page (usually occ db:add-missing-indices)
  • Rinse and repeat up to NC 24

At NC 20 I had to throw a password on redis, which I was expecting to run into, so it didn’t take long to fix. And I had to set overwrite.cli.url to resolve an issue with the Gmail relay service. Other than that… smooth sailing.


absolutely agree.

I started with Nextcloud and Docker 2 years ago without any experience, with solid Windows Server/applications admin background but very little Linux and Nextcloud know-how. Now I can say Docker is very good platform to host you applications once you master the learning curve!