---
title: "Install Nextcloud on a VPS: A Private File Cloud for Your Company"
description: "**In short**Nextcloud is an open-source file cloud: sync, sharing, calendars and contacts for your team, with files on **your own server**. Run it with Docker and **MariaDB** behind **Caddy** for HTTPS. Storage usually decides the plan, so size the disk…"
url: "https://www.hyyat.com/en/knowledgebase/install-nextcloud-on-vps/"
updated: "2026-11-28"
category: Server management / Servers Without a Control Panel
---

# Install Nextcloud on a VPS: A Private File Cloud for Your Company

**In short**Nextcloud is an open-source file cloud: sync, sharing, calendars and contacts for your team, with files on **your own server**. Run it with Docker and **MariaDB** behind **Caddy** for HTTPS. Storage usually decides the plan, so size the disk to your team's files.

![Installing Nextcloud on a VPS](https://www.hyyat.com/wp-content/uploads/2026/11/hkb-vu-hero-vu-nextcloud-en.webp)

Companies that exchange contracts, designs and reports need one organised place for files, with clear permissions per employee. Nextcloud provides that, with phone and desktop apps that sync files automatically, and the data sits on a server you control.

## Choosing resources

| Use | Suitable plan | Why |
| --- | --- | --- |
| A small team with office files | VPS 4GB | Enough memory, 60GB disk to start |
| A mid-size team with images and designs | VPS 8GB | 100GB disk and faster previews |
| Many files or video | VPS 16GB | 200GB disk, or add external storage |

## 1. Install Docker

```
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
docker compose version
```

## 2. The docker-compose file

```
mkdir -p /opt/nextcloud && cd /opt/nextcloud
```

```
services:
  db:
    image: mariadb:11
    restart: unless-stopped
    command: --transaction-isolation=READ-COMMITTED
    environment:
      - MARIADB_ROOT_PASSWORD=strong-password-1
      - MARIADB_DATABASE=nextcloud
      - MARIADB_USER=nextcloud
      - MARIADB_PASSWORD=strong-password-2
    volumes:
      - db:/var/lib/mysql
  app:
    image: nextcloud:apache
    restart: unless-stopped
    depends_on:
      - db
    environment:
      - MYSQL_HOST=db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=strong-password-2
      - NEXTCLOUD_TRUSTED_DOMAINS=cloud.example.com
      - OVERWRITEPROTOCOL=https
    volumes:
      - nextcloud:/var/www/html
  caddy:
    image: caddy:2
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
volumes:
  db:
  nextcloud:
  caddy_data:
```

And the `Caddyfile`:

```
cloud.example.com {
    reverse_proxy app:80
}
```

## 3. Start and first setup

```
docker compose up -d
```

Open `https://cloud.example.com`, create the admin account, then add team accounts and shared folders for each department. Install the Nextcloud apps on phones and computers to sync.

## Backups

- A snapshot from the VPS control panel before every update.
- A regular copy of the data folder and database to a location off the server.
- Upgrade Nextcloud one major version at a time; do not skip versions.

 **A mistake to avoid:** Treating Nextcloud as a backup. Sync also spreads deletions: if an employee deletes a folder, it disappears from every device. Turn on the trash bin and file versions, and keep a separate backup. **At Hyyat Host:** NVMe VPS servers with up to 200GB for your company file cloud: [VPS plans](https://www.hyyat.com/en/vps-hosting/), with our own control panel for power, console and snapshots, and Arabic and English support.

## Frequently asked questions

   Is Nextcloud an alternative to Google Drive?

It offers file sync and sharing, calendars and contacts; the difference is that the data is on your server and you are responsible for its upkeep and backups.

   How many users can it handle?

For small and mid-size teams, a 4GB to 8GB plan is usually enough; storage is what needs more planning.

   Can I add storage later?

Yes, by upgrading to a larger plan or adding external storage and connecting it to Nextcloud.

   **Related guides**

- [Docker Compose Generator for WordPress and Apps](https://www.hyyat.com/en/docker-compose-generator/)
- [New VPS Setup Commands, Step by Step](https://www.hyyat.com/en/vps-setup-script/)
- [Firewall: Control the Open Ports on Your VPS](https://www.hyyat.com/en/knowledgebase/vps-firewall-manage-open-ports/)
- [When Should You Move from Shared Hosting to a VPS? 7 Clear Signs](https://www.hyyat.com/en/knowledgebase/when-to-move-from-shared-hosting-to-vps/)

[All guides for servers without a panel →](https://www.hyyat.com/en/kb/servers-without-control-panel/)

  **Need this service from Hyyat Host?**Our team handles it for you, with support replying to tickets within 24 hours at most.[Server Management](https://www.hyyat.com/en/server-management/)
