A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.
⚠️⚠️⚠️ 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 maintained by Nextcloud GmbH.
occ)config.php)datadirectory)trusted_domains)Warning: /var/www/html/config/$cfgFile differs from the latest version of this image at /usr/src/nextcloud/config/$cfgFile (aka: Auto configuration and Nextcloud updates)docker composeThis image is designed to be used in a micro-service environment. There are two versions of the image you can choose from.
The 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.
The second option is a fpm container. It is based on the php-fpm 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.
Most Nextcloud Server administrative matters are covered in the official Nextcloud Admin Manual or other official Nextcloud documentation (which are all routinely updated).
If you have any problems or usage questions while using the image, please ask for assistance on the Nextcloud Community Help Forum rather than reporting them as "bugs" (unless they are bugs of course). This helps the maintainers (who are volunteers) remain focused on making the image better (rather than responding solely to one-on-one support issues). (Tip: Some of the maintainers are also regular responders to help requests on the community help forum.)
For the image specifically, we provide some simple deployment examples as well as some more extensive deployment examples. In addition, the community help forum has a "how-to" section with further examples of other peoples' container based Nextcloud stacks.
Below you'll find the main documentation for using this image.
The apache image contains a webserver and exposes port 80. To start the container type:
$ docker run -d -p 8080:80 nextcloud
Now you can access Nextcloud at http://localhost:8080/ from your host system.
WARNING: This example is only suitable for limited testing purposes. Please read on to understand how the image handles storing your data and other aspects you need to consider to establish a full Nextcloud stack.
To use the fpm image, you need an additional web server, such as nginx, 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 <NAME> ... or a docker compose file). In both cases you don't want to map the fpm port to your host.
$ docker run -d nextcloud:fpm
As 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.
By 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.
The Nextcloud installation and all data beyond what lives in the database (file uploads, etc.) are stored in the unnamed docker volume 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.
A 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.
Nextcloud:
- /var/www/html/ folder where all Nextcloud data lives
$ docker run -d \
-v nextcloud:/var/www/html \
nextcloud
Database:
- /var/lib/mysql MySQL / MariaDB Data
- /var/lib/postgresql/data PostgreSQL Data
$ docker run -d \
-v db:/var/lib/mysql \
mariadb:lts
If 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.
Overview of the folders that can be mounted as volumes:
/var/www/html Main folder, needed for updating/var/www/html/custom_apps installed / modified apps/var/www/html/config local configuration/var/www/html/data the actual data of your Nextcloud/var/www/html/themes/<YOUR_CUSTOM_THEME> theming/brandingIf you want to use named volumes for all of these, it would look like this: ```console $ docker run -d \ -v ne
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|