{"id":23458289,"url":"https://github.com/bwibo/nextcloud-compose","last_synced_at":"2025-04-14T02:51:22.528Z","repository":{"id":50342171,"uuid":"433599847","full_name":"BWibo/nextcloud-compose","owner":"BWibo","description":"Docker Compose Nextcloud using fpm and Caddy as reverse proxy with automatic SSL","archived":false,"fork":false,"pushed_at":"2025-03-22T18:24:28.000Z","size":101,"stargazers_count":14,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T19:25:28.515Z","etag":null,"topics":["azure","backup","blob","caddy","compose","docker","docker-compose","fpm","letsencrypt","nextcloud","nextcloud-fpm","nextcloud-server","restic","reverse-proxy","ssl"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BWibo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-30T22:02:26.000Z","updated_at":"2025-03-22T18:24:32.000Z","dependencies_parsed_at":"2023-10-12T03:38:34.805Z","dependency_job_id":"492c0d1e-62f4-48fd-9bde-ca0e2be81398","html_url":"https://github.com/BWibo/nextcloud-compose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BWibo%2Fnextcloud-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BWibo%2Fnextcloud-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BWibo%2Fnextcloud-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BWibo%2Fnextcloud-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BWibo","download_url":"https://codeload.github.com/BWibo/nextcloud-compose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813824,"owners_count":21165631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","backup","blob","caddy","compose","docker","docker-compose","fpm","letsencrypt","nextcloud","nextcloud-fpm","nextcloud-server","restic","reverse-proxy","ssl"],"created_at":"2024-12-24T05:19:27.480Z","updated_at":"2025-04-14T02:51:22.502Z","avatar_url":"https://github.com/BWibo.png","language":"Shell","readme":"\u003ch1 align=\"center\"\u003eNextcloud using Docker compose, Postgres and Caddy reverse proxy\u003c/h1\u003e\n\n## :zzz: TL;DR\n\n1. Set domain and eMail address in `.env`\n\n    ```bash\n    # General settings\n    # Domain used for trusted domains (config.php)\n    DOMAIN=localhost\n\n    # Domains for TLS certificates. Items separated by comma + space: \", \"\n    TLS_DOMAINS=\"localhost, nextcloud.local\"\n    ADMIN_EMAIL=a@b.de\n   ```\n\n2. Create volumes\n\n    ```bash\n    docker volume create nextcloud_caddy_data\n    docker volume create nextcloud_data\n    docker volume create nextcloud_db_data\n    ```\n\n3. Deploy Nextcloud\n\n    ```bash\n    docker compose up -d --build\n    ```\n\n## :rocket: Basic usage\n\n### Create volumes\n\n```bash\ndocker volume create nextcloud_caddy_data\ndocker volume create nextcloud_data\ndocker volume create nextcloud_db_data\n```\n\n\u003e **Note:** To use a local folder on your server (bind mount) for Nextcloud data,\n\u003e adapt the volume settings in `docker-compose.yml`.\n\u003e\n\u003e ```yaml\n\u003e # ...\n\u003e volumes:\n\u003e   nextcloud_caddy_data:\n\u003e     external: true\n\u003e\n\u003e   # Comment out and use code below to use a bind mount for data folder\n\u003e   nextcloud_data:\n\u003e     external: true\n\u003e\n\u003e   # Use this, if using bind mount\n\u003e   # nextcloud_data:\n\u003e   #   driver: local\n\u003e   #   driver_opts:\n\u003e   #     type: none\n\u003e   #     o: bind\n\u003e   #     device: \"${PWD}/data\"\n\u003e\n\u003e   nextcloud_db_data:\n\u003e     external: true\n\u003e   # ...\n\u003e ```\n\n### Configuration\n\nAdapt `.env` for your requirements.\n\n```bash\n# General settings\n# Domain used for trusted domains (config.php)\nDOMAIN=localhost\n\n# Domains for TLS certificates. Items separated by comma + space: \", \"\nTLS_DOMAINS=\"localhost, nextcloud.local\"\nADMIN_EMAIL=a@b.de\n\n# Caddy TLS directive settings\n# https://caddyserver.com/docs/caddyfile/directives/tls\n# Use this for self-signed certificates, e.g. in your LAN\n# CADDY_TLS=\"tls internal\"\n\n# Usage of own certificates\n# CADDY_TLS=\"tls /certs/fullchain.pem /certs/key.key\"\n\n# Nextcloud\nNEXTCLOUD_VERSION=27.1.3-fpm\nNEXTCLOUD_ADMIN_USER=admin      # Change username and password!!\nNEXTCLOUD_ADMIN_PASSWORD=changeMe\n\n# Nextcloud PHP settings\nPHP_MEMORY_LIMIT=1024M\nPHP_UPLOAD_LIMIT=16G\n\n# DB\nPOSTGRES_VERSION=16-alpine\nPOSTGRES_DB=nextcloud           # Change username and password!!\nPOSTGRES_USER=nextcloud\nPOSTGRES_PASSWORD=changeMe\n\n# Docker settings\nDOCKER_LOGGING_MAX_SIZE=5m\nDOCKER_LOGGING_MAX_FILE=3\n```\n\n### Run Nextcloud\n\n```bash\ndocker compose up -d --build\n```\n\nYour instance will be available after a couple of seconds unter https://localhost or https://DOMAIN, as specified in `.env`.\n\n## :chart_with_upwards_trend: Imaginary support\n\nFollow the steps to use a imaginary stack as your image preview provider.\n\n1. Deploy imaginary stack: `docker compose -f imaginary.yml up -d` or `docker stack deploy -c imaginary.yml imaginary`\n2. Uncomment imaginary network in `docker-compose.yml`\n3. Uncomment imaginary settings in `nextcloud.env`\n4. Add Imaginary to preview provider in `config.php`\n5. Re-deploy the stack `docker compose up -d --build`\n\n## :file_folder: Store data in host folder\n\nTo store the nextcloud data in a host folder, e.g. to make backups easier, uncomment\nthis section in `docker-compose.yml`:\n\n```yaml\nvolumes:\n\n# ...\n\n  # Comment out and use code below to use a bind mount for data folder\n  # nextcloud_data:\n  #   external: true\n\n# Use this, if using bind mount\n  nextcloud_data:\n    driver: local\n    driver_opts:\n      type: none\n      o: bind\n      device: \"${PWD}/data\"\n```\n\nCreate the folder on the host, in this example: ``mkdir data``.\nThen you're ready to deploy the stack `docker compose up -d --build`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwibo%2Fnextcloud-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwibo%2Fnextcloud-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwibo%2Fnextcloud-compose/lists"}