
Nextcloud is a powerful open-source platform for your own private cloud — file hosting, calendars, contacts, and much more. The recommended installation method is Docker Compose, as it neatly encapsulates all required services in containers.
Log in to your server via SSH, create a directory for Nextcloud, and open the Compose file:
Paste the following content into the file. Replace the password placeholders with your own secure values — more on this in Step 2.
Before proceeding, replace both placeholders in the file with your own secure passwords:
| Placeholder | Description |
|---|---|
| YOUR_STRONG_ROOT_PASSWORD | Root password for MariaDB — used internally only |
| YOUR_STRONG_MYSQL_PASSWORD | Password for the Nextcloud database user — must be identical in both db and app |
The MYSQL_PASSWORD must be exactly the same in both the db and app services — otherwise Nextcloud will not be able to connect to the database.
Start the entire Nextcloud stack with a single command. Docker will pull the required images and start all containers in the background.
The -d flag stands for "detached mode" — the containers run in the background without blocking your terminal session.
Once the containers are running, Nextcloud is accessible in your browser. Open:
http://YOUR_SERVER_IP:8080
| Field | Value |
|---|---|
| Database user | nextcloud |
| Database password | YOUR_STRONG_MYSQL_PASSWORD |
| Database name | nextcloud |
| Database host | db |
Click Finish setup. After a few moments you will be logged in to your new Nextcloud instance.
For a production-ready setup, you should not access Nextcloud permanently via IP address and port 8080. A reverse proxy routes traffic from your domain and enables HTTPS encryption — allowing you to reach Nextcloud securely via an address like https://cloud.yourdomain.com.
Common tools for this are Nginx Proxy Manager, Traefik, or Caddy. All three can also run as Docker containers and integrate well with this setup.
For detailed configuration options and advanced setup scenarios, we recommend the official Nextcloud documentation.