|
|
@@ -98,7 +98,7 @@ By default this container uses SQLite for data storage, but the Nextcloud setup
|
|
|
|
|
|
The Nextcloud installation and all data beyond what lives in the database (file uploads, etc) is stored in the [unnamed docker volume](https://docs.docker.com/engine/tutorials/dockervolumes/#adding-a-data-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.
|
|
|
|
|
|
-To make your data persistent to upgrading and get access for backups is using named docker volume or mount a host folder. To achieve this you need one volume for your database container and Nextcloud.
|
|
|
+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:
|
|
|
|
|
|
@@ -161,7 +161,7 @@ $ docker-compose exec --user www-data app php occ
|
|
|
|
|
|
The 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. ONLY use one database type!
|
|
|
|
|
|
-**SQLITE_DATABASE**:
|
|
|
+**SQLite**:
|
|
|
|
|
|
- `SQLITE_DATABASE` Name of the database using sqlite
|
|
|
|
|
|
@@ -189,6 +189,34 @@ If you want you can set the data directory and table prefix, otherwise default v
|
|
|
- `NEXTCLOUD_DATA_DIR` (default: */var/www/html/data*) Configures the data directory where nextcloud stores all files from the users.
|
|
|
- `NEXTCLOUD_TABLE_PREFIX` (default: *""*) Optional prefix for the tables. Used to be `oc_` in the past
|
|
|
|
|
|
+One or more trusted domains can be set by environment variable, too. They will be added to the configuration after install.
|
|
|
+
|
|
|
+- `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains
|
|
|
+
|
|
|
+The 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
|
|
|
+
|
|
|
+- `NEXTCLOUD_UPDATE` (default: *0*)
|
|
|
+
|
|
|
+If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container add:
|
|
|
+
|
|
|
+- `REDIS_HOST` (not set by default) Name of Redis container
|
|
|
+- `REDIS_HOST_PORT` (default: *6379*) Optional port for Redis, only use for external Redis servers that run on non-standard ports.
|
|
|
+
|
|
|
+The use of Redis is recommended to prevent file locking problems. See the examples for further instructions.
|
|
|
+
|
|
|
+To use a external SMTP server you have to provide the conection details. To configure Nextcloud to use SMTP add:
|
|
|
+
|
|
|
+- `SMTP_HOST` (not set by default) hostname of the SMTP server
|
|
|
+- `SMTP_SECURE` (empty by default) set to 'ssl' to use SSL on the connection.
|
|
|
+- `SMTP_PORT` (default: *465* for SSL and *25* for non-secure connection) Optional port for SMTP connection.
|
|
|
+- `SMTP_AUTHTYPE` (default: *LOGIN*) The method used for authentication.
|
|
|
+- `SMTP_NAME` (empty by default) Username for the authentication.
|
|
|
+- `SMTP_PASSWORD` (empty by default) Password for the authentication.
|
|
|
+- `MAIL_FROM_ADDRESS` (not set by default) Use this address for the 'from' field in the mail envelopes sent by Nextcloud.
|
|
|
+- `MAIL_DOMAIN` (not set by default) Set a different domain for the emails than the domain where Nextcloud is installed.
|
|
|
+
|
|
|
+Check the [Nextcloud documentation](https://docs.nextcloud.com/server/15/admin_manual/configuration_server/email_configuration.html) for other values to configure SMTP.
|
|
|
+
|
|
|
# Running this image with docker-compose
|
|
|
|
|
|
The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples what you have to look for.
|
|
|
@@ -303,7 +331,11 @@ When you first access your Nextcloud, the setup wizard will appear and ask you t
|
|
|
|
|
|
# Update to a newer version
|
|
|
|
|
|
-Updating the Nextcloud container is done by pulling the new image, throwing away the old container and starting the new one. Since all data is stored in volumes, nothing gets lost. The startup script will check for the version in your volume and the installed docker version. If it finds a mismatch, it automatically starts the upgrade process. Don't forget to add all the volumes to your new container, so it works as expected.
|
|
|
+Updating the Nextcloud container is done by pulling the new image, throwing away the old container and starting the new one.
|
|
|
+
|
|
|
+**It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16.**
|
|
|
+
|
|
|
+Since all data is stored in volumes, nothing gets lost. The startup script will check for the version in your volume and the installed docker version. If it finds a mismatch, it automatically starts the upgrade process. Don't forget to add all the volumes to your new container, so it works as expected.
|
|
|
|
|
|
```console
|
|
|
$ docker pull nextcloud
|
|
|
@@ -348,6 +380,18 @@ If you use your own Dockerfile you need to configure your docker-compose file ac
|
|
|
restart: always
|
|
|
```
|
|
|
|
|
|
+If you intend to use another command to run the image. Make sure that you set `NEXTCLOUD_UPDATE=1` in your Dockerfile. Otherwise the installation and update will not work.
|
|
|
+
|
|
|
+```yaml
|
|
|
+FROM nextcloud:apache
|
|
|
+
|
|
|
+...
|
|
|
+
|
|
|
+ENV NEXTCLOUD_UPDATE=1
|
|
|
+
|
|
|
+CMD ["/usr/bin/supervisord"]
|
|
|
+```
|
|
|
+
|
|
|
**Updating** your own derived image is also very simple. When a new version of the Nextcloud image is available run:
|
|
|
|
|
|
```console
|