{"user":"library","name":"nextcloud","namespace":"library","repository_type":"image","status":1,"status_description":"active","description":"Nextcloud manual docker image","is_private":false,"is_automated":false,"star_count":4506,"pull_count":1031091380,"last_updated":"2026-09-25T22:49:58.903896Z","last_modified":"2026-09-24T21:09:38.198875Z","date_registered":"2016-12-30T18:54:29.826116Z","collaborator_count":0,"affiliation":null,"hub_user":"library","has_starred":false,"full_description":"**Note:** the description for this image is longer than the Hub length limit of 25000, so has been trimmed.  The full description can be found at [https://github.com/docker-library/docs/tree/master/nextcloud/README.md](https://github.com/docker-library/docs/tree/master/nextcloud/README.md).  See also [docker/hub-feedback#238](https://github.com/docker/hub-feedback/issues/238) and [docker/roadmap#475](https://github.com/docker/roadmap/issues/475).\n\n# IMPORTANT NOTE\n\n⚠️⚠️⚠️ This image is maintained by community volunteers and designed for expert use. For quick and easy deployment that supports the full set of Nextcloud Hub features, use the [Nextcloud All-in-One docker container](https://github.com/nextcloud/all-in-one#nextcloud-all-in-one) maintained by Nextcloud GmbH.\n\n# Quick reference\n\n-\t**Maintained by**:  \n\t[the Nextcloud community](https://github.com/nextcloud/docker)\n\n-\t**Where to get help**:  \n\t[the Docker Community Slack](https://dockr.ly/comm-slack), [Server Fault](https://serverfault.com/help/on-topic), [Unix \u0026 Linux](https://unix.stackexchange.com/help/on-topic), or [Stack Overflow](https://stackoverflow.com/help/on-topic)\n\n# Supported tags and respective `Dockerfile` links\n\n-\t[`32.0.15-apache`, `32.0-apache`, `32-apache`, `32.0.15`, `32.0`, `32`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/32/apache/Dockerfile)\n\n-\t[`32.0.15-fpm`, `32.0-fpm`, `32-fpm`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/32/fpm/Dockerfile)\n\n-\t[`32.0.15-fpm-alpine`, `32.0-fpm-alpine`, `32-fpm-alpine`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/32/fpm-alpine/Dockerfile)\n\n-\t[`33.0.9-apache`, `33.0-apache`, `33-apache`, `33.0.9`, `33.0`, `33`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/33/apache/Dockerfile)\n\n-\t[`33.0.9-fpm`, `33.0-fpm`, `33-fpm`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/33/fpm/Dockerfile)\n\n-\t[`33.0.9-fpm-alpine`, `33.0-fpm-alpine`, `33-fpm-alpine`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/33/fpm-alpine/Dockerfile)\n\n-\t[`34.0.4-apache`, `34.0-apache`, `34-apache`, `stable-apache`, `production-apache`, `34.0.4`, `34.0`, `34`, `stable`, `production`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/34/apache/Dockerfile)\n\n-\t[`34.0.4-fpm`, `34.0-fpm`, `34-fpm`, `stable-fpm`, `production-fpm`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/34/fpm/Dockerfile)\n\n-\t[`34.0.4-fpm-alpine`, `34.0-fpm-alpine`, `34-fpm-alpine`, `stable-fpm-alpine`, `production-fpm-alpine`](https://github.com/nextcloud/docker/blob/a1206d2467689ecb8597b7e5b753b49dda29b773/34/fpm-alpine/Dockerfile)\n\n-\t[`35.0.1-apache`, `35.0-apache`, `35-apache`, `apache`, `35.0.1`, `35.0`, `35`, `latest`](https://github.com/nextcloud/docker/blob/6edd06e23466ed44d48e3d467b09e0c5fc0ffc17/35/apache/Dockerfile)\n\n-\t[`35.0.1-fpm`, `35.0-fpm`, `35-fpm`, `fpm`](https://github.com/nextcloud/docker/blob/6edd06e23466ed44d48e3d467b09e0c5fc0ffc17/35/fpm/Dockerfile)\n\n-\t[`35.0.1-fpm-alpine`, `35.0-fpm-alpine`, `35-fpm-alpine`, `fpm-alpine`](https://github.com/nextcloud/docker/blob/6edd06e23466ed44d48e3d467b09e0c5fc0ffc17/35/fpm-alpine/Dockerfile)\n\n# Quick reference (cont.)\n\n-\t**Where to file issues**:  \n\t[https://github.com/nextcloud/docker/issues](https://github.com/nextcloud/docker/issues?q=is:issue+is:pr)\n\n-\t**Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64))  \n\t[`amd64`](https://hub.docker.com/r/amd64/nextcloud/), [`arm32v5`](https://hub.docker.com/r/arm32v5/nextcloud/), [`arm32v6`](https://hub.docker.com/r/arm32v6/nextcloud/), [`arm32v7`](https://hub.docker.com/r/arm32v7/nextcloud/), [`arm64v8`](https://hub.docker.com/r/arm64v8/nextcloud/), [`i386`](https://hub.docker.com/r/i386/nextcloud/), [`ppc64le`](https://hub.docker.com/r/ppc64le/nextcloud/), [`riscv64`](https://hub.docker.com/r/riscv64/nextcloud/), [`s390x`](https://hub.docker.com/r/s390x/nextcloud/)\n\n-\t**Published image artifact details**:  \n\t[repo-info repo's `repos/nextcloud/` directory](https://github.com/docker-library/repo-info/blob/master/repos/nextcloud) ([history](https://github.com/docker-library/repo-info/commits/master/repos/nextcloud))  \n\t(image metadata, transfer size, etc)\n\n-\t**Image updates**:  \n\t[official-images repo's `library/nextcloud` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fnextcloud)  \n\t[official-images repo's `library/nextcloud` file](https://github.com/docker-library/official-images/blob/master/library/nextcloud) ([history](https://github.com/docker-library/official-images/commits/master/library/nextcloud))\n\n-\t**Source of this description**:  \n\t[docs repo's `nextcloud/` directory](https://github.com/docker-library/docs/tree/master/nextcloud) ([history](https://github.com/docker-library/docs/commits/master/nextcloud))\n\n# What is Nextcloud?\n\nA safe home for all your data. Access \u0026 share your files, calendars, contacts, mail \u0026 more from any device, on your terms.\n\n\u003e [Nextcloud.com](https://nextcloud.com/)\n\nThis Docker micro-service image is developed and maintained by the Nextcloud community. Nextcloud GmbH does not offer support for this Docker image. When you are looking to get professional support, you can become an [enterprise](https://nextcloud.com/enterprise/) customer or use [AIO](https://github.com/nextcloud/all-in-one#nextcloud-all-in-one).\n\n# How to use this image\n\nThis image is designed to be used in a micro-service environment. There are two versions of the image you can choose from.\n\nThe `apache` tag contains a full Nextcloud installation including an apache web server. It is designed to be easy to use and gets you running pretty fast. This is also the default for the `latest` tag and version tags that are not further specified.\n\nThe second option is a `fpm` container. It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Nextcloud page. To use this image it must be combined with any webserver that can proxy the http requests to the FastCGI-port of the container.\n\n## Using the apache image\n\nThe apache image contains a webserver and exposes port 80. To start the container type:\n\n```console\n$ docker run -d -p 8080:80 nextcloud\n```\n\nNow you can access Nextcloud at http://localhost:8080/ from your host system.\n\n## Using the fpm image\n\nTo use the fpm image, you need an additional web server, such as [nginx](https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html), that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000. In most cases, you might want to use another container or your host as proxy. If you use your host you can address your Nextcloud container directly on port 9000. If you use another container, make sure that you add them to the same docker network (via `docker run --network \u003cNAME\u003e ...` or a `compose.yaml` file). In both cases you don't want to map the fpm port to your host.\n\n```console\n$ docker run -d nextcloud:fpm\n```\n\nAs the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the Docker Compose section.\n\n## Using an external database\n\nBy default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the Docker Compose section.\n\n## Persistent data\n\nThe Nextcloud installation and all data beyond what lives in the database (file uploads, etc.) are stored in the [unnamed docker volume](https://docs.docker.com/storage/volumes/) volume `/var/www/html`. The docker daemon will store that data within the docker directory `/var/lib/docker/volumes/...`. That means your data is saved even if the container crashes, is stopped or deleted.\n\nA named Docker volume or a mounted host directory should be used for upgrades and backups. To achieve this, you need one volume for your database container and one for Nextcloud.\n\nNextcloud:\n\n-\t`/var/www/html/` folder where all Nextcloud data lives\n\n```console\n$ docker run -d \\\n-v nextcloud:/var/www/html \\\nnextcloud\n```\n\nDatabase:\n\n-\t`/var/lib/mysql` MySQL / MariaDB Data\n-\t`/var/lib/postgresql/data` PostgreSQL Data\n\n```console\n$ docker run -d \\\n-v db:/var/lib/mysql \\\nmariadb:10.6\n```\n\n### Additional volumes\n\nIf you want to get fine grained access to your individual files, you can mount additional volumes for data, config, your theme and custom apps. The `data`, `config` files are stored in respective subfolders inside `/var/www/html/`. The apps are split into core `apps` (which are shipped with Nextcloud and you don't need to take care of) and a `custom_apps` folder. If you use a custom theme it would go into the `themes` subfolder.\n\nOverview of the folders that can be mounted as volumes:\n\n-\t`/var/www/html` Main folder, needed for updating\n-\t`/var/www/html/custom_apps` installed / modified apps\n-\t`/var/www/html/config` local configuration\n-\t`/var/www/html/data` the actual data of your Nextcloud\n-\t`/var/www/html/themes/\u003cYOUR_CUSTOM_THEME\u003e` theming/branding\n\nIf you want to use named volumes for all of these, it would look like this:\n\n```console\n$ docker run -d \\\n-v nextcloud:/var/www/html \\\n-v apps:/var/www/html/custom_apps \\\n-v config:/var/www/html/config \\\n-v data:/var/www/html/data \\\n-v theme:/var/www/html/themes/\u003cYOUR_CUSTOM_THEME\u003e \\\nnextcloud\n```\n\n### Custom volumes\n\nIf mounting additional volumes under `/var/www/html`, you should consider:\n\n-\tConfirming that [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude) contains the files and folders that should persist during installation and upgrades; or\n-\tMounting storage volumes to locations outside of `/var/www/html`.\n\n\u003e You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s).\n\n## Using the Nextcloud command-line interface\n\nTo use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html) (aka. `occ` command):\n\n```console\n$ docker exec --user www-data CONTAINER_ID php occ\n```\n\nor for `docker compose`:\n\n```console\n$ docker compose exec --user www-data app php occ\n```\n\n## Auto configuration via environment variables\n\nThe Nextcloud image supports auto configuration via environment variables. You can preconfigure everything that is asked on the install page on first run. To enable auto configuration, set your database connection via the following environment variables. You must specify all of the environment variables for a given database or the database environment variables defaults to SQLITE. ONLY use one database type!\n\n**SQLite**:\n\n-\t`SQLITE_DATABASE` Name of the database using sqlite\n\n**MYSQL/MariaDB**:\n\n-\t`MYSQL_DATABASE` Name of the database using mysql / mariadb.\n-\t`MYSQL_USER` Username for the database using mysql / mariadb.\n-\t`MYSQL_PASSWORD` Password for the database user using mysql / mariadb.\n-\t`MYSQL_HOST` Hostname of the database server using mysql / mariadb.\n\n**PostgreSQL**:\n\n-\t`POSTGRES_DB` Name of the database using postgres.\n-\t`POSTGRES_USER` Username for the database using postgres.\n-\t`POSTGRES_PASSWORD` Password for the database user using postgres.\n-\t`POSTGRES_HOST` Hostname of the database server using postgres.\n\nAs an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. See [Docker secrets](#docker-secrets) section below.\n\nIf you set any group of values (i.e. all of `MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_HOST`), they will not be asked in the install page on first run. With a complete configuration by using all variables for your database type, you can additionally configure your Nextcloud instance by setting admin user and password (only works if you set both):\n\n-\t`NEXTCLOUD_ADMIN_USER` Name of the Nextcloud admin user.\n-\t`NEXTCLOUD_ADMIN_PASSWORD` Password for the Nextcloud admin user.\n\nIf you want, you can set the data directory, otherwise default value will be used.\n\n-\t`NEXTCLOUD_DATA_DIR` (default: `/var/www/html/data`) Configures the data directory where nextcloud stores all files from the users.\n\nOne or more trusted domains can be set through environment variable, too. They will be added to the configuration after install.\n\n-\t`NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains\n\nThe install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with\n\n-\t`NEXTCLOUD_UPDATE` (default: `0`)\n\nYou might want to make sure the htaccess is up to date after each container update. Especially on multiple swarm nodes as any discrepancy will make your server unusable.\n\n-\t`NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization.\n\nIf you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your Compose file. To inform Nextcloud about the Redis container, pass in the following parameters:\n\n-\t`REDIS_HOST` (not set by default) Name of Redis container\n-\t`REDIS_HOST_PORT` (default: `6379`) Optional port for Redis, only use for external Redis servers that run on non-standard ports.\n-\t`REDIS_HOST_PASSWORD` (not set by default) Redis password\n\nThe use of Redis is recommended to prevent file locking problems. See the examples for further instructions.\n\nTo use an external SMTP server, you have to provide the connection details. To configure Nextcloud to use SMTP add:\n\n-\t`SMTP_HOST` (not set by default): The hostname of the SMTP server.\n-\t`SMTP_SECURE` (empty by default): Set to `ssl` to use SSL, or `tls` to use STARTTLS.\n-\t`SMTP_PORT` (default: `465` for SSL and `25` for non-secure connections): Optional port for the SMTP connection. Use `587` for an alternative port for STARTTLS.\n-\t`SMTP_AUTHTYPE` (default: `LOGIN`): The method used for authentication. Use `PLAIN` if no authentication is required.\n-\t`SMTP_NAME` (empty by default): The username for the authentication.\n-\t`SMTP_PASSWORD` (empty by default): The password for the authentication.\n-\t`MAIL_FROM_ADDRESS` (not set by default): Set the local-part for the 'from' field in the emails sent by Nextcloud.\n-\t`MAIL_DOMAIN` (not set by default): Set a different domain for the emails than the domain where Nextcloud is installed.\n\nAt least `SMTP_HOST`, `MAIL_FROM_ADDRESS` and `MAIL_DOMAIN` must be set for the configurations to be applied.\n\nCheck the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html) for other values to configure SMTP.\n\nTo use an external S3 compatible object store as primary storage, set the following variables:\n\n-\t`OBJECTSTORE_S3_BUCKET`: The name of the bucket that Nextcloud should store the data in\n-\t`OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in\n-\t`OBJECTSTORE_S3_HOST`: The hostname of the object storage server\n-\t`OBJECTSTORE_S3_PORT`: The port that the object storage server is being served over\n-\t`OBJECTSTORE_S3_KEY`: AWS style access key\n-\t`OBJECTSTORE_S3_SECRET`: AWS style secret access key\n-\t`OBJECTSTORE_S3_STORAGE_CLASS`: The storage class to use when adding objects to the bucket\n-\t`OBJECTSTORE_S3_SSL` (default: `true`): Whether or not SSL/TLS should be used to communicate with object storage server\n-\t`OBJECTSTORE_S3_USEPATH_STYLE` (default: `false`): Not required for AWS S3\n-\t`OBJECTSTORE_S3_LEGACYAUTH` (default: `false`): Not required for AWS S3\n-\t`OBJECTSTORE_S3_OBJECT_PREFIX` (default: `urn:oid:`): Prefix to prepend to the fileid\n-\t`OBJECTSTORE_S3_AUTOCREATE` (default: `true`): Create the container if it does not exist\n-\t`OBJECTSTORE_S3_SSE_C_KEY` (not set by default): Base64 encoded key with a maximum length of 32 bytes for server side encryption (SSE-C)\n\nCheck the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3) for more information.\n\nTo use an external OpenStack Swift object store as primary storage, set the following variables:\n\n-\t`OBJECTSTORE_SWIFT_URL`: The Swift identity (Keystone) endpoint\n-\t`OBJECTSTORE_SWIFT_AUTOCREATE` (default: `false`): Whether or not Nextcloud should automatically create the Swift container\n-\t`OBJECTSTORE_SWIFT_USER_NAME`: Swift username\n-\t`OBJECTSTORE_SWIFT_USER_PASSWORD`: Swift user password\n-\t`OBJECTSTORE_SWIFT_USER_DOMAIN` (default: `Default`): Swift user domain\n-\t`OBJECTSTORE_SWIFT_PROJECT_NAME`: OpenStack project name\n-\t`OBJECTSTORE_SWIFT_PROJECT_DOMAIN` (default: `Default`): OpenStack project domain\n-\t`OBJECTSTORE_SWIFT_SERVICE_NAME` (default: `swift`): Swift service name\n-\t`OBJECTSTORE_SWIFT_REGION`: Swift endpoint region\n-\t`OBJECTSTORE_SWIFT_CONTAINER_NAME`: Swift container (bucket) that Nextcloud should store the data in\n\nCheck the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#openstack-swift) for more information.\n\nTo customize other PHP limits you can simply change the following variables:\n\n-\t`PHP_MEMORY_LIMIT` (default `512M`) This sets the maximum amount of memory in bytes that a script is allowed to allocate. This is meant to help prevent poorly written scripts from eating up all available memory but it can prevent normal operation if set too tight.\n-\t`PHP_UPLOAD_LIMIT` (default `512M`) This sets the upload limit (`post_max_size` and `upload_max_filesize`) for big files. Note that you may have to change other limits depending on your client, webserver or operating system. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html) for more information.\n\nTo customize Apache max file upload limit you can change the following variable:\n\n-\t`APACHE_BODY_LIMIT` (default `1073741824` [1GiB]) This restricts the total size of the HTTP request body sent from the client. It specifies the number of *bytes* that are allowed in a request body. A value of **0** means **unlimited**. Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#apache) for more information.\n\n## Auto configuration via hook folders\n\nThere are 5 hooks\n\n-\t`pre-installation` Executed before the Nextcloud is installed/initiated\n-\t`post-installation` Executed after the Nextcloud is installed/initiated\n-\t`pre-upgrade` Executed before the Nextcloud is upgraded\n-\t`post-upgrade` Executed after the Nextcloud is upgraded\n-\t`before-starting` Executed before the Nextcloud starts\n\nTo use the hooks triggered by the `entrypoint` script, either\n\n-\tAdded your script(s) to the individual of the hook folder(s), which are located at the path `/docker-entrypoint-hooks.d` in the container\n-\tUse volume(s) if you want to use script from the host system inside the container, see example.\n\n**Note:** Only the script(s) located in a hook folder (not sub-folders), ending with `.sh` and marked as executable, will be executed.\n\n**Example:** Mount using volumes\n\n```yaml\n...\n  app:\n    image: nextcloud:stable\n\n    volumes:\n      - ./app-hooks/pre-installation:/docker-entrypoint-hooks.d/pre-installation\n      - ./app-hooks/post-installation:/docker-entrypoint-hooks.d/post-installation\n      - ./app-hooks/pre-upgrade:/docker-entrypoint-hooks.d/pre-upgrade\n      - ./app-hooks/post-upgrade:/docker-entrypoint-hooks.d/post-upgrade\n      - ./app-hooks/before-starting:/docker-entrypoint-hooks.d/before-starting\n...\n```\n\n## Using the apache image behind a reverse proxy and auto configure server host and protocol\n\nThe apache image will replace the remote addr (IP address visible to Nextcloud) with the IP address from `X-Real-IP` if the request is coming from a proxy in `10.0.0.0/8`, `172.16.0.0/12` or `192.168.0.0/16` by default. If you want Nextcloud to pick up the server host (`HTTP_X_FORWARDED_HOST`), protocol (`HTTP_X_FORWARDED_PROTO`) and client IP (`HTTP_X_FORWARDED_FOR`) from a trusted proxy, then disable rewrite IP and add the reverse proxy's IP address to `TRUSTED_PROXIES`.\n\n-\t`APACHE_DISABLE_REWRITE_IP` (not set by default): Set to 1 to disable rewrite IP.\n-\t`TRUSTED_PROXIES` (empty by default): A space-separated list of trusted proxies. CIDR notation is supported for IPv4.\n\nIf the `TRUSTED_PROXIES` approach does not work for you, try using fixed values for overwrite parameters.\n\n-\t`OVERWRITEHOST` (empty by default): Set the hostname of the proxy. Can also specify a port.\n-\t`OVERWRITEPROTOCOL` (empty by default): Set the protocol of the proxy, http or https.\n-\t`OVERWRITECLIURL` (empty by default): Set the cli url of the proxy (e.g. https://mydnsname.example.com)\n-\t`OVERWRITEWEBROOT` (empty by default): Set the absolute path of the proxy.\n-\t`OVERWRITECONDADDR` (empty by default): Regex to overwrite the values dependent on the remote address.\n\nCheck the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html) for more details.\n\nKeep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together.\n\n# Running this image with Docker Compose\n\nThe easiest way to get a fully featured and functional setup is using a `compose.yaml` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for.\n\nAt first, make sure you have chosen the right base image (fpm or apache) and added features you wanted (see below). In every case, you would want to add a database container and docker volumes to get easy access to your persistent data. When you want to have your server reachable from the internet, adding HTTPS-encryption is mandatory! See below for more information.\n\n## Base version - apache\n\nThis version will use the apache image and add a mariaDB container. The volumes are set to keep your data persistent. This setup provides **no ssl encryption** and is intended to run behind a proxy.\n\nMake sure to pass in values for `MYSQL_ROOT_PASSWORD` and `MYSQL_PASSWORD` variables before you run this setup.\n\n```yaml\nvolumes:\n  nextcloud:\n  db:\n\nservices:\n  db:\n    image: mariadb:10.6\n    restart: always\n    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW\n    volumes:\n      - db:/var/lib/mysql\n    environment:\n      - MYSQL_ROOT_PASSWORD=\n      - MYSQL_PASSWORD=\n      - MYSQL_DATABASE=nextcloud\n      - MYSQL_USER=nextcloud\n\n  app:\n    image: nextcloud\n    restart: always\n    ports:\n      - 8080:80\n    links:\n      - db\n    volumes:\n      - nextcloud:/var/www/html\n    environment:\n      - MYSQL_PASSWORD=\n      - MYSQL_DATABASE=nextcloud\n      - MYSQL_USER=nextcloud\n      - MYSQL_HOST=db\n```\n\nThen run `docker compose up -d`, now you can access Nextcloud at http://localhost:8080/ from your host system.\n\n## Base version - FPM\n\n...\n\n**Note:** the description for this image is longer than the Hub length limit of 25000, so has been trimmed.  The full description can be found at [https://github.com/docker-library/docs/tree/master/nextcloud/README.md](https://github.com/docker-library/docs/tree/master/nextcloud/README.md).  See also [docker/hub-feedback#238](https://github.com/docker/hub-feedback/issues/238) and [docker/roadmap#475](https://github.com/docker/roadmap/issues/475).","permissions":{"read":true,"write":false,"admin":false},"media_types":["application/vnd.docker.container.image.v1+json","application/vnd.docker.distribution.manifest.list.v2+json","application/vnd.oci.image.index.v1+json"],"content_types":["image"],"categories":[{"name":"Content management system","slug":"content-management-system"}],"immutable_tags_settings":{"enabled":false,"rules":[".*"]},"storage_size":4634738632438,"source":null}