Connect Nextcloud to a Storage Server: space, quotas and shares
Nextcloud brings users, quotas and shares, the Storage Server brings the space. Together they make a cloud of your own, where a small server is enough and the terabytes live somewhere else.
Nextcloud can do everything a Storage Server cannot: manage users, assign each of them a quota of their own, share folders, create links with a password and an expiry date, and deliver files to browsers over HTTPS. What makes Nextcloud expensive, on the other hand, is the space, because it sits on the NVMe SSD of the server.
Put the two together and you get the setup that has proven itself in practice: a small server for Nextcloud, the files on a Storage Server. This article shows both ways to set it up, explains which one is better when, and names the pitfalls that show up every time.
Why this combination fits so well
| Nextcloud provides | The Storage Server provides |
|---|---|
| User accounts with a password and two-factor | Space, 1 to 20 TB |
| A quota per user | Snapshots as a second backup layer |
| Share links with a password and an expiry date | A location separate from the server |
| Delivery over HTTPS with a sign-in | A fraction of the cost per terabyte |
| Versioning and a trash bin | 100 subaccounts for separate purposes |
The decisive point for many projects: the Storage Server has no quota per subaccount. A subaccount does stay inside its own directory, but it can fill the whole plan from there. Nextcloud solves exactly that, because every user gets a hard quota there.
Two ways, and which one is the better one
Way A: Nextcloud talks to the storage itself, through its built-in SMB or SFTP driver. No change to the operating system needed.
Way B: You mount the storage in the operating system as a directory and set up an external storage of the type "Local" in Nextcloud that points at that directory.
Take way B if you have root access. Going through the file system is noticeably faster than the SFTP driver in Nextcloud, above all with a lot of small files, and it survives network glitches better. Way A is the answer if you cannot or do not want to change anything in the operating system.
Preparation: a subaccount of its own
In the customer panel, create a subaccount just for Nextcloud, with a home directory of its own, for example /nextcloud. Enable only the protocol you actually use. Also check under "Access Settings" that External Reachability is switched on, otherwise the server cannot reach the storage.
The examples use these values, replace them with your own:
| Item | Example value |
|---|---|
| Hostname | u123456.storage.kernelhost.net |
| Subaccount | u123456-sub1 |
| Share (SMB) | backup |
| SMB port | 445 |
| SFTP port | 23 |
Way B: mount it and use it as a local storage
First the mount. On Debian and Ubuntu:
apt install -y cifs-utils
mkdir -p /mnt/storage
printf 'username=u123456-sub1\npassword=YOUR_PASSWORD\n' > /etc/samba/storage.cred
chmod 600 /etc/samba/storage.cred
Then the entry in /etc/fstab, so that it survives a reboot:
//u123456.storage.kernelhost.net/backup /mnt/storage cifs credentials=/etc/samba/storage.cred,uid=www-data,gid=www-data,file_mode=0660,dir_mode=0770,seal,_netdev,nofail 0 0
The three options that matter: uid=www-data makes sure the web server is allowed to write, seal encrypts the transfer with SMB 3, and _netdev plus nofail keep the server from hanging during boot if the storage happens not to answer.
mount -a
sudo -u www-data touch /mnt/storage/test && echo "Write access is fine"
After that, enable the "External storage support" app in Nextcloud and add the storage, either in the interface under Administration, External storage, or on the command line:
sudo -u www-data php occ app:enable files_external
sudo -u www-data php occ files_external:create Data local null::null -c datadir=/mnt/storage
sudo -u www-data php occ files_external:list
The folder "Data" now shows up for the users you grant it to. You control that per user or per group, so that not everybody sees everything.
Way A: external storage straight in Nextcloud
Without root access it works without mounting as well. For SMB you need the matching PHP extension:
apt install -y smbclient php-smbclient
systemctl restart php8.3-fpm
Then create an entry under Administration, External storage:
| Field | Value |
|---|---|
| Folder name | Data |
| External storage | SMB / CIFS |
| Host | u123456.storage.kernelhost.net |
| Share | backup |
| Remote subfolder | nextcloud |
| Username | u123456-sub1 |
| Password | the password of the subaccount |
For SFTP you pick the type "SFTP" instead, enter u123456.storage.kernelhost.net as the host and 23 as the port. That is the most common source of errors on this route: Nextcloud suggests 22, our storage listens on 23.
Assigning a quota per user
Now comes the part that justifies the whole setup. Under Administration, Users you enter a quota per account, for example 50 GB. Or on the command line:
sudo -u www-data php occ user:setting photographer1 files quota "50 GB"
Nextcloud counts versions and the trash bin toward that figure. That is the right behavior, but it does catch people out: somebody who gets 50 GB and uploads 50 GB has quickly taken up more than expected through old versions. For accounts that replace a lot instead of adding, it pays off to limit how long versions are kept.
Share links for your own website
To Nextcloud the external storage is a folder like any other, so shares work unchanged. A link with a password and an expiry date takes three clicks, and the file is delivered through Nextcloud, not straight from the storage. Your credentials for the storage therefore never leave the server.
This is exactly the building block that a Storage Server on its own is missing. If you run a website with a download area, you get user management, permissions and delivery in one, without programming anything yourself. What the alternative without Nextcloud looks like is covered in Using a Storage Server for your own website.
Four pitfalls that show up every time
- The data directory does not belong on the storage. Technically possible, in practice risky: Nextcloud also writes lock files and temporary state there, and a brief network glitch takes the whole instance down. As external storage, a glitch only hits that one folder.
- The database stays local. Always. Files belong on the storage, nothing else.
- Set up Redis. Without a cache for file locks, Nextcloud with external storage gets noticeably slow, because every lock goes through the database.
- Port 23 instead of 22. With SFTP, Nextcloud suggests 22. Our storage listens on 23, and the error message about it is not much help.
Which server and which plan
For Nextcloud itself a small machine is enough. The files live somewhere else, the server only manages them: for a handful up to a few dozen active users, 4 to 8 GB of RAM is enough, provided Redis is running and the background job is set up. A guide for that is in Installing Nextcloud on your own server.
With the storage, the choice comes down to space:
| Plan | Space | Snapshots | Price |
|---|---|---|---|
| Storage-1 | 1 TB | 10 plus 10 automatic | 9.99 EUR |
| Storage-2 | 5 TB | 20 plus 20 automatic | 29.99 EUR |
| Storage-3 | 10 TB | 30 plus 30 automatic | 39.99 EUR |
| Storage-4 | 20 TB | 40 plus 40 automatic | 69.99 EUR |
All Storage Servers are located in Germany, speak SMB, SFTP, WebDAV and more, allow up to 100 subaccounts and come with snapshots. No setup fee, PrePaid, no minimum term. If your need for space grows, you move up to the larger plan without touching the data.
Frequently asked questions
Why not simply take a big server with a lot of disk space?
Should I use SMB or SFTP?
Can I give every user a size of their own?
Can I put the data directly on the storage instead of using external storage?
Do share links work for files on the storage as well?
How fast is this?
What happens if the storage is briefly unreachable?
Do I need a database on the storage?
How many users can a small server handle?
What does the combination cost?
2026 KernelHost GmbH. All rights reserved. This guide is protected by copyright. Republishing it on other websites, in whole, in part or in edited form, is not permitted without our written consent. Quoting with a source credit and a link is expressly welcome.

