filmov
tv
Effortless Nextcloud 2024 Setup in LXC Container | Docker Compose on Proxmox Tutorial
Показать описание
Join me in this comprehensive guide as we set up Nextcloud in an LXC container using Docker Compose on Proxmox. I'll walk you through each step, ensuring you can follow along and get your private cloud up and running in no time.
📝 Commands used in the video:
```bash
sudo apt-get update
sudo apt upgrade
sudo apt install curl
sudo apt-get install gnupg
# Overwrite the existing Docker GPG key just in case
# Add the Docker repository with the correct Ubuntu version codename
# Update your package database
sudo apt-get update
# Install Docker, Docker CLI, containerd, and Docker Compose
sudo systemctl start docker
docker-compose up -d
docker exec -u root nextcloud chown -R www-data:www-data /var/www/html/data
sudo systemctl start docker
sudo apt-get update
sudo systemctl start docker
📄 Docker Compose YML:
services:
nextcloud:
image: nextcloud
container_name: nextcloud
restart: unless-stopped
networks:
- cloud
depends_on:
- nextclouddb
- redis
ports:
- 8080:80
volumes:
- ./html:/var/www/html
- ./custom_apps:/var/www/html/custom_apps
- ./config:/var/www/html/config
- ./data:/var/www/html/data
environment:
- PUID=1000
- PGID=1000
- TZ=TZ='Asia/Hong_Kong'
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=dbpassword
- MYSQL_HOST=nextclouddb
- REDIS_HOST=redis
nextclouddb:
image: mariadb
container_name: nextcloud-db
restart: unless-stopped
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
networks:
- cloud
volumes:
- ./nextclouddb:/var/lib/mysql
environment:
- PUID=1000
- PGID=1000
- TZ='Asia/Hong_Kong'
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_PASSWORD=dbpassword
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
collabora:
image: collabora/code
container_name: collabora
restart: unless-stopped
networks:
- cloud
environment:
- PUID=1000
- PGID=1000
- TZ='Asia/Hong_Kong'
- password=password
- username=nextcloud
ports:
- 9980:9980
redis:
image: redis:alpine
container_name: redis
volumes:
- ./redis:/data
networks:
- cloud
nginx-proxy:
image: 'jc21/nginx-proxy-manager:latest'
container_name: nginx-proxy
environment:
- PUID=1000
- PGID=1000
- TZ='Asia/Hong_Kong'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
cloud:
name: cloud
driver: bridge
📝 Commands used in the video:
```bash
sudo apt-get update
sudo apt upgrade
sudo apt install curl
sudo apt-get install gnupg
# Overwrite the existing Docker GPG key just in case
# Add the Docker repository with the correct Ubuntu version codename
# Update your package database
sudo apt-get update
# Install Docker, Docker CLI, containerd, and Docker Compose
sudo systemctl start docker
docker-compose up -d
docker exec -u root nextcloud chown -R www-data:www-data /var/www/html/data
sudo systemctl start docker
sudo apt-get update
sudo systemctl start docker
📄 Docker Compose YML:
services:
nextcloud:
image: nextcloud
container_name: nextcloud
restart: unless-stopped
networks:
- cloud
depends_on:
- nextclouddb
- redis
ports:
- 8080:80
volumes:
- ./html:/var/www/html
- ./custom_apps:/var/www/html/custom_apps
- ./config:/var/www/html/config
- ./data:/var/www/html/data
environment:
- PUID=1000
- PGID=1000
- TZ=TZ='Asia/Hong_Kong'
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=dbpassword
- MYSQL_HOST=nextclouddb
- REDIS_HOST=redis
nextclouddb:
image: mariadb
container_name: nextcloud-db
restart: unless-stopped
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
networks:
- cloud
volumes:
- ./nextclouddb:/var/lib/mysql
environment:
- PUID=1000
- PGID=1000
- TZ='Asia/Hong_Kong'
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_PASSWORD=dbpassword
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
collabora:
image: collabora/code
container_name: collabora
restart: unless-stopped
networks:
- cloud
environment:
- PUID=1000
- PGID=1000
- TZ='Asia/Hong_Kong'
- password=password
- username=nextcloud
ports:
- 9980:9980
redis:
image: redis:alpine
container_name: redis
volumes:
- ./redis:/data
networks:
- cloud
nginx-proxy:
image: 'jc21/nginx-proxy-manager:latest'
container_name: nginx-proxy
environment:
- PUID=1000
- PGID=1000
- TZ='Asia/Hong_Kong'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
cloud:
name: cloud
driver: bridge
Комментарии