This is a simple repo with information on the a docker-compose.yml
to run ownCloud with an Nginx proxy and LetsEncrypt using Docker, as I was able to find anything that did everything I needed based on the official documentation from ownCloud and kept separate volumes for data.
This is consolidated based on information from the following places and thanks to them:
Pretty straightforward, follow these steps...
Set up the necessary environment variables at the command line (or equivalent method on the relevant operating system):
cat << EOF >| .env
OWNCLOUD_VERSION=10.0
OWNCLOUD_DOMAIN=localhost
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin
HTTP_PORT=8080
EOF
The webserver is nginx-proxy and it will listen on ports 80 and 443 by default, redirecting traffic to HTTPS for your ownCloud instance. The HTTP_PORT environment variable sets which port ownCloud itself will listen.
Change the hostname variables above and in the docker-compose.yml
file as necessary specifically the variables in the owncloud service environment block:
environment:
- VIRTUAL_HOST=local.local.info
- VIRTUAL_PORT=8080
- LETSENCRYPT_HOST=local.local.info
- [email protected]
And then run docker compose up to get going.
docker-compose up -d
You should then be able to access it at the domain name you entered and it will redirect to the https URL with a valid certificate.