Migrate from Native 25.0.13 to AIO Docker 33

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 25.0.13
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu Server 20.04
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.41
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Not sure, maybe none
  • PHP version (e.g, 8.3):
    • PHP 7.4.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • NA
  • When did this problem seem to first start?
    • NA
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No (?)

Goal

I am trying to migrate all my data from my existing native nextcloud instance, to a new AIO docker container.

Milestones

  • Set up new server (referred to as beta) with ubuntu 26.04
  • Copied the nextcloud directory and data form current server (referred to as alpha)
  • Install docker on beta
  • Get the AIO container set up on beta ** ISSUES
  • Find the container’s volumes and copy the files from alpha into them
  • Hope that works
  • Replicate process on alpha

Context

I have an older instance of Nextcloud running as a bare metal installation on a ubuntu 20.04 server. It is currently working fine, but I am looking to make long-overdue upgrades. The built-in updater utility claims I am up to date. I suspect that is because Ubuntu Server 20.04 is EOL and no longer getting Nextcloud deployments.

After some research, I can see that releases are now done through the All In One (AIO) Docker images. I only have passing familiarity with docker. To be fair, I am not super familiar with systems administration in general. A friend helped me set up my nextcloud server ~5 years ago.

To avoid breaking my current server, I have set up a secondary computer where I am attempting to figure out the migration process. I am calling this secondary server “beta” and my primary server as “alpha”.

What I have tried so far

I have found a hand full of resources online, but none seem to cover my situation exactly. The two best are Migrating to Nextcloud Docker–this blog post is about moving their exact setup into docker containers. I want to both update and use AIO. The second resource I found was all-in-one/migration.md – this wants me to ensure that my old instance and the AIO are running the same version. I can’t update the old instance and I am not sure how/if I can downgrade the AIO.

I have copied my nextcloud directory and nextcloud data directory over to my beta server running ubuntu 26.04. I have installed docker and confirmed it is working. I have begun following instructions on all-in-one/README.md to set up the AIO container. My hope is that once I have it up and running I can find a way to import my datadirectory, database, etc into the container.

Summary of the issue you are facing:

I ran the AIO docker container with the run command provided in the all-in-one/README.md. This executed correctly and I was able to connect at https://IP:8080, however I got stuck when I arrived at this page.

I entered the domain I currently use and I got the following error

The domain is not reachable on Port 443 from within this container. Have you opened port 443/tcp in your router/firewall? If yes is the problem most likely that the router or firewall forbids local access to your domain. Or in other words: NAT loopback (Hairpinning) does not seem to work in your network. You can work around that by setting up a local DNS server and utilizing Split-Brain-DNS and configuring the daemon.json file of your docker daemon to use the local DNS server.

In my mind this could have two possible sources.

  1. This could be related to an ongoing issue I have had where I am unable to connect to my server from the same local network
  2. Its because my router is configured to forward traffic to the alpha server and not beta

I have two main questions

  1. Can anyone help me resolve this “domain not reachable” issue?
  2. Can anyone comment on my overall migration strategy? Is it possible, am I doomed?

It’s likely because of your PHP version. Many people run/ran >v25 on Ubuntu 20.04.

After some research, I can see that releases are now done through the All In One (AIO) Docker images

Well, not exactly. AIO is merely another deployment approach. Archive/bare metal is certainly still an option.

Files, yes. Database, no. Database imports must be matching versions.

Yes, both of these are problems. :slight_smile:

Well, not exactly. AIO is merely another deployment approach. Archive/bare metal is certainly still an option.

That is good to know. Though I am not very familiar with docker, I can see the advantages of containers for system maintenance (like PHP versions apparently). I don’t remember the bare metal install being nearly this finicky. It is nice to know there is another option to fall back on.

Files, yes. Database, no. Database imports must be matching versions.

Obviously the files are what I care about the most. What all do I lose if I don’t/can’t import the database? I imagine it would be things like my users, file share settings, etc?

Yes, both of these are problems. :slight_smile:

Sigh, I figured. Networking is not my strongest area.

I am considering narrowing my scope to getting my nc instance updated to 33 as bare metal and then worrying about the docker later. Its annoying that I can’t test drive the AIO container without networking infrastructure already in place

I can see the advantages of containers for system maintenance (like PHP versions apparently).

Indeed.

Yes and: Calendars, tasks, shared files, sharing links, and various other things depending on what apps you use.

I am considering narrowing my scope to getting my nc instance updated to 33 as bare metal

You can upgrade the PHP in Ubuntu to a version compatible with newer versions of Nextcloud. Though I think Ubuntu 20.04 is no longer supported by the normal PHP out-of-band upgrade option (Sury) so you might have to bump to the next Ubuntu LTS (22.04) first anyhow. This forum has many resources on the topic and approaches. (There’s a script around too targeting PHP upgrades specifically by @ernolf, though I suspect even it’ll be challenged by 20.04).