CORE to SCALE NextCloud Migration

I just did a migration from CORE to SCALE and everything I’ve been researching the last couple of days about the move said that it should be possible…

I decided to do the migration because CORE has always been a struggle for me and the UI and App based stuff for SCALE just always makes more sense in my mind. Also Emby decided to stop working…

My main reason for the NAS is to run my Nextcloud for family’s documents and to auto-upload pictures off of phones. And now I can’t get it to work properly, with me about to leave for a work trip after this weekend (I really just need to build a sandbox PC for me to do this stupid tinkering stuff in haha). I had previously installed Nextcloud in CORE via danb35’s script and some help from victort after moving and DDNS issues arose, I WAS able to easily follow tutorials to re-use my Cloudflare domain as a tunnel with Cloudflared. Now I just can’t get Nextcloud to work properly haha.

Now, the nextcloud database and all my files and stuff still exist in the /mnt/NAS/nextcloud/(config/db/files/themes) from the script install, but I’m getting permission errors and something about Postgre (not sure what that is…) along with other issues everytime I try to patch a fix,

Main issue is trying to get the Nextcloud to re-enable my users and files so that way we can atleast log in from home. After that remote access (which I THINK should be working but without Nextcloud up, I can’t verify).

Any help is greatly appreciated. Please let me know what information you need from me. Thank you so much in advance!

You will probably have to convert your data base to Postgres because the script by @dan uses MariaDB by default.

How to do that, well…

Once that is done, you should be able to configure the Nextcloud app with host path to your data and database.

If the data you have currently in Nextcloud isn’t more than a few gigs, you might be able to set up the app from scratch, using host path for data and database, then copy all the user files into the “data” path, and running “occ files:scan --all” command to reindex your files into the database.

How many users do you have?
How much storage have you used?

You will probably not have to worry about the config file, as that will most likely be taken care of by the docker container. As well as the themes path.

Here’s the compose file i’m using for my nextcloud which uses mariadb. maybe you can export your database from core and import it in mariadb

--
services:
  nextcloud-db:
    image: linuxserver/mariadb:latest
    container_name: nextcloud-db
    restart: unless-stopped
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /mnt/data/nextcloud/mariadb/config:/config
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=supersecurepassword #SQL root password
      - MYSQL_PASSWORD=supersecurepassword #SQL username
      - MYSQL_DATABASE=nextcloud #Databasename
      - MYSQL_USER=nextcloud #SQL Username
      - MYSQL_INITDB_SKIP_TZINFO=1
      - MARIADB_AUTO_UPGRADE=1
    ports:
      - 3306:3306
  nextcloud-redis:
    image: redis:alpine
    container_name: nextcloud-redis
    hostname: nextcloud-redis
    networks:
        - default
    restart: unless-stopped
    command: redis-server --requirepass nextcloud # Redis Passwort eingeben
  nextcloud-app:
    image: linuxserver/nextcloud:latest
    container_name: nextcloud-app
    restart: unless-stopped
    depends_on:
      - nextcloud-db
      - nextcloud-redis
    environment:
      - PUID=1000
      - PGID=1000
      - TRUSTED_PROXIES="**"
      - OVERWRITEPROTOCOL=https
      - OVERWRITECLIURL=yourdomainname
      - OVERWRITEHOST= yourdomainname
      - REDIS_HOST= nextcloud-redis
      - REDIS_HOST_PASSWORD= supersecurepassword # Redis Passwort von oben wieder eingeben
    ports:
      - '11080:80'
    volumes:
      - /pathtonextcloudconfig:/config
      - /pathtonextclouddata:/data
    labels:
      - "traefik.enable=true" #only for use with traefik
      - "traefik.docker.network=proxy" #only for use with traefik
      - "traefik.http.routers.nextcloud.rule=Host(`mydomain.com`)" #only for use with traefik
      - "traefik.http.routers.nextcloud.entrypoints=https" #only for use with traefik
      - "traefik.http.routers.nextcloud.tls=true" #only for use with traefik
      - "traefik.http.services.nextcloud.loadbalancer.server.port=80" #only for use with traefik
      - "traefik.http.routers.nextcloud.tls.certresolver=cloudflare" #only for use with traefik
    networks:
      - proxy #only for use with traefik
      - default
networks:
  proxy:
    external: true

ignore the traefik labels if you want to use npm or caddy

The default is MariaDB with dans script.

You are doing this with a custom app here right? I’m assuming the OP is using the chart version.

Can’t I keep it MariaDB? There’s an option in the Web Portal install thingy for SQLLite, SQL/MariaDB, and Postgres. Can I try doing it with the MariaDB maybe?

I tried to get my whole family into my server so that leave Google, but alas it’s really only my wife & I (+admin). I have about 2.7TB in there.

no, right now im still using a nspawn container and portainer, i’m waiting for full release till i migrate to native docker on scale.

Sorry for being dense…but how do I export my CORE Nextcloud with this compose file?

Also, which Pod Shell do I use to edit the SCALE Nextcloud instance?