How to install nextcloud on docker

preview_player
Показать описание
In this video I show you how to install and configure nexcloud on docker with ssl certificates and nginx reverse proxy!

###### Nexcloud docker compose ######
---
services:
nextcloud:
container_name: nextcloud
environment:
- PUID=1000
- PGID=1000
- TZ=America/Toronto
networks:
- nginx-proxy_frontend
- backend
volumes:
- ./config:/config
- ./data:/data
restart: unless-stopped

mariadb:
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_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
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:
volumes_from:
- nginx-proxy
volumes:
- ./certs:/etc/nginx/certs:rw
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 ######

'trusted_proxies' = ['172.19.0.2'],
'overwriteprotocol' = 'https',

(add a "greater than" symbol after the = sign)

###### Vhost additional configuration ######

location /.well-known/carddav {
}

location /.well-known/caldav {
}

location ^~ /browser {
proxy_set_header Host $http_host;
}

location ^~ /hosting/discovery {
proxy_set_header Host $http_host;
}

location ^~ /hosting/capabilities {
proxy_set_header Host $http_host;
}

location ~ ^/cool/(.*)/ws$ {
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_set_header Host $http_host;
}

location ^~ /cool/adminws {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}

###### Upload limit configuration ######

client_max_body_size 0;
client_body_timeout 120s;

#nextcloud #nginx #reverseproxy #docker #linux #opensource #rockylinux #sysadmin
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
Рекомендации по теме
Комментарии
Автор

Great and usefull content as ALWAYS!! thanks for sharing!!!

YofuMedia
Автор

On the firewall configuration part, what if our ISP doesn't have port forwarding? What are our options?

kqlbhis
Автор

Thank you for the video, just a small observation, in the title the t in nextcloud is missing, keep it up! 😊

razvanel
Автор

very nice tutorial. new learning for me. Im really excited during config only to find out that i need to have an active domain first for everything to work properly. I just got my domain name still need to set it up . Any suggestion and how to proceed. Thanks for sharing. until next time.

mandy.coralde
Автор

i am really interesting, why did u block Ukraine and Estonia ?

kmar
Автор

Why isn’t there a consistent way to install this software. I doubt this guy would be even able to install it in any other system.

cyrilpinto