Could Someone Give me Advice on Setting Up Nextcloud with Docker on a Home Server?

Hello there,

I am new to Docker and I am looking to set up Nextcloud on my home server using Docker containers. I have been exploring various tutorials and guides; but I would greatly appreciate some advice from those experienced with Docker and Nextcloud deployments.

What should an optimal docker-compose.yml file look like for running Nextcloud with Docker? Are there any specific configurations or best practices I should follow?

How do you manage persistent storage for Nextcloud in Docker? Should I use Docker volumes or bind mounts, and what are the advantages of each approach?

What are some essential security practices I should implement to secure my Nextcloud installation running in Docker? Are there specific Docker configurations or network settings I should be aware of?

What backup strategies do you recommend for Nextcloud data when using Docker? Are there any Docker-specific tools or scripts that simplify the backup process?

Also, I have gone through this post; which definitely helped me out a lot.

I have already set up Docker on my server and have basic familiarity with Docker commands. However, I am keen to learn from your experiences and suggestions to ensure a stable and secure setup for Nextcloud.

Thank you in advance for your help and assistance.

We provide a sample in the readme with required and optional fields.

This is covered in the container readme, we discuss what we support which are bind mounts. pros and cons to each can be determined via docker’s official documentation, but we support bind.

Security options specific to nextcloud are best determined by reading the nextcloud documentation. A strong password and multifactor authentication would be our suggestion, this has nothing to do with docker though.

generally speaking, if you just care about nextcloud, backup the /config path and use the supported backup tools for your database of choice (covered in their own documentation). The path containing the data (/data by default) should also be backed up if you need to preserve it. There are many ways to do backups, I cant think of any specific to docker, use what you understand and can support.

The best forum for these kinds of general questions would be in our discord in #other-support. Note, there is an expectation that you have read the documentation for your database of choice, your application (nextcloud), and our container readmes.