Got it 👍 You want to set up Nextcloud in Docker on Windows. I’ll walk you through a step-by-step guide from scratch.
1. Install Requirements
-
Install Docker Desktop for Windows:
👉 Download here-
Make sure WSL 2 is enabled (Docker will ask during installation).
-
Restart after installation.
-
Open Docker Desktop and confirm it’s running.
-
-
Optional: Install Git (if you want to clone a ready-made config).
👉 Download Git
2. Prepare a Folder
-
Create a folder where you’ll keep Nextcloud setup files, for example:
C:\nextcloud-docker
3. Create a docker-compose.yml
Inside C:\nextcloud-docker, create a file named docker-compose.yml with this content:
version: '3'
services:
db:
image: mariadb:11
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=example_root_password
- MYSQL_PASSWORD=example_password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud
ports:
- 8080:80
links:
- db
volumes:
- nextcloud:/var/www/html
restart: always
volumes:
db:
nextcloud:
4. Start Nextcloud
-
Open PowerShell in the folder (
Shift + Right Click > Open PowerShell window here). -
Run:
docker-compose up -d -
Wait for images to download and containers to start.
5. Access Nextcloud
-
Open a browser and go to:
👉http://localhost:8080 -
On first setup, it will ask:
-
Admin username + password (you create this).
-
Database: choose MySQL/MariaDB
-
Database user:
nextcloud -
Database password:
example_password -
Database name:
nextcloud -
Host:
db
-
-
Click Finish Setup. 🎉 Now Nextcloud will be running.
6. Manage Nextcloud
-
Stop Nextcloud:
docker-compose down -
Start again:
docker-compose up -d -
Check logs:
docker-compose logs -f
⚡ That’s it! You now have a working Nextcloud running in Docker on Windows.
Would you like me to also show you how to add persistent storage mapped to your Windows folder (so your Nextcloud files are stored in C:\nextcloud-data instead of inside the Docker volume)?
Comments
Post a Comment