This repository allows you to quickly deploy Nextcloud with a MariaDB database using Docker Compose. Ideal for both local testing and server use.
git clone https://github.com/your-user/nextcloud-docker.git
cd nextcloud-docker
cp .env.example .env
docker compose up -dThen open your browser: http://localhost:8080
- Nextcloud 28 (Apache-based)
- MariaDB 10.11 as the database
- Upload limit: 2 GB
- Environment variables via
.envfile - Data is persisted using named Docker volumes
All credentials and database config are stored in .env file.
Use .env.example as a template:
MYSQL_ROOT_PASSWORD=your-root-password
MYSQL_PASSWORD=your-nextcloud-password
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextclouduser⚠️ Never commit your.envfile to the public repository!- 🔒 For production use, configure HTTPS using a reverse proxy (e.g. Nginx, Traefik, or Caddy)
- 💾 Don't forget to back up your volumes regularly
- Add SMTP and email setup for password recovery
- Enable external storage (e.g. S3, GDrive)
- Configure cron jobs for optimal performance
- Setup caching (Redis, APCu)
MIT — free for personal and commercial use.