Nextcloud File Sharing

Run Nextcloud with Docker Compose for secure, self-hosted file storage and collaboration. Includes persistent data and a simple configuration for quick deployment.

yaml

docker-compose.yml

services:
  nextcloud:
    image: nextcloud:31-apache
    restart: unless-stopped
    ports:
      - ${NEXTCLOUD_PORT}:80
    volumes:
      - nextcloud_data:/var/www/html
volumes:
  nextcloud_data:

.ENV

.env example

NEXTCLOUD_PORT=8080

deployment

Quick Start

  1. Create a working directory named after the service.
  2. Copy the compose file and generated `.env` into that directory.
  3. Review the variables and replace placeholders with real values.
  4. Run `docker compose up -d`.
mkdir nextcloud-file-sharing
cd nextcloud-file-sharing
# create docker-compose.yml
# create .env
docker compose up -d