Nextcloud-AIO

In times where google, amazon, microsoft, dropbox and apple crawling you're data the question of data security increases, the desire to have power over your own data increases. Here is Nextcloud coming into play. Nextcloud is a comprehensive client-server software designed for providing and using file hosting services. By integrating office suites such as Collabora Online or OnlyOffice, Nextcloud offers similar functionality to well-known platforms such as Dropbox, Office 365 and Google Drive.
Requirements:
Docker
Xcaddy
Here're is my docker-compose.yml:
version: "3.8"
services:
nextcloud:
image: nextcloud/all-in-one:latest
restart: unless-stopped
container_name: nextcloud-aio-mastercontainer
ports:
- "8080:8080"
environment:
- APACHE_PORT=11000
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
compose it with:
docker-compose up -d
Now edit you're Caddyfile with:
vim /opt/caddy/Caddyfile
and add following lines the tls part is optional. Just use it if you using you're own certificates and of course you need to set the DNS record on you're providers DNS-Server:
A nextcloud.yourdomain.io 222.110.10.2
https://nextcloud.yourdomain.io:8443 {
tls /certs/certificate.cer /certs/private_key.key #optional
reverse_proxy https://localhost:8080 {
transport http {
tls_insecure_skip_verify
}
}
}
https://nextcloud.yourdomain.io:443 {
tls /certs/certificate.cer /certs/private_key.key #optional
reverse_proxy localhost:11000
}
Now restart xcaddy
docker restart xcaddy
Now you can enter the aio interface with: https://nextcloud.yourdomain.io:8443

Save the passphrase and hit Open nextcloud AIO login:

Login into the interface. Sometimes it struglinng a bit just press a view times reload and the interface will show.
Enter you're domain and submit!

If anything goes wrong with domain checking follow this guide https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#6-how-to-debug-things .
Check mark the containers you prefer to install:

click save changes.
Now Checkmark Install Nextcloud 30 (if you want to install it) and click Download and start containers

In the end you should see something like this:

Login with you're initial settings and change you're admin password. Than remove following from you're Caddyfile:
https://nextcloud.yourdomain.io:8443 {
tls /certs/certificate.cer /certs/private_key.key #optional
reverse_proxy https://localhost:8080 {
transport http {
tls_insecure_skip_verify
}
}
}
And restart xcaddy!
docker restart xcaddy
And you're done have fun with you're nextcloud environment. 😸