How to install nextcloud on docker

How to install nextcloud on docker

6.492 Lượt nghe
How to install nextcloud on docker
In this video I show you how to install and configure nexcloud on docker with ssl certificates and nginx reverse proxy! Join Discord: https://discord.gg/aj5FhGhcMy ###### Nexcloud docker compose ###### --- services: nextcloud: image: lscr.io/linuxserver/nextcloud:28.0.2-ls300 container_name: nextcloud environment: - VIRTUAL_HOST=cloud.yourdomain.com - LETSENCRYPT_HOST=cloud.yourdomain.com - PUID=1000 - PGID=1000 - TZ=America/Toronto networks: - nginx-proxy_frontend - backend volumes: - ./config:/config - ./data:/data restart: unless-stopped mariadb: image: lscr.io/linuxserver/mariadb:10.11.6-r0-ls130 container_name: mariadb environment: - PUID=1000 - PGID=1000 - TZ=America/Toronto - MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD - MYSQL_DATABASE=USER_DB_NAME - MYSQL_USER=MYSQL_USER - MYSQL_PASSWORD=DATABASE_PASSWORD networks: backend: ipv4_address: 172.16.0.10 volumes: - ./db_conf:/config restart: unless-stopped collabora: image: collabora/code:23.05.8.4.1 container_name: collabora environment: - VIRTUAL_HOST=collabora.yourdomain.com - LETSENCRYPT_HOST=collabora.yourdomain.com - VIRTUAL_PORT=9980 - VIRTUAL_PROTO=https networks: nginx-proxy_frontend: ipv4_address: 172.19.0.14 restart: unless-stopped networks: nginx-proxy_frontend: external: true backend: driver: bridge ipam: config: - subnet: 172.16.0.0/16 gateway: 172.16.0.1 ###### Databse Secrets ###### MYSQL_ROOT_PASSWORD="jB8QHjxo7zkb" MYSQL_DATABASE="cloud_main" MYSQL_USER="admin" MYSQL_PASSWORD="Yvj9g9589LWq ###### Nginx reverse proxy compose ###### --- services: nginx-proxy: image: nginxproxy/nginx-proxy:1.4.0 container_name: nginx-proxy ports: - "80:80" - "443:443" volumes: - ./conf:/etc/nginx/conf.d - ./vhost:/etc/nginx/vhost.d - ./html:/usr/share/nginx/html - ./certs:/etc/nginx/certs:ro - /var/run/docker.sock:/tmp/docker.sock:ro networks: frontend: ipv4_address: 172.19.0.2 restart: unless-stopped acme-companion: image: nginxproxy/acme-companion:2.2.10 container_name: nginx-proxy-acme environment: - [email protected] volumes_from: - nginx-proxy volumes: - ./certs:/etc/nginx/certs:rw - ./acme:/etc/acme.sh - /var/run/docker.sock:/var/run/docker.sock:ro networks: - frontend restart: unless-stopped networks: frontend: driver: bridge ipam: config: - subnet: 172.19.0.0/16 gateway: 172.19.0.1 ###### Nexcloud php configuration ###### /opt/docker/nextcloud/config/www/nextcloud/config/config.php 'trusted_proxies' = ['172.19.0.2'], 'overwritehost' = 'cloud.gamexplicit.com', 'overwriteprotocol' = 'https', (add a "greater than" symbol after the = sign) ###### Vhost additional configuration ###### /opt/docker/nginx-proxy/vhost/cloud.yourdomain.com location /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; } location /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; } /opt/docker/nginx-proxy/vhost/collabora.yourdomain.com location ^~ /browser { proxy_pass https://collabora.yourdomain.com; proxy_set_header Host $http_host; } location ^~ /hosting/discovery { proxy_pass https://172.19.0.14:9980; proxy_set_header Host $http_host; } location ^~ /hosting/capabilities { proxy_pass https://172.19.0.14:9980; proxy_set_header Host $http_host; } location ~ ^/cool/(.*)/ws$ { proxy_pass https://172.19.0.14:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } location ~ ^/(c|l)ool { proxy_pass https://172.19.0.14:9980; proxy_set_header Host $http_host; } location ^~ /cool/adminws { proxy_pass https://172.19.0.14:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } ###### Upload limit configuration ###### upload_limit.conf client_max_body_size 0; client_body_timeout 120s; For business inqueries or consultation send me an email to: [email protected] 0:00 - Public domain configuration 1:30 - Nginx reverse proxy docker compose 4:40 - Nextcloud docker compose 10:34 - MariaDB secrets configuration 11:26 - Run Nginx reverse proxy 11:50 - Firewall configuration 13:25 - Run Nextcloud container 14:08 - Nextcloud dashboard config 16:42 - Nexcloud security config 19:08 - Proxy upload limit config 20:20 - Additional proxy config 22:25 - Bring all containers up 22:46 - Nextcloud upload testing 23:38 - Collabora config 25:08 - Collabora testing