scripts/install-nextcloud-aio.sh

31 lines
835 B
Bash
Raw Permalink Normal View History

2025-07-08 19:07:26 +00:00
#!/bin/bash
set -e
echo "📦 Installing Nextcloud All-in-One..."
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "🚨 Docker not found. Installing Docker..."
curl -fsSL https://get.docker.com | sh
sudo systemctl enable docker
sudo systemctl start docker
fi
# Create a directory for Nextcloud AIO
mkdir -p /opt/nextcloud-aio
cd /opt/nextcloud-aio
# Pull and start the Nextcloud AIO container
docker run -d \
--name nextcloud-aio-mastercontainer \
--restart=always \
-p 80:80 \
-p 443:443 \
-v nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
echo "✅ Nextcloud AIO Mastercontainer started."
echo "🌐 Open https://$(hostname -I | awk '{print $1}') in your browser to finish setup."