{"id":18289842,"url":"https://github.com/tiredofit/docker-nextcloud","last_synced_at":"2025-06-14T06:02:39.741Z","repository":{"id":37735065,"uuid":"101776988","full_name":"tiredofit/docker-nextcloud","owner":"tiredofit","description":"Dockerized groupware server with many customizable options","archived":false,"fork":false,"pushed_at":"2025-06-12T14:50:43.000Z","size":411,"stargazers_count":23,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-12T15:48:32.055Z","etag":null,"topics":["docker","logrotate","nextcloud","nginx","php-fpm","zabbix-agent"],"latest_commit_sha":null,"homepage":"","language":null,"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/tiredofit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["tiredofit"]}},"created_at":"2017-08-29T15:30:15.000Z","updated_at":"2024-10-08T19:20:37.000Z","dependencies_parsed_at":"2023-10-05T17:41:38.170Z","dependency_job_id":"59ad9069-bf7b-4546-bb96-aef7aadff517","html_url":"https://github.com/tiredofit/docker-nextcloud","commit_stats":null,"previous_names":[],"tags_count":358,"template":false,"template_full_name":null,"purl":"pkg:github/tiredofit/docker-nextcloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nextcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nextcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nextcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nextcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiredofit","download_url":"https://codeload.github.com/tiredofit/docker-nextcloud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nextcloud/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259768513,"owners_count":22908228,"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":["docker","logrotate","nextcloud","nginx","php-fpm","zabbix-agent"],"created_at":"2024-11-05T14:08:32.626Z","updated_at":"2025-06-14T06:02:39.712Z","avatar_url":"https://github.com/tiredofit.png","language":null,"funding_links":["https://github.com/sponsors/tiredofit","https://www.paypal.me/tiredofit"],"categories":[],"sub_categories":[],"readme":"# github.com/tiredofit/docker-nextcloud\n\n[![GitHub release](https://img.shields.io/github/v/tag/tiredofit/docker-nextcloud?style=flat-square)](https://github.com/tiredofit/docker-nextcloud/releases/latest)\n[![Build Status](https://img.shields.io/github/workflow/status/tiredofit/docker-nextcloud/build?style=flat-square)](https://github.com/tiredofit/docker-nextcloud/actions?query=workflow%3Abuild)\n[![Docker Stars](https://img.shields.io/docker/stars/tiredofit/nextcloud.svg?style=flat-square\u0026logo=docker)](https://hub.docker.com/r/tiredofit/nextcloud/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/tiredofit/nextcloud.svg?style=flat-square\u0026logo=docker)](https://hub.docker.com/r/tiredofit/nextcloud/)\n[![Become a sponsor](https://img.shields.io/badge/sponsor-tiredofit-181717.svg?logo=github\u0026style=flat-square)](https://github.com/sponsors/tiredofit)\n[![Paypal Donate](https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal\u0026style=flat-square)](https://www.paypal.me/tiredofit)\n## About\n\nThis will build a Dockerfile for [Nextcloud](https://nextcloud.com) - a web based groupware solution.\n\n*    Includes fail2ban for bad authentication blocking\n*    Includes Nextcloud Hi Performance Files Backend\n\n## Maintainer\n\n- [Dave Conroy][https://github.com/tiredofit]\n\n## Table of Contents\n\n- [About](#about)\n- [Maintainer](#maintainer)\n- [Table of Contents](#table-of-contents)\n- [Installation](#installation)\n  - [Build from Source](#build-from-source)\n  - [Prebuilt Images](#prebuilt-images)\n    - [Multi Architecture](#multi-architecture)\n- [Configuration](#configuration)\n  - [Quick Start](#quick-start)\n  - [Persistent Storage](#persistent-storage)\n    - [Base Images used](#base-images-used)\n  - [Networking](#networking)\n- [Upgrading from the 2.x Series](#upgrading-from-the-2x-series)\n- [Maintenance](#maintenance)\n  - [Shell Access](#shell-access)\n- [Support](#support)\n  - [Usage](#usage)\n  - [Bugfixes](#bugfixes)\n  - [Feature Requests](#feature-requests)\n  - [Updates](#updates)\n- [License](#license)\n- [References](#references)\n\n# Prerequisites and Assumptions\n*  Assumes you are using some sort of SSL terminating reverse proxy such as:\n   *  [Traefik](https://github.com/tiredofit/docker-traefik)\n   *  [Nginx](https://github.com/jc21/nginx-proxy-manager)\n   *  [Caddy](https://github.com/caddyserver/caddy)\n   *\n## Installation\n\n### Build from Source\nClone this repository and build the image with `docker build \u003carguments\u003e (imagename) .`\n### Prebuilt Images\nBuilds of the image are available on [Docker Hub](https://hub.docker.com/r/tiredofit/nextcloud) and is the recommended method of installation.\n\nThe following image tags are available along with their tagged release based on what's written in the [Changelog](CHANGELOG.md):\n\n| Version | Container OS | Tag          |\n| ------- | ------------ | ------------ |\n| 23      | Alpine       | `:23-latest` |\n| 22      | Alpine       | `:22-latest` |\n| 21      | Alpine       | `:21-latest` |\n\n#### Multi Architecture\nImages are built primarily for `amd64` architecture, and may also include builds for `arm/v6`, `arm/v7`, `arm64` and others. These variants are all unsupported. Consider [sponsoring](https://github.com/sponsors/tiredofit) my work so that I can work with various hardware. To see if this image supports multiple architecures, type `docker manifest (image):(tag)`\n\n## Configuration\n\n### Quick Start\n\n* The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/). See the examples folder for a working [docker-compose.yml](examples/docker-compose.yml) that can be modified for development or production use.\n\n* Set various [environment variables](#environment-variables) to understand the capabilities of this image.\n* Map [persistent storage](#data-volumes) for access to configuration and data files for backup.\n- Make [networking ports](#networking) available for public access if necessary\n\n**The first boot can take from 2 minutes - 5 minutes depending on your CPU to setup the proper schemas.**\n\n### Persistent Storage\n\nThe following directories are used for configuration and can be mapped for persistent storage.\n\n*Upgrading from an earlier version of this image running Nextcloud 20 or earlier? See [Upgrading from the 2.x Series](#upgrading-from-the-2x-series)*\n\n| Directory               | Description                              |\n| ----------------------- | ---------------------------------------- |\n| `/data/userdata`        | Nextcloud Data                           |\n| `/www/nextcloud/config` | Nextcloud Configuration Directory        |\n| `/data/apps`            | Custom Apps downloaded from Plugin Store |\n| `/data/themes`          | Custom Themes Directory                  |\n| `/data/cache`           | Cache Directory                          |\n| `/data/tmp`             | Temporary Directory                      |\n| `/data/templates/`      | Templates Directory                      |\n| `/www/logs`             | Nginx / php-fpm / Nextcloud logfiles     |\n\n#### Base Images used\n\nThis image relies on an [Alpine Linux](https://hub.docker.com/r/tiredofit/alpine) base image that relies on an [init system](https://github.com/just-containers/s6-overlay) for added capabilities. Outgoing SMTP capabilities are handlded via `msmtp`. Individual container performance monitoring is performed by [zabbix-agent](https://zabbix.org). Additional tools include: `bash`,`curl`,`less`,`logrotate`,`nano`,`vim`.\n\nBe sure to view the following repositories to understand all the customizable options:\n\n| Image                                                         | Description                            |\n| ------------------------------------------------------------- | -------------------------------------- |\n| [OS Base](https://github.com/tiredofit/docker-alpine/)        | Customized Image based on Alpine Linux |\n| [Nginx](https://github.com/tiredofit/docker-nginx/)           | Nginx webserver                        |\n| [PHP-FPM](https://github.com/tiredofit/docker-nginx-php-fpm/) | PHP Interpreter                        |\n\nIf you there are features that you wish to override based on the defaults and for some reason the environment variables are not working, create a file called `custom.config.php` in your `data/config` directory\n\n| Parameter                      | Description                                                                                                         | Default   |\n| ------------------------------ | ------------------------------------------------------------------------------------------------------------------- | --------- |\n| `ADMIN_USER`                   | Admin user e.g. `admin`                                                                                             |           |\n| `ADMIN_PASS`                   | Admin pass e.g. `password`                                                                                          |           |\n| `DOMAIN`                       | The Domain that this is configured for e.g. 'example.org'                                                           |           |\n| `DB_TYPE`                      | Set the DB_TYPE - e.g. `mysql`, `postgres`, `sqlite3`                                                               | `sqlite3` |\n| `DB_HOST`                      | Hostname of DB Server e.g. `nextcloud-db`                                                                           |           |\n| `DB_NAME`                      | Database name e.g. `nextcloud`                                                                                      |           |\n| `DB_PORT`                      | Database port e.g. `3306`                                                                                           |           |\n| `DB_USER`                      | Username for Database e.g. `nextcloud`                                                                              |           |\n| `DB_PASS`                      | Password for Database e.g. `password`                                                                               |           |\n| `IFRAME_DOMAINS`               | Comma seperated value of domains/hostnames you want to allow loading the site via an IFrame e.g. `site.example.com` |           |\n| `MONITORING_APPLICATION_TOKEN` | Monitoring Application Token if 'serverinfo' application installed                                                  |           |\n\nThis image automatically configures nextcloud with the following options as defined in [config.sample.php](https://github.com/nextcloud/server/blob/master/config/config.sample.php).\n\n| Variable                           | Description                                               | Nextcloud Attribute                         | Default                          |\n| ---------------------------------- | --------------------------------------------------------- | ------------------------------------------- | -------------------------------- |\n| `ANIMATED_GIFS_MAX_FILESIZE`       | Max file size for Animated Gifs                           | `max_filesize_animated_gifs_public_sharing` | `10`                             |\n| `CACHE_DIRECTORY`                  | Cache Directory (leave blank for default)                 |                                             | ``                               |\n| `CIPHER`                           | Encryption Cipher                                         | `cipher`                                    | `AES-256-CFB`                    |\n| `DATA_DIRECTORY`                   | Data Directory                                            |                                             | `${NGINX_WEBROOT}/data`          |\n| `DEFAULT_APPLICATION`              | Default Application users see                             | `defaultapp`                                | `files`                          |\n| `DEFAULT_LANGUAGE`                 | Default Language to Install                               | `default_language`                          | `en`                             |\n| `DEFAULT_LOCALE`                   | Default Locale                                            | `default_locale`                            | `en_US`                          |\n| `ENABLE_APP_CODE_CHECKER`          | Check for signatures on all code                          | `appcodechecker`                            | `TRUE`                           |\n| `ENABLE_APP_STORE`                 | Enable App Store                                          | `appstoreenabled`                           | `TRUE`                           |\n| `ENABLE_BRUTEFORCE_PROTECTION`     | Enable Brute Force Protection                             | `auth.bruteforce.protection.enabled`        | `TRUE`                           |\n| `ENABLE_CHECK_WELLKNOWN`           | Enable .wellknown check in admin                          |                                             | `TRUE`                           |\n| `ENABLE_DISPLAY_NAME_CHANGE`       | Allow user to change name                                 | `allow_user_to_change_display_name`         | `TRUE`                           |\n| `ENABLE_FILESYSTEM_CHECK_CHANGES`  | Check changes on Filesystem in Background                 | `filesystem_check_changes`                  | `FALSE`                          |\n| `ENABLE_FILE_LOCKING`              | Enable File Locking                                       | `filelocking.enabled`                       | `TRUE`                           |\n| `ENABLE_KNOWLEDGE_BASE`            | Enable Help Menu                                          | `knowledgebaseenabled`                      | `TRUE`                           |\n| `ENABLE_LOGIN_FORM_AUTOCOMPLETE`   | Allow Autocomplete on Login Pages                         | `login_form_autocomplete`                   | `TRUE`                           |\n| `ENABLE_LOG_QUERY`                 | Enable Logging DB Queries                                 | `log_query`                                 | `FALSE`                          |\n| `ENABLE_MYSQL_UTF8MB4`             | Enable 4 byte strings for MariaDB                         | `mysql.utf8mb4`                             | `TRUE`                           |\n| `ENABLE_PARTFILE_UPLOADS_STORAGE`  | Enable uploading .part files in same location             |                                             | `TRUE`                           |\n| `ENABLE_PREVIEWS`                  | Enable Document Previews                                  | `enable_previews`                           | `TRUE`                           |\n| `ENABLE_SESSION_KEEPALIVE`         | Enable Keepalive sessions                                 | `session_keepalive`                         | `TRUE`                           |\n| `ENABLE_SIGN_UP`                   | Allow Signups to Instance                                 | `simpleSignUpLink.shown`                    | `TRUE`                           |\n| `ENABLE_SMTP_AUTHENTICATION`       | Enable SMTP Authentication                                | `mail_smtpauth`                             | `FALSE`                          |\n| `ENABLE_TOKEN_AUTH_ENFORCED`       | Enforce logging in with Tokens for Clients                | `token_auth_enforced`                       | `FALSE`                          |\n| `FILE_LOCKING_DEBUG`               | Debug File Locking                                        | `filelocking.debug`                         | `FALSE`                          |\n| `FORCE_LANGUAGE`                   | Force Language                                            | `force_language`                            | `en`                             |\n| `FORCE_LOCALE`                     | Force Locale                                              | `force_locale`                              | `en_US`                          |\n| `HASHING_COST`                     | Performance Cost for Hashing                              | `hashingCost`                               | `10`                             |\n| `LDAP_CLEANUP_INTERVAL`            | How many minutes to cleanup LDAP users                    | `ldapUserCleanupInterval`                   | `51`                             |\n| `LOG_DATE_FORMAT`                  | Format for Date and Time in logs                          | `logdateformat`                             | `Y-m-d H:i:s`                    |\n| `LOG_DIR`                          | Log Directory                                             | `logfile`                                   | `/www/logs/nextcloud`            |\n| `LOG_FILE_AUDIT`                   | Audit Log file                                            | `audit.log`                                 |                                  |\n| `LOG_FILE_FLOW`                    | Workflow Log File                                         | `flow.log`                                  |                                  |\n| `LOG_LEVEL`                        | Log Level                                                 | `loglevel`                                  | `2`                              |\n| `LOG_TIMEZONE`                     | Timezone for Logfile                                      | `logtimezone`                               | Container Timezone               |\n| `OVERWRITE_HOST`                   | Override the hostname for URLs                            | `overwritehost`                             | ``                               |\n| `OVERWRITE_PROTOCOL`               | Override the Protocol if behind proxy                     | `overwriteprotocol`                         | ``                               |\n| `PREVIEW_MAX_X`                    | Maximum Pixels for Previews (X)                           | `preview_max_x`                             | `200`                            |\n| `PREVIEW_MAX_Y`                    | Maximum Pixels for Previews (Y)                           | `preview_max_y`                             | `200`                            |\n| `SHARE_FOLDER`                     | Change root path of all shares to users                   |                                             | `/`                              |\n| `SHARING_ENABLE_ACCEPT`            | Enable Sharing Acceptance features                        |                                             | `FALSE`                          |\n| `SHARING_ENABLE_MAIL`              | Enable Sharing Mail Notification                          |                                             | `TRUE`                           |\n| `SHARING_FORCE_ACCEPT`             | Force Sharing Acceptance features                         |                                             | `FALSE`                          |\n| `SHARING_MAX_AUTOCOMPLETE_RESULTS` | Maximum results returned when searching                   | `sharing.maxAutocompleteResults`            | `0`                              |\n| `SHARING_MIN_SEARCHSTRING_LENGTH`  | How many characters to type before searching              | `sharing.minSearchStringLength`             | `2`                              |\n| `SKELETON_DIRECTORY` | What folder is copied to new users folders on first login | `skeletondirectory`                         | `${NGINX_WEBROOT}/core/skeleton` |\n| `SMTP_AUTHENTICATION_TYPE`         | Type of SMTP Authentication                               | `mail_smtpauthtype`                         | `NONE`                           |\n| `SMTP_DEBUG`                       | Debug SMTP activities                                     | `mail_smtpdebug`                            | `FALSE`                          |\n| `SMTP_DOMAIN`                      | Email Domain for Outbound mail                            | `mail_domain`                               | `example.org`                    |\n| `SMTP_FROM`                        | Account name for Outbound Email, SMTP_DOMAIN will be added | `mail_from_address`                         | `noreply`                        |\n| `SMTP_HOST`                        | Remote SMTP Host                                          | `mail_smtphost`                             | `postfix_relay`                  |\n| `SMTP_PASS`                        | SMTP Password                                             | `mail_smtppassword`                         | ``                               |\n| `SMTP_PORT`                        | SMTP Port                                                 | `mail_smtpport`                             | `25`                             |\n| `SMTP_SECURE`                      | `tls`,`ssl` if SMTP is TLS/SSL encrypted                          | `mail_smtpsecure`                           | `FALSE`                          |\n| `SMTP_SEND_PLAINTEXT_ONLY`         | Send Plaintext Email Only                                 | `mail_send_plaintext_only`                  | `FALSE`                          |\n| `SMTP_TIMEOUT`                     | Timeout for SMTP connections                              | `mail_smtptimeout`                          | `10`                             |\n| `SMTP_USER`                        | SMTP Username  (user part)                                           | `mail_smtpname`                             | ``                               |\n| `SORT_GROUPS_BY_NAME`              | Sort groups by name as opposed to most users              | `sort_groups_by_name`                       | `FALSE`                          |\n| `TRASHBIN_RETENTION`               | How to deal with users trashbins                          | `trashbin_retention_obligation`             | `auto`                           |\n| `VERSIONS_RETENTION`               | How to deal with File Versions                            | `versions_retention_obligation`             | `auto`                           |\n\n### Networking\n\nThe following ports are exposed.\n\n| Port | Description |\n| ---- | ----------- |\n| `80` | HTTP        |\n\n## Upgrading from the 2.x Series\n- If you are upgrading from the 2.x series of images (Nextcloud 20 and below) please note that the following environment variables have been introduced\n\n- `TEMP_DIRECTORY` - For holding temporary files\n- `CACHE_DIRECTORY` - Moving the \"Cache\" per user out of their user data folder for those using S3 Backend for performance reasons\n- `APP_DIRECTORY` - Applications downloaded from the App Store\n- `DATA_DIRECTORY` - Users Data Directory\n\n- You will also need to export new volumes if you are using the new defaults to these paths above:\n\n| Environment Variable | 2.x Images volume mapping        | New Image mapping          |\n| -------------------- | -------------------------------- | -------------------------- |\n| `APP_DIRECTORY`      | `/www/nextcloud/custom-apps`     | `/data/apps`               |\n| `CACHE_DIRECTORY`    | unset                            | `/data/cache`              |\n| `DATA_DIRECTORY`     | `/www/nextcloud/data`            | `/data/userdata`           |\n| `SKELETON_DIRECTORY` | `${NGINX_WEBROOT}/core/skeleton` | `/data/templates/skeleton` |\n| `TEMP_DIRECTORY`     | unset                            | `/data/tmp`                |\n\n- Additionally you will need to make a change to the database to support the change of the data location as listed [here](https://docs.nextcloud.com/server/21/admin_manual/issues/general_troubleshooting.html#troubleshooting-data-directory).\n\n* * *\n## Maintenance\n\n### Shell Access\n\nFor debugging and maintenance purposes you may want access the containers shell.\n\n``bash\ndocker exec -it (whatever your container name is) bash\n``\n## Support\n\nThese images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.\n### Usage\n- The [Discussions board](../../discussions) is a great place for working with the community on tips and tricks of using this image.\n- Consider [sponsoring me](https://github.com/sponsors/tiredofit) personalized support.\n### Bugfixes\n- Please, submit a [Bug Report](issues/new) if something isn't working as expected. I'll do my best to issue a fix in short order.\n\n### Feature Requests\n- Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.\n- Consider [sponsoring me](https://github.com/sponsors/tiredofit) regarding development of features.\n\n### Updates\n- Best effort to track upstream changes, More priority if I am actively using the image in a production environment.\n- Consider [sponsoring me](https://github.com/sponsors/tiredofit) for up to date releases.\n\n## License\nMIT. See [LICENSE](LICENSE) for more details.\n\n\n## References\n\n* https://nextcloud.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiredofit%2Fdocker-nextcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiredofit%2Fdocker-nextcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiredofit%2Fdocker-nextcloud/lists"}