MirrorNest
← Todas las guías

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.

Sistema: Any Docker hostStorageFile SyncCollaborationSitio oficial ↗Documentación oficial ↗
Esta guía se elaboró a partir de la documentación oficial de Nextcloud (Docker), enlazada arriba — verifica siempre ahí los nombres exactos de paquetes/versiones antes de ejecutar estos comandos en un servidor de producción, ya que las versiones de la distribución y del proyecto cambian con el tiempo.
  1. 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: EOF

    Replace changeme-root and changeme-db with real passwords before starting -- these are written into the running containers' environment.

  2. 2Start it

    docker compose up -d
  3. 3Complete 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>:8080
  4. 4Put 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.