Effortless Nextcloud 2024 Setup in LXC Container | Docker Compose on Proxmox Tutorial

  Рет қаралды 1,582

Francis Techworld

Francis Techworld

3 ай бұрын

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 install docker.io
sudo apt-get install gnupg
Overwrite the existing Docker GPG key just in case
curl -fsSL download.docker.com/linux/ubu... | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Add the Docker repository with the correct Ubuntu version codename
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] download.docker.com/linux/ubuntu jammy stable" | sudo tee /etc/apt/sources.list.d/docker.list
Update your package database
sudo apt-get update
Install Docker, Docker CLI, containerd, and Docker Compose
sudo apt-get install docker-ce docker-ce-cli containerd.io 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 apt-get install docker-ce docker-ce-cli containerd.io
📄 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
- domain=example.com
- extra_params=--o:ssl.enable=true
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

Пікірлер: 7
@LebedotNaPero
@LebedotNaPero 2 ай бұрын
Hey Francis, I succesfully install and run the nexcloud container, but after rebooting the LXC (I'm running Ubuntu 22.04 LXC) can't login... tried multiple installations, even on fresh LXC.I wonder if you encountered something similar? Thank you for the guide! it works really well (at least on Ubuntu 22)
@FrancisTechWorld
@FrancisTechWorld 2 ай бұрын
What is the error message? The first rule of troubleshooting is to show or capture the error message. For example, which container has an error message? Which container does not start up properly? If you observe that Redis is not running properly, you can use the following command to isolate the problem: docker restart redis. This will manually restart the container to help identify the issue. Additionally, you can check the error message of the container using: docker logs redis. The following command can be run every time the LXC reboots, which may assist in the process. crontab -e @reboot /usr/bin/docker restart redis
@LebedotNaPero
@LebedotNaPero 2 ай бұрын
Thank you for the reply. Was trying to fix this but many others have similar complaints, dating back to 2018. I ended up using the Turnkey nextcloud template. In my experience is more stable.
@cozmickitty7730
@cozmickitty7730 2 ай бұрын
Error in gpg d/l line 3 dots
@FrancisTechWorld
@FrancisTechWorld 2 ай бұрын
Which line ?
@FrancisTechWorld
@FrancisTechWorld 2 ай бұрын
Please also share the error message
@FrancisTechWorld
@FrancisTechWorld 2 ай бұрын
Hi! I am confident that it works. Have you reviewed the description in this video? I attempted it again, and it takes approximately 10 minutes to set up a new Nextcloud instance. Please give it another try. Through trial and error, you might discover and acquire new knowledge. Cheers!
Docker on Proxmox LXC 🚀 Zero Bloat and Pure Performance!
20:53
SmartHomeBeginner
Рет қаралды 36 М.
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 80 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 49 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 19 МЛН
Self Install Nextcloud In 2024 in a Proxmox Container
7:10
virtualize everything
Рет қаралды 2,9 М.
You Should Use Flakes Right Away in NixOS!
26:09
LibrePhoenix
Рет қаралды 57 М.
Best Docker Containers in 2024
12:43
VirtualizationHowto
Рет қаралды 100 М.
Proxmox LXC - How To Guide - Better Than A VM?
17:01
Jim's Garage
Рет қаралды 54 М.
Don't Use Google For Photo Backup!
14:57
Naomi Brockwell TV
Рет қаралды 79 М.
Nextcloud Hub 7 - Installation mit All-in-one AIO Methode | 2/5
17:10
pixelEDI Electronics
Рет қаралды 899
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН