
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.
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.