I'm trying out self-hosted collaboration platforms. This time, I'm installing Nextcloud AIO on Docker. I'm using Caddy as a reverse proxy, because there will be multiple sites on the same server.
This is the first time I'm installing docker, so I roughly followed the steps outlined here on DigitalOcean.
# curl https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/trusted.gpg.d/docker.asc
# echo "deb https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list
# apt update
# apt install docker-ce
# usermod -a -G docker wpyoga
Then I roughly followed the steps outlined here on Github.
$ docker run -d \
--restart always \
--publish 127.0.0.1:8080:8080 \
-e APACHE_IP_BINDING=127.0.0.1 \
-e APACHE_PORT=11000 \
--name nextcloud-aio-mastercontainer \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
If you didn't do it right, remove the container and re-create it again. This is one of the quirks of Docker... container configuration is "immutable".
After the initial docker container is up and running, I set up a tunnel in order to access the configuration interface on
$ ssh my-server -L 8080:127.0.0.1:8080
The configuration interface is easy to follow, and I enabled all the available services.
This is the configuration for the reverse proxy in
Caddy can be configured to use multiple upstream servers if needed.
To disable http, I also added this global configuration block right at the beginning of the file: