Self-Host Nextcloud on Windows Using Docker
Introduction
Welcome to Agam's Tech Tricks! In this tutorial, we'll walk you through the process of self-hosting Nextcloud, a file hosting and sharing service, on Windows using Docker.
Overview of Docker and Nextcloud
- Docker: A platform that containerizes applications, allowing them to run in isolated environments.
- Nextcloud: A file hosting and sharing service that can be managed and used via Docker.
Prerequisites
- Windows 10 Home Edition (using WSL method)
- Virtualization Enabled: Ensure virtualization is turned on in BIOS.
Step 1: Enable Required Windows Features
- Open Windows Features:
- Go to
Turn Windows features on or off.
- Enable Features:
- Check the following options:
Windows Subsystem for Linux
Virtual Machine Platform
- Apply Changes:
- Click
OK.
- Restart your computer if prompted.
Step 2: Install Docker Desktop
- Download Docker Desktop:
- Run Installer:
- Open the downloaded file.
- Allow the installer to make changes to your system by clicking
Yes in the User Account Control prompt.
- Follow Installation Prompts:
- Select options to install required components for WSL 2.
- Choose to add a shortcut to the desktop if desired.
- Complete Installation:
- Docker Desktop will install. You may need to log out and log back in or close the installer.
Step 3: Set Up Docker Desktop
- Open Docker Desktop:
- Launch Docker Desktop from your Start Menu or desktop shortcut.
- Wait for Docker Desktop to initialize.
- Verify Installation:
- Ensure Docker Desktop is running and no containers are pulled initially.
Step 4: Install Nextcloud
- Prepare Command:
- Run Command:
- Open PowerShell or another terminal.
- Copy and paste the provided command to download and start the Nextcloud Docker image.
- Example command:
docker run -d -p 8080:80 nextcloud
- Wait for the image to download and start.
Step 5: Access and Configure Nextcloud
- Check Docker Desktop:
- Open Docker Desktop to confirm that Nextcloud is running.
- Access Nextcloud:
- Open a web browser and go to
http://localhost:8080.
- Set Up Admin Account:
- Create an admin account by entering the username and password.
- Choose the database setup (e.g., SQLite).
- Click
Install to complete the setup.
Conclusion
Congratulations! You've successfully set up Nextcloud on Windows using Docker. Enjoy your self-hosted file-sharing service!