← Alle Anleitungen
Nextcloud (Docker)
A free, open-source, self-hosted file sync/share and collaboration platform -- your own private alternative to Google Drive/Dropbox, run via the official Docker image.
Zielsystem: Any Docker hostStorageFile SyncCollaborationOffizielle Website ↗Offizielle Dokumentation ↗
Diese Anleitung basiert auf der offiziellen Dokumentation von Nextcloud (Docker), oben verlinkt — überprüfe dort immer die genauen Paket-/Versionsnamen, bevor du diese Befehle auf einem Produktionsserver ausführst, da sich Distributions- und Projektversionen mit der Zeit ändern.
1Create a Docker Compose file
Nextcloud needs a database -- this compose file runs it alongside MariaDB, both with persistent volumes.
cat > docker-compose.yml <<'EOF' services: db: image: mariadb:11 restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: changeme-root MYSQL_DATABASE: nextcloud MYSQL_USER: nextcloud MYSQL_PASSWORD: changeme-db volumes: - db_data:/var/lib/mysql app: image: nextcloud:latest restart: unless-stopped ports: - "8080:80" environment: MYSQL_HOST: db MYSQL_DATABASE: nextcloud MYSQL_USER: nextcloud MYSQL_PASSWORD: changeme-db volumes: - nc_data:/var/www/html depends_on: - db volumes: db_data: nc_data: EOFReplace changeme-root and changeme-db with real passwords before starting -- these are written into the running containers' environment.
2Start it
docker compose up -d3Complete the setup wizard
Create the admin account on first visit -- the database connection is already configured via the environment variables above.
http://<the-server's-ip>:80804Put it behind a reverse proxy with HTTPS before real use
Nextcloud syncs files and credentials -- don't leave it on plain HTTP for anything beyond local testing. See the Nginx + Let's Encrypt guide in this section.