How to install nextcloud on docker

  Рет қаралды 2,098

Distro Domain

7 ай бұрын

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:
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:
- DEFAULT_EMAIL=youremail@email.com
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 collabora.yourdomain.com;
proxy_set_header Host $http_host;
}
location ^~ /hosting/discovery {
proxy_pass 172.19.0.14:9980;
proxy_set_header Host $http_host;
}
location ^~ /hosting/capabilities {
proxy_pass 172.19.0.14:9980;
proxy_set_header Host $http_host;
}
location ~ ^/cool/(.*)/ws$ {
proxy_pass 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 172.19.0.14:9980;
proxy_set_header Host $http_host;
}
location ^~ /cool/adminws {
proxy_pass 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: info@distrodomain.com
#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

Пікірлер: 17
@YofuMedia
@YofuMedia 7 ай бұрын
Great and usefull content as ALWAYS!! thanks for sharing!!!
@distrodomain
@distrodomain 7 ай бұрын
Glad you enjoyed it!
@mandy.coralde
@mandy.coralde 3 ай бұрын
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.
@distrodomain
@distrodomain 3 ай бұрын
If you have your domain, point the domain to your public ip from home, you can find it by googleing "what's my ip", then you can follow the video, thank you for watching!
@blazenetwork242
@blazenetwork242 7 ай бұрын
Love your videos!! Keep it up 🎉
@distrodomain
@distrodomain 7 ай бұрын
Thank you, Will do! thank you for watching :)
@razvanel
@razvanel 7 ай бұрын
Thank you for the video, just a small observation, in the title the t in nextcloud is missing, keep it up! 😊
@distrodomain
@distrodomain 6 ай бұрын
Thank You I corrected it, also thank you for watching! :)
@k0mar12
@k0mar12 7 ай бұрын
i am really interesting, why did u block Ukraine and Estonia ?
@distrodomain
@distrodomain 6 ай бұрын
Mostly hacking activity, I blocked a few other contries like china specially if you have smart devices at home, thank you for watching! :)
@MIKA-rz9fq
@MIKA-rz9fq 7 ай бұрын
GameXplicit Nostalgia !
@YofuMedia
@YofuMedia 7 ай бұрын
jajaja ahora dilo sin llorar... jajaja
@cyrilpinto418
@cyrilpinto418 Ай бұрын
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.
@distrodomain
@distrodomain Ай бұрын
That's the beauty of docker you can take the folder copy it another machine, and the just run docker compose up -d, and you are up and running, thank you for watching
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 12 МЛН
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26
Зу-зу Күлпаш 2. Бригадир.
43:03
ASTANATV Movie
Рет қаралды 752 М.
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 109 МЛН
Whats the best laptop? 💻
0:38
Adhemz
Рет қаралды 10 МЛН
The damaged battery head isrepaired. #Battery #Repair
0:21
Hak Hang
Рет қаралды 36 МЛН
moto tag - AirTag для Android
0:47
Rozetked
Рет қаралды 276 М.
Смартфоны через 10 лет
0:12
История одного вокалиста
Рет қаралды 1,3 МЛН
Телефон - самая грязная ваша вещь
0:24
Up Your Brains
Рет қаралды 2,6 МЛН