A NextCloud server with MariaDB as database. This server is behind a reverse proxy (Nginx), enabled with LetsEncrypt service for SSL encryption.
Special thanks to the following github users:
- https://github.com/nextcloud/docker
- https://github.com/jwilder/nginx-proxy
- https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
- First of all you have to clone this repository on your server.
-$ mkdir -p ~/nextcloud
-$ cd ~/nextcloud
-$ git clone https://github.com/gregkoul/Dockerized-NextCloud-MariaDB-LetsEncrypt.git- Create a directory for your storage with owner www-data.
-$ mkdir -p /media/storage/nextcloud
-$ chown -R www-data:www-data /media/storage/nextcloud- Next edit the db.env file and modify your environment variables
-$ cd ~/nextcloud/Dockerized-NextCloud-MariaDB-LetsEncrypt
-$ vi db.env- Next edit the web.env file and modify your environment variables
-$ vi web.env- Before you start up the dockers, you need to create only once a new virtual seperate network.
-$ docker network create nginx-proxy- Now you have to spin up everything.
-$ docker-compose up -d-
Stay back and relax for a while! The docker-compose will spin up all the dockers one by one. Let about 2-3 minutes in order LetsEncrypt service create and pull the certs for your new domain. Be patient.
-
I hope NOW to have access your DOMAIN. You have to finalize the initial setup for NextCloud service.
-
During the initial setup, select the desired database type (eg. MariaDB). Fill the hostname field for the database server, with the database-container name. (eg. db). For the db credentials, use the environmental variables found in the db.env file.
- First of all you have to stop and remove the old dockers.
-$ cd ~/nextcloud/Dockerized-NextCloud-MariaDB-LetsEncrypt
-$ docker-compose down- Now To update all of your containers with the latest updates by using the following command.
-$ docker-compose pull- Now you have to spin up everything.
-$ docker-compose up -d