0

I operate a Nextcloud server. It is a bunch of docker containers running on Linux.

It works as expected for synchronizing files across client machines. However, I would like the server to have easy access to some of the accounts.

For example, I use a Nextcloud folder as a simple means of implementing distributed data storage for programs without a builtin synchronization feature. I simply let the program run as if the data is in a local file, but the file just happens to be in a Nextcloud folder, and gets synced across all my machines. It is very convenient and I've used it without issues for years, except that it's hard to run the program on the server itself.

The Nextcloud data store is a docker volume and I know that I can find its URL and access the files there. This isn't ideal because:

  • The path is not very tidy

  • I'm not sure if the path is stable

  • I think changing files this way would mess up Nextcloud because the changes would not be tracked in its database

  • It would probably cause issues should I end up enabling server-side encryption for the account

I have also thought about just installing the Nextcloud client on the server. This would probably work but it would double the hard drive space used, which I'd like to avoid as my account is quite large (~50 GB).

1 Answer 1

0

The Nextcloud data store is a docker volume and I know that I can find its URL and access the files there. This isn't ideal because:

If you are running Docker and using Volumes, why not just give them a better mount point? Is this docker-compose, docker desktop, or docker run?

I personally use compose so an example for me would be:

---
version: '3'

services:
  app_name:
    image: yourimage:tag
    container_name: app_name
    restart: unless-stopped
    volumes:
      - /mnt/docker/data/app_name:/config
      - /mnt/docker/database/app_name:/var/lib/mysql
    ports:
      - 8080:80

I think changing files this way would mess up Nextcloud because the changes would not be tracked in its database

As long as you refer to Nextclouds documentation on correct file permissions, and read the docs on a manual backup and restore there should be no issues. Just bring a new docker stack up with your new instance and database, then import data from your other instance. As longs as you create the new database with the same credentials you should be just fine.

1
  • I don't really want to restart the Nextcloud service every time I change a file from the server. Commented May 27, 2023 at 0:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .