curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
Remember to log out and back in for this to take effect!
Installation instructions: https://docs.docker.com/engine/install/ubuntu/
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Installation instructions: https://docs.docker.com/compose/install/
sudo apt install s3cmd
Set values in
based on *.env_template files.
Note that even when configuration options are not needed in a particular deployment all of the .env files listed above have to exist.
Use redeploy.sh
script to build docker images and deploy the complete solution
./redeploy.sh
For the admin login to Global Site Selector use https://gss.dev.nextcloud.safedc.services/
For the admin login to the Nextcloud Server use index.php/login?direct=1
suffix, for example: https://nx0.dev.nextcloud.safedc.services/index.php/login?direct=1
Use redeploy.sh
script to redeploy the solution (except the Let's Encrypt container)
./redeploy.sh
-e
- erase the primary S3 bucket
-p
- prune docker volumes (except the one with SSL certificates)
docker-compose down
docker volume prune
Warning: do not prune the Let's Encrypt volumes too often, otherwise you might hit a limit on Certificates per Registered Domain (50 per week).
docker logs nextcloud_app_1
docker exec -it nextcloud_app_1 tail data/nextcloud.log
sudo tail /var/lib/docker/volumes/nextcloud_nextcloud/_data/data/nextcloud.log
https://docs.nextcloud.com/server/13.0.0/admin_manual/configuration_server/occ_command.html
docker exec -u www-data -it nextcloud_app_1 bash
php occ ...
Create .s3cfg
[default]
host_base = ...
host_bucket = ...
access_key = ...
secret_key = ...
use_https = True
Create a bucket
s3cmd mb s3://[BUCKET_NAME]
Empty the bucket
s3cmd rm s3://[BUCKET_NAME] --recursive --force
Remove the bucket
s3cmd rb s3://[BUCKET_NAME]