Skip to content

Instantly share code, notes, and snippets.

@dnburgess
Last active December 3, 2020 10:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnburgess/241baa2711aeeb542a09511a02b4468e to your computer and use it in GitHub Desktop.
Save dnburgess/241baa2711aeeb542a09511a02b4468e to your computer and use it in GitHub Desktop.
My NextCloud Stack Setup w/ Notes at the end
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: unless-stopped
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=r00tP@55w0rd
- MYSQL_PASSWORD=My5qLP@55w0rd
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud
links:
- db
volumes:
- /path/to/storage/on/your/server:/var/www/html
labels:
- traefik.enable=true
- traefik.http.routers.nextcloud.entrypoints=web
- traefik.http.routers.nextcloud.rule=Host(`cloud.yoursite.com`)
- traefik.http.services.nextcloud.loadbalancer.server.port=80
restart: unless-stopped
Change the first half of the volumes
Change the passwords to your choosing
Change the URL on line 29 to be YOUR URL
Deploy the container
Edit the container
Change the network of the container to "web" after it launches
Re-deploy the container
Go to your NextCloud URL
Select the MySQL option for the database
When you're installing, make sure you change the database setting from 'localhost' to 'db' (no quotes)
You'll enter the database username, and MySQL database password above into the appropriate spots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment