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
- Create a working directory named after the service.
- Copy the compose file and generated `.env` into that directory.
- Review the variables and replace placeholders with real values.
- Run `docker compose up -d`.
mkdir nextcloud-file-sharing
cd nextcloud-file-sharing
# create docker-compose.yml
# create .env
docker compose up -d