Nextcloud is a self-hosted platform for storing files, calendars, and contacts that can be deployed on your own VDS as an alternative to cloud services like Google Drive. All the data stays on a server that the owner rents and administers, not a third-party company.
Why run Nextcloud on your own VDS
The main reason to move a file cloud to your own server is control over where the data physically sits, and no storage limit imposed by a third-party plan. The available disk space is limited only by the VDS's own disk, not by a subscription tier.
Nextcloud fits a team or a family that needs shared files, a calendar, and contacts in one place. For a single user who only needs to sync a couple of folders, running a separate server is overkill — a ready cloud service is simpler.
What the server needs for Nextcloud
Nextcloud is deployed through Docker — setting up Docker on a VDS is covered in the article on setting up Docker on a VPS. The standard set of web server, PHP, and database containers comes up with a single Docker Compose command.
For several active users with the calendar and notes apps enabled, 2 to 4 GB is comfortable. Disk space depends only on the volume of files that will be stored, and needs to be sized separately for the specific case.
Comparing Nextcloud with cloud storage
On basic file storage functions the difference between Nextcloud and a ready cloud is small; it shows up in who is responsible for the infrastructure.
| Parameter | Cloud service | Nextcloud on your own VDS |
|---|---|---|
| Where the data is stored | on the cloud provider's servers | on your own server |
| Storage limit | depends on the provider's plan | depends on the VDS disk |
| Updates and backups | handled by the provider | handled by the server administrator |
| Apps (calendar, notes, chat) | separate services | modules inside one system |
Installation and domain setup
Nextcloud's files and settings are described in one docker-compose.yml together with the database container.
# Running Nextcloud and MariaDB through Docker Compose
docker compose up -d
# By default Nextcloud listens on port 80, the domain is connected through a reverse proxy
After the containers start, the remaining steps are to attach a domain and issue an SSL certificate so Nextcloud opens over HTTPS on port 443 — how to do that with Nginx and Certbot is covered in the article on setting up SSL on Nginx.
What to do when Nextcloud is slow or will not open
Most performance and availability problems come down to a handful of checks.
- Check the PHP log — the
upload_max_filesizelimit (2 MB by default) andpost_max_size(8 MB by default) often need to be raised by hand to upload larger files. - Make sure background jobs run through system cron every 5 minutes, instead of the web cron, which only works while a page is open.
- Check free disk space — Nextcloud stops accepting new files once the disk is nearly full.
- Check the app log in the Administration section — it shows errors for specific modules.
- Set up a backup of the data to external storage — how to connect it through rclone is covered in the article on backing up a VPS to cloud storage.
Frequently asked questions
Does Nextcloud need a dedicated server?
No, Nextcloud can run on the same VDS where other containers are already running, as long as the server has enough resources and the ports do not conflict with other services.
What happens to the files if the VDS fails?
Without a separate backup, the files are lost along with the server's disk — which is exactly why a backup should be kept somewhere other than the same VDS, in separate storage.
Can mobile apps connect to Nextcloud?
Yes, Nextcloud has official apps for syncing files, calendar, and contacts that connect to the server at the same address as the web interface.