{"id":21887336,"url":"https://github.com/sskender/nextcloud-docker","last_synced_at":"2025-04-15T09:50:40.403Z","repository":{"id":52331863,"uuid":"201931227","full_name":"sskender/nextcloud-docker","owner":"sskender","description":"Full Nextcloud docker-compose with nginx proxy, letsencrypt, redis, mail server and turn server","archived":false,"fork":false,"pushed_at":"2021-04-30T17:59:47.000Z","size":121,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T18:55:16.379Z","etag":null,"topics":["cloud","docker","docker-compose","fpm","letsencrypt","mariadb","nextcloud","nextcloud-docker","nginx","nginx-proxy","personal-cloud","postfix","proxy","redis","reverse-proxy","self-signed-certificate","ssl","trusted-domains","turn"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/sskender.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}},"created_at":"2019-08-12T13:00:56.000Z","updated_at":"2025-03-25T18:33:55.000Z","dependencies_parsed_at":"2022-09-03T07:20:50.857Z","dependency_job_id":null,"html_url":"https://github.com/sskender/nextcloud-docker","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/sskender%2Fnextcloud-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sskender%2Fnextcloud-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sskender%2Fnextcloud-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sskender%2Fnextcloud-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sskender","download_url":"https://codeload.github.com/sskender/nextcloud-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249048713,"owners_count":21204305,"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":["cloud","docker","docker-compose","fpm","letsencrypt","mariadb","nextcloud","nextcloud-docker","nginx","nginx-proxy","personal-cloud","postfix","proxy","redis","reverse-proxy","self-signed-certificate","ssl","trusted-domains","turn"],"created_at":"2024-11-28T11:09:21.987Z","updated_at":"2025-04-15T09:50:40.384Z","avatar_url":"https://github.com/sskender.png","language":"Dockerfile","readme":"# Nextcloud with Docker\ndocker-compose for nextcloud fpm with mariadb and nginx proxy as well as self signed ssl\n\n### Getting started\nFolders for mounting data must be created, read below how to do that. Next, copy all .env.example files to only .env extension and then edit each one with your settings.\n\n#### WARNING\nMariaDB and PHP-FPM are configured to run on server with 1 CPU (4 threads) and 16 GB of RAM. If your configuration differs, edit database configuration [my.cnf](db/my.cnf) and php configuration [Dockerfile](app/Dockerfile) files. There is no general rule for performance tweaking so look for explanations elsewhere. In /var/pool is a huge BTRFS raid disk pool mounted on my server.\n\n### Before running\nValues that are ought to be changed before running:\n1) Update database passwords in [db.env](env/db.env.example) (*default: password123*)\n2) Update domains in [nginx.env](env/nginx.env.example) (*default: 127.0.0.1*)\n3) Update ssl certificates to match your domain name in [sslcert.env](env/sslcert.env.example) (*default: 127.0.0.1*)\n4) Update volume paths for each service in [docker-compose.yml](docker-compose.yml) (*default: /var/pool/nextcloud*)\n5) Update max upload size in [proxy/uploadsize.conf](proxy/uploadsize.conf) and [web/nginx.conf](web/nginx.conf) (*default: 25 GB*)\n\n### Running\nMake sure docker volume paths exist in the host sytem. If the default configuration is used, a directory tree can be created with the following commands:\n```bash\nmkdir -p /var/pool/nextcloud/{db,data,certs,vhost,html,mail}\nmkdir -p /var/ramdisk/{dbcache,rediscache}\n```\n\nMount free ram as ramdisk for caching:\n```bash\nsudo mount -t tmpfs -o size=2048M tmpfs /var/ramdisk/dbcache\nsudo mount -t tmpfs -o size=2048M tmpfs /var/ramdisk/rediscache\n```\n\nSave ramdisks to fstab file:\n```bash\nnone /var/ramdisk/dbcache tmpfs nodev,nosuid,noexec,nodiratime,size=2048M 0 0\nnone /var/ramdisk/rediscache tmpfs nodev,nosuid,noexec,nodiratime,size=2048M 0 0\n```\n\nRunning containers:\n```bash\ndocker-compose build --pull\ndocker-compose up -d\n```\n\n#### Runing custom script\n[Custom script](app/docker-entrypoint-custom.sh) is automatically copied to app container image. It can be run by executing:\n```bash\ndocker-compose exec --user www-data app docker-entrypoint-custom\n```\n\n### Updating\n```bash\ndocker-compose down\n```\nAnd repeat steps for running.\n\n### Troubleshooting\n\nProblems I ran into:\n\n##### Redis\nVerify redis is being used:\n```bash\ndocker-compose exec --user root redis redis-cli MONITOR\n```\n\n##### Trusted domains\nSometimes trusted domains are not picked up in app image. Peek in this file to verify:\n```bash\ndocker-compose exec --user www-data app cat config/config.php\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsskender%2Fnextcloud-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsskender%2Fnextcloud-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsskender%2Fnextcloud-docker/lists"}