update
This commit is contained in:
parent
3f85e11fb8
commit
446af7bf74
|
@ -22,6 +22,9 @@ http {
|
||||||
sendfile on;
|
sendfile on;
|
||||||
#tcp_nopush on;
|
#tcp_nopush on;
|
||||||
|
|
||||||
|
# Prevent nginx HTTP Server Detection
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
|
|
||||||
#gzip on;
|
#gzip on;
|
||||||
|
@ -33,55 +36,16 @@ http {
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
# Add headers to serve security related headers
|
# HSTS settings
|
||||||
# Before enabling Strict-Transport-Security headers please read into this
|
|
||||||
# topic first.
|
|
||||||
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
|
||||||
#
|
|
||||||
# WARNING: Only add the preload option once you read about
|
# WARNING: Only add the preload option once you read about
|
||||||
# the consequences in https://hstspreload.org/. This option
|
# the consequences in https://hstspreload.org/. This option
|
||||||
# will add the domain to a hardcoded list that is shipped
|
# will add the domain to a hardcoded list that is shipped
|
||||||
# in all major browsers and getting removed from this list
|
# in all major browsers and getting removed from this list
|
||||||
# could take several months.
|
# could take several months.
|
||||||
add_header Referrer-Policy "no-referrer" always;
|
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
add_header X-Download-Options "noopen" always;
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
|
||||||
add_header X-Robots-Tag "none" always;
|
|
||||||
add_header X-XSS-Protection "1; mode=block" always;
|
|
||||||
|
|
||||||
# Remove X-Powered-By, which is an information leak
|
|
||||||
fastcgi_hide_header X-Powered-By;
|
|
||||||
|
|
||||||
# Path to the root of your installation
|
|
||||||
root /var/www/html;
|
|
||||||
|
|
||||||
location = /robots.txt {
|
|
||||||
allow all;
|
|
||||||
log_not_found off;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# The following 2 rules are only needed for the user_webfinger app.
|
|
||||||
# Uncomment it if you're planning to use this app.
|
|
||||||
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
|
|
||||||
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
|
|
||||||
|
|
||||||
# The following rule is only needed for the Social app.
|
|
||||||
# Uncomment it if you're planning to use this app.
|
|
||||||
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
|
|
||||||
|
|
||||||
location = /.well-known/carddav {
|
|
||||||
return 301 $scheme://$host:$server_port/remote.php/dav;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /.well-known/caldav {
|
|
||||||
return 301 $scheme://$host:$server_port/remote.php/dav;
|
|
||||||
}
|
|
||||||
|
|
||||||
# set max upload size
|
# set max upload size
|
||||||
client_max_body_size 10G;
|
client_max_body_size 512M;
|
||||||
fastcgi_buffers 64 4K;
|
fastcgi_buffers 64 4K;
|
||||||
|
|
||||||
# Enable gzip but do not remove ETag headers
|
# Enable gzip but do not remove ETag headers
|
||||||
|
@ -92,77 +56,118 @@ http {
|
||||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||||
|
|
||||||
# Uncomment if your server is build with the ngx_pagespeed module
|
# Pagespeed is not supported by Nextcloud, so if your server is built
|
||||||
# This module is currently not supported.
|
# with the `ngx_pagespeed` module, uncomment this line to disable it.
|
||||||
#pagespeed off;
|
#pagespeed off;
|
||||||
|
|
||||||
location / {
|
# HTTP response headers borrowed from Nextcloud `.htaccess`
|
||||||
rewrite ^ /index.php;
|
add_header Referrer-Policy "no-referrer" always;
|
||||||
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
|
add_header X-Download-Options "noopen" always;
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||||
|
add_header X-Robots-Tag "none" always;
|
||||||
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
|
|
||||||
|
# Remove X-Powered-By, which is an information leak
|
||||||
|
fastcgi_hide_header X-Powered-By;
|
||||||
|
|
||||||
|
# Path to the root of your installation
|
||||||
|
root /var/www/html;
|
||||||
|
|
||||||
|
# Specify how to handle directories -- specifying `/index.php$request_uri`
|
||||||
|
# here as the fallback means that Nginx always exhibits the desired behaviour
|
||||||
|
# when a client requests a path that corresponds to a directory that exists
|
||||||
|
# on the server. In particular, if that directory contains an index.php file,
|
||||||
|
# that file is correctly served; if it doesn't, then the request is passed to
|
||||||
|
# the front-end controller. This consistent behaviour means that we don't need
|
||||||
|
# to specify custom rules for certain paths (e.g. images and other assets,
|
||||||
|
# `/updater`, `/ocm-provider`, `/ocs-provider`), and thus
|
||||||
|
# `try_files $uri $uri/ /index.php$request_uri`
|
||||||
|
# always provides the desired behaviour.
|
||||||
|
index index.php index.html /index.php$request_uri;
|
||||||
|
|
||||||
|
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
|
||||||
|
location = / {
|
||||||
|
if ( $http_user_agent ~ ^DavClnt ) {
|
||||||
|
return 302 /remote.php/webdav/$is_args$args;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
|
location = /robots.txt {
|
||||||
deny all;
|
allow all;
|
||||||
}
|
log_not_found off;
|
||||||
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
|
access_log off;
|
||||||
deny all;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
|
# Make a regex exception for `/.well-known` so that clients can still
|
||||||
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
|
# access it despite the existence of the regex rule
|
||||||
|
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
|
||||||
|
# for `/.well-known`.
|
||||||
|
location ^~ /.well-known {
|
||||||
|
# The rules in this block are an adaptation of the rules
|
||||||
|
# in `.htaccess` that concern `/.well-known`.
|
||||||
|
|
||||||
|
location = /.well-known/carddav { return 301 /remote.php/dav/; }
|
||||||
|
location = /.well-known/caldav { return 301 /remote.php/dav/; }
|
||||||
|
|
||||||
|
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
|
||||||
|
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
|
||||||
|
|
||||||
|
# Let Nextcloud's API for `/.well-known` URIs handle all other
|
||||||
|
# requests by passing them to the front-end controller.
|
||||||
|
return 301 /index.php$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Rules borrowed from `.htaccess` to hide certain paths from clients
|
||||||
|
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
|
||||||
|
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
|
||||||
|
|
||||||
|
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
|
||||||
|
# which handle static assets (as seen below). If this block is not declared first,
|
||||||
|
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
|
||||||
|
# to the URI, resulting in a HTTP 500 error response.
|
||||||
|
location ~ \.php(?:$|/) {
|
||||||
|
# Required for legacy support
|
||||||
|
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
|
||||||
|
|
||||||
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
set $path_info $fastcgi_path_info;
|
set $path_info $fastcgi_path_info;
|
||||||
|
|
||||||
try_files $fastcgi_script_name =404;
|
try_files $fastcgi_script_name =404;
|
||||||
|
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $path_info;
|
fastcgi_param PATH_INFO $path_info;
|
||||||
# fastcgi_param HTTPS on;
|
#fastcgi_param HTTPS on;
|
||||||
|
|
||||||
# Avoid sending the security headers twice
|
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
||||||
fastcgi_param modHeadersAvailable true;
|
fastcgi_param front_controller_active true; # Enable pretty urls
|
||||||
|
|
||||||
# Enable pretty urls
|
|
||||||
fastcgi_param front_controller_active true;
|
|
||||||
fastcgi_pass php-handler;
|
fastcgi_pass php-handler;
|
||||||
|
|
||||||
fastcgi_intercept_errors on;
|
fastcgi_intercept_errors on;
|
||||||
fastcgi_request_buffering off;
|
fastcgi_request_buffering off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
|
location ~ \.(?:css|js|svg|gif)$ {
|
||||||
try_files $uri/ =404;
|
try_files $uri /index.php$request_uri;
|
||||||
index index.php;
|
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
||||||
|
access_log off; # Optional: Don't log access to assets
|
||||||
}
|
}
|
||||||
|
|
||||||
# Adding the cache control header for js, css and map files
|
location ~ \.woff2?$ {
|
||||||
# Make sure it is BELOW the PHP block
|
|
||||||
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
|
|
||||||
try_files $uri /index.php$request_uri;
|
try_files $uri /index.php$request_uri;
|
||||||
add_header Cache-Control "public, max-age=15778463";
|
expires 7d; # Cache-Control policy borrowed from `.htaccess`
|
||||||
# Add headers to serve security related headers (It is intended to
|
access_log off; # Optional: Don't log access to assets
|
||||||
# have those duplicated to the ones above)
|
|
||||||
# Before enabling Strict-Transport-Security headers please read into
|
|
||||||
# this topic first.
|
|
||||||
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
|
||||||
#
|
|
||||||
# WARNING: Only add the preload option once you read about
|
|
||||||
# the consequences in https://hstspreload.org/. This option
|
|
||||||
# will add the domain to a hardcoded list that is shipped
|
|
||||||
# in all major browsers and getting removed from this list
|
|
||||||
# could take several months.
|
|
||||||
add_header Referrer-Policy "no-referrer" always;
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
add_header X-Download-Options "noopen" always;
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
|
||||||
add_header X-Robots-Tag "none" always;
|
|
||||||
add_header X-XSS-Protection "1; mode=block" always;
|
|
||||||
|
|
||||||
# Optional: Don't log access to assets
|
|
||||||
access_log off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap|mp4|webm)$ {
|
# Rule borrowed from `.htaccess`
|
||||||
try_files $uri /index.php$request_uri;
|
location /remote {
|
||||||
# Optional: Don't log access to other assets
|
return 301 /remote.php$request_uri;
|
||||||
access_log off;
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,20 +34,20 @@ and for [memory file caching](https://docs.nextcloud.com/server/latest/admin_man
|
||||||
└── ~/
|
└── ~/
|
||||||
└── docker/
|
└── docker/
|
||||||
└── nextcloud/
|
└── nextcloud/
|
||||||
├── nextcloud-data/
|
├── 🗁 nextcloud-data/
|
||||||
├── nextcloud-db-data/
|
├── 🗁 nextcloud-db-data/
|
||||||
├── .env
|
├── 🗋 .env
|
||||||
├── docker-compose.yml
|
├── 🗋 docker-compose.yml
|
||||||
├── nginx.conf
|
├── 🗋 nginx.conf
|
||||||
└── nextcloud-backup-script.sh
|
└── 🗋 nextcloud-backup-script.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
* `nextcloud-data/` - a directory where nextcloud will store users data and web app data
|
* `nextcloud-data/` - users data and web app data
|
||||||
* `nextcloud-db-data/` - a directory where nextcloud will store its database data
|
* `nextcloud-db-data/` - database data
|
||||||
* `.env` - a file containing environment variables for docker compose
|
* `.env` - a file containing environment variables for docker compose
|
||||||
* `docker-compose.yml` - a docker compose file, telling docker how to run the containers
|
* `docker-compose.yml` - a docker compose file, telling docker how to run the containers
|
||||||
* `nginx.conf` - nginx web server configuration file
|
* `nginx.conf` - nginx web server configuration file
|
||||||
* `nextcloud-backup-script.sh` - a backup script if you want it
|
* `nextcloud-backup-script.sh` - a backup script, to be run daily
|
||||||
|
|
||||||
You only need to provide the files.</br>
|
You only need to provide the files.</br>
|
||||||
The directories are created by docker compose on the first run.
|
The directories are created by docker compose on the first run.
|
||||||
|
@ -79,10 +79,10 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
- ./nextcloud-data-db:/var/lib/mysql
|
- ./nextcloud_data_db:/var/lib/mysql
|
||||||
|
|
||||||
nextcloud-redis:
|
nextcloud-redis:
|
||||||
image: redis:5.0.9-alpine
|
image: redis:alpine
|
||||||
container_name: nextcloud-redis
|
container_name: nextcloud-redis
|
||||||
hostname: nextcloud-redis
|
hostname: nextcloud-redis
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -97,7 +97,7 @@ services:
|
||||||
- nextcloud-db
|
- nextcloud-db
|
||||||
- nextcloud-redis
|
- nextcloud-redis
|
||||||
volumes:
|
volumes:
|
||||||
- ./nextcloud-data/:/var/www/html
|
- ./nextcloud_data/:/var/www/html
|
||||||
|
|
||||||
nextcloud-web:
|
nextcloud-web:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
|
@ -105,8 +105,10 @@ services:
|
||||||
hostname: nextcloud-web
|
hostname: nextcloud-web
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./nextcloud-data/:/var/www/html:ro
|
- ./nextcloud_data/:/var/www/html:ro
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
|
expose:
|
||||||
|
- 80:80
|
||||||
|
|
||||||
nextcloud-cron:
|
nextcloud-cron:
|
||||||
image: nextcloud:fpm-alpine
|
image: nextcloud:fpm-alpine
|
||||||
|
@ -114,7 +116,7 @@ services:
|
||||||
hostname: nextcloud-cron
|
hostname: nextcloud-cron
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./nextcloud-data/:/var/www/html
|
- ./nextcloud_data/:/var/www/html
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
depends_on:
|
depends_on:
|
||||||
- nextcloud-db
|
- nextcloud-db
|
||||||
|
@ -122,42 +124,45 @@ services:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
external:
|
name: $DOCKER_MY_NETWORK
|
||||||
name: $DOCKER_MY_NETWORK
|
external: true
|
||||||
```
|
```
|
||||||
|
|
||||||
`.env`
|
`.env`
|
||||||
```bash
|
```bash
|
||||||
# GENERAL
|
# GENERAL
|
||||||
MY_DOMAIN=example.com
|
|
||||||
DOCKER_MY_NETWORK=caddy_net
|
DOCKER_MY_NETWORK=caddy_net
|
||||||
TZ=Europe/Bratislava
|
TZ=Europe/Bratislava
|
||||||
|
|
||||||
# NEXTCLOUD-MARIADB
|
# NEXTCLOUD-MARIADB
|
||||||
MYSQL_ROOT_PASSWORD=nextcloud
|
MYSQL_ROOT_PASSWORD=nextcloud
|
||||||
|
MARIADB_AUTO_UPGRADE=1
|
||||||
|
MARIADB_DISABLE_UPGRADE_BACKUP=1
|
||||||
MYSQL_PASSWORD=nextcloud
|
MYSQL_PASSWORD=nextcloud
|
||||||
MYSQL_DATABASE=nextcloud
|
MYSQL_DATABASE=nextcloud
|
||||||
MYSQL_USER=nextcloud
|
MYSQL_USER=nextcloud
|
||||||
|
|
||||||
# NEXTCLOUD
|
# NEXTCLOUD-APP
|
||||||
MYSQL_HOST=nextcloud-db
|
MYSQL_HOST=nextcloud-db
|
||||||
REDIS_HOST=nextcloud-redis
|
REDIS_HOST=nextcloud-redis
|
||||||
|
OVERWRITEPROTOCOL=https
|
||||||
|
TRUSTED_PROXIES=caddy
|
||||||
|
NC_default_phone_region=SK # CHANGE TO YOUR COUNTRY CODE
|
||||||
|
|
||||||
# USING SENDGRID FOR SENDING EMAILS
|
# USING SENDINBLUE FOR SENDING EMAILS
|
||||||
MAIL_DOMAIN=example.com
|
MAIL_DOMAIN=example.com
|
||||||
MAIL_FROM_ADDRESS=nextcloud
|
MAIL_FROM_ADDRESS=nextcloud
|
||||||
SMTP_SECURE=ssl
|
SMTP_SECURE=tls
|
||||||
SMTP_HOST=smtp.sendgrid.net
|
SMTP_HOST=smtp-relay.sendinblue.com
|
||||||
SMTP_PORT=465
|
SMTP_PORT=587
|
||||||
SMTP_NAME=apikey
|
SMTP_NAME=<registration-email@gmail.com>
|
||||||
SMTP_PASSWORD=<sendgrid-api-key-goes-here>
|
SMTP_PASSWORD=<smtp-key-goes-here>
|
||||||
```
|
```
|
||||||
|
|
||||||
`nginx.conf`
|
`nginx.conf`
|
||||||
```
|
```
|
||||||
I wont be pasting it here
|
Not be pasted here, too long.
|
||||||
in full text,
|
It is included in this github repo.
|
||||||
but it is included in this github repo.
|
|
||||||
```
|
```
|
||||||
|
|
||||||
[nginx.conf](https://raw.githubusercontent.com/DoTheEvo/selfhosted-apps-docker/master/nextcloud/nginx.conf)
|
[nginx.conf](https://raw.githubusercontent.com/DoTheEvo/selfhosted-apps-docker/master/nextcloud/nginx.conf)
|
||||||
|
@ -181,12 +186,6 @@ upstream php-handler {
|
||||||
Which is named in the `.env` file.</br>
|
Which is named in the `.env` file.</br>
|
||||||
If one does not exist yet: `docker network create caddy_net`
|
If one does not exist yet: `docker network create caddy_net`
|
||||||
|
|
||||||
# notice
|
|
||||||
|
|
||||||
current issue, [redis version 6.0](https://github.com/nextcloud/server/issues/21913)
|
|
||||||
|
|
||||||
Therefore `image: redis:5.0.9-alpine` is used instead of `image: redis` like with the rest.
|
|
||||||
|
|
||||||
# Reverse proxy
|
# Reverse proxy
|
||||||
|
|
||||||
[Nextcloud official documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html)
|
[Nextcloud official documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html)
|
||||||
|
@ -197,12 +196,14 @@ Caddy v2 is used, details
|
||||||
There are few extra directives here to fix some nextcloud warnings.
|
There are few extra directives here to fix some nextcloud warnings.
|
||||||
|
|
||||||
`Caddyfile`
|
`Caddyfile`
|
||||||
```
|
```php
|
||||||
nextcloud.{$MY_DOMAIN} {
|
nextcloud.{$MY_DOMAIN} {
|
||||||
reverse_proxy nextcloud-web:80
|
|
||||||
header Strict-Transport-Security max-age=31536000;
|
header Strict-Transport-Security max-age=31536000;
|
||||||
redir /.well-known/carddav /remote.php/carddav 301
|
redir /.well-known/carddav /remote.php/carddav 301
|
||||||
redir /.well-known/caldav /remote.php/caldav 301
|
redir /.well-known/caldav /remote.php/caldav 301
|
||||||
|
redir /.well-known/webfinger /index.php/.well-known/webfinger 301
|
||||||
|
redir /.well-known/nodeinfo /index.php/.well-known/nodeinfo 301
|
||||||
|
reverse_proxy nextcloud-web:80
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -210,15 +211,15 @@ nextcloud.{$MY_DOMAIN} {
|
||||||
|
|
||||||
Nextcloud needs few moments to start, then there is the initial configuration,
|
Nextcloud needs few moments to start, then there is the initial configuration,
|
||||||
creating admin account.</br>
|
creating admin account.</br>
|
||||||
If database env variables were not passed in to nextcloud-app
|
If database env variables were not used then also the database info
|
||||||
then also the database info would be required here.
|
would be required here.
|
||||||
|
|
||||||
![first-run-pic](https://i.imgur.com/lv1x9GF.png)
|
![first-run-pic](https://i.imgur.com/lv1x9GF.png)
|
||||||
|
|
||||||
The domain or IP you access nextcloud on this first run is added
|
The domain or IP you access nextcloud on this first run is added
|
||||||
to `trusted_domains` in `config.php`.
|
to `trusted_domains` in `config.php`.
|
||||||
Changing the domain later on will throw *"Access through untrusted domain"* error.</br>
|
Changing the domain later on will throw *"Access through untrusted domain"* error.</br>
|
||||||
Editing `nextcloud-data/config/config.php` and adding the new domain will fix it.
|
Editing `nextcloud_data/config/config.php` and adding the new domain will fix it.
|
||||||
|
|
||||||
# Security & setup warnings
|
# Security & setup warnings
|
||||||
|
|
||||||
|
@ -256,7 +257,7 @@ If there is a problem accesing nextcloud from a mobile app,
|
||||||
*"Please log in before granting access"*,
|
*"Please log in before granting access"*,
|
||||||
and being stuck after logging in with the circle animation:
|
and being stuck after logging in with the circle animation:
|
||||||
|
|
||||||
Edit `nextcloud-data/config/config.php`</br>
|
Edit `nextcloud_data/config/config.php`</br>
|
||||||
adding as the last line: `'overwriteprotocol' => 'https',`
|
adding as the last line: `'overwriteprotocol' => 'https',`
|
||||||
|
|
||||||
# Extra info
|
# Extra info
|
||||||
|
@ -337,7 +338,7 @@ The script must be **executable** - `chmod +x nextcloud-backup-script.sh`
|
||||||
|
|
||||||
Test run the script `sudo ./nextcloud-backup-script.sh`</br>
|
Test run the script `sudo ./nextcloud-backup-script.sh`</br>
|
||||||
The resulting database dump is in
|
The resulting database dump is in
|
||||||
`nextcloud/nextcloud-data-db/BACKUP.nextcloud.database.sql`
|
`nextcloud/nextcloud_data_db/BACKUP.nextcloud.database.sql`
|
||||||
|
|
||||||
#### Cronjob
|
#### Cronjob
|
||||||
|
|
||||||
|
@ -357,11 +358,11 @@ Assuming clean start.
|
||||||
let them run so they create the file structure
|
let them run so they create the file structure
|
||||||
* down the containers: `docker-compose down`
|
* down the containers: `docker-compose down`
|
||||||
* delete the directories `config`, `data`, `themes` in the freshly created
|
* delete the directories `config`, `data`, `themes` in the freshly created
|
||||||
`nextcloud/nextcloud-data/`
|
`nextcloud/nextcloud_data/`
|
||||||
* from the backup of `/nextcloud/nextcloud-data/`, copy the directories
|
* from the backup of `/nextcloud/nextcloud-data/`, copy the directories
|
||||||
`configs`, `data`, `themes` in to the new `/nextcloud/nextcloud-data/`
|
`configs`, `data`, `themes` in to the new `/nextcloud/nextcloud-data/`
|
||||||
* from the backup of `/nextcloud/nextcloud-data-db/`, copy the backup database
|
* from the backup of `/nextcloud/nextcloud_data_db/`, copy the backup database
|
||||||
named `BACKUP.nextcloud.database.sql` in to the new `/nextcloud/nextcloud-data-db/`
|
named `BACKUP.nextcloud.database.sql` in to the new `/nextcloud/nextcloud_data_db/`
|
||||||
* start the containers: `docker-compose up -d`
|
* start the containers: `docker-compose up -d`
|
||||||
* set the correct user ownership of the directories copied:</br>
|
* set the correct user ownership of the directories copied:</br>
|
||||||
`docker exec --workdir /var/www/html nextcloud-app chown -R www-data:www-data config data themes`
|
`docker exec --workdir /var/www/html nextcloud-app chown -R www-data:www-data config data themes`
|
||||||
|
|
Loading…
Reference in New Issue