I’ve been running nextcloud for my family and some projects about two years now and while it’s allright when it’s not breaking, I’ve had it break twice during upgrades and once outside of an upgrade. Getting back to running again during upgrades may require that I have two instances running one after the other - which is just too much to deal with for me, I’m anxious everytime a new update arrives, even though my system does backups and updates mostly automatic (yunohost).

(I run Nixos/Guix on my own laptop and get shivers anytime I have to deal with around in debian/android/anything-unlike-nixos-or-guix. And, yes, last I checked even Nixos struggles with nextcloud - which speaks volumes about it. I run yunohost on the server because it did DNS automagically)

So my question is, what could I change to that has:

  • high reproducibility/easy maintenance/easy upgrades.
  • file sync
  • file sharing between users
  • some kind of direct link file sharing

Nice to have:

  • collaboration of some sort
  • caldav (calendar and tasks)
  • carddav (contacts)

Grateful for any and all inputs here. :)

  • tonton@infosec.pubOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    I’ve avoided docker for a long time. So when you set this up how do you configure? Can I do it declaratively (text file) or do I have to click around in the app?

    And thank you for input. ٩(◕‿◕。)۶

    • INeedMana@piefed.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      Same as now, you only have to write in docker compose that this local file, next to docker compose should be mounted to that location inside container

    • null@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      Yes you can use docker-compose which spines up all your necessary container connects them with an internal network and most of your stuff has been setup.

      Then you but all your configurations in a git repository and you have a all your container under version control.

      This is a slightly modified version of mine:

      • I use traefik as a reverse proxy
      • I mount my syncthing folder to have access on the go to my keepass file

      Not in this, but maybe relevant

      • Use borgmatic as backup and have script that stops all container with a mount under /opt/backup/docker, does the backup and restarts them.
      ---
      networks:
        default:
          driver: bridge
        traefik_proxy:
          external: true
          name: traefik_proxy
      services:
        nextcloud-app:
          container_name: nextcloud-app
          depends_on:
            - nextcloud-db
            - nextcloud-redis
          environment:
            - TZ=Europe/Berlin
            - POSTGRES_HOST=nextcloud-db
            - POSTGRES_PASSWORD=nextcloud
            - POSTGRES_DATABASE=nextPosPw
            - POSTGRES_USER=nextcloud
            - REDIS_HOST=nextcloud-redis
            - REDIS_HOST_PASSWORD=nextRedPw
          image: nextcloud:32
          labels:
            - container-hosts.enable=true
            - container-hosts=${NEXTCLOUD_URL}
            - traefik.enable=true
            - traefik.http.routers.nextcloud.entrypoints=web-secure
            - traefik.http.routers.nextcloud.rule=Host(`${NEXTCLOUD_URL}`)
            - traefik.http.routers.nextcloud.tls=true
            - traefik.http.routers.nextcloud.middlewares=nextcloud-chain@docker
            - traefik.http.middlewares.nextcloud-chain.chain.middlewares=nextcloud-redirect@docker,secHeaders@file
            - traefik.http.middlewares.nextcloud-redirect.redirectregex.regex=^https://(.*)/.well-known/(card|cal)dav
            - traefik.http.middlewares.nextcloud-redirect.redirectregex.replacement=https://$$1/remote.php/dav/
            - traefik.http.services.nextcloud.loadbalancer.server.port=80
          networks:
            - traefik_proxy
            - default
          restart: always
          volumes:
            - /opt/backup/docker/nextcloud/html/data:/var/www/html/data
            - ./data/config:/var/www/html/config
            - /opt/backup/docker/syncthing/data:/syncthing
        nextcloud-cron:
          container_name: nextcloud-cron
          depends_on:
            - nextcloud-db
            - nextcloud-redis
          entrypoint: /cron.sh
          environment:
            - TZ=Europe/Berlin
          image: nextcloud:32
          networks:
            - default
          restart: always
          volumes:
            - /opt/backup/docker/nextcloud/html/data:/var/www/html/data
            - ./data/config:/var/www/html/config
            - /opt/backup/docker/syncthing/data:/syncthing
        nextcloud-db:
          container_name: nextcloud-db
          environment:
            - TZ=Europe/Berlin
            - POSTGRES_USER=nextcloud
            - POSTGRES_PASSWORD=nextPosPw
            - POSTGRES_DB=nextcloud
          image: postgres:17-alpine
          networks:
            - default
          restart: always
          volumes:
            - /opt/backup/docker/nextcloud/postgresql:/var/lib/postgresql/data
        nextcloud-redis:
          command: valkey-server --requirepass nextRedPw --save 30 1 --loglevel warning
          container_name: nextcloud-redis
          environment:
            - TZ=Europe/Berlin
          image: docker.io/valkey/valkey:8-alpine
          networks:
            - default
          restart: always
          volumes:
            - redis_data:/data
      volumes:
        redis_data:
      ...
      
      

      PS: I don’t want to use any fancy clicky app, because over the last years I had so often problems with updates of these clicky apps and this version is straight forward for all my containers.