Open Source

Nextcloud instead of public clouds: when a self-hosted cloud makes sense for a business

A self-hosted Nextcloud gives the company control over its files but needs maintenance. I cover who it suits, what it takes to run reliably and what moving from a public cloud storage service looks like.

Alexei Sergeev 3 min read

Company files often live in several places at once: some in a public cloud on employees' personal accounts, some in a shared folder on the server, some in email. When an employee leaves, documents sometimes leave with them. A self-hosted cloud on Nextcloud is one way to bring everything together under the company's control.

What Nextcloud is

Nextcloud is an open-source collaboration platform you install on your own server. Out of the box, it is file storage with sync to computers and phones, sharing via links, calendars and contacts. Collaborative document editing, tasks and video calls can be added.

For users it looks much like the clouds they are used to: a folder on the computer that syncs, plus a web interface.

Who it suits

  • Companies that care where their data is physically stored and who has access to it.
  • Those who want to manage access centrally: create an account for a new employee and disable it when they leave.
  • Those who already have a server and a person or contractor who maintains it.

And who it most likely does not suit: a company of a couple of people with no server infrastructure and no wish to deal with maintenance. A self-hosted cloud is not set-and-forget; it is a service that needs updates and backups.

What it takes to run reliably

  1. A server. Your own in the office or rented in a data centre. A modest virtual machine is enough for a small team; the main question is disk space for files.
  2. A domain name and TLS certificate. Connections over HTTPS only.
  3. Backups. Of both the files and the Nextcloud database, off this server, with restore testing.
  4. Updates. Nextcloud regularly ships security updates; they need to be installed, with a backup taken before each update.
  5. Monitoring. Free space, availability, certificate expiry.
  6. Single sign-on. If there are several services, it is convenient to connect Nextcloud to a shared account system (for example, Keycloak or LDAP).

I deploy Nextcloud in containers, which makes it easier to update and move. A simplified base looks like this (a real installation adds Redis for caching, background jobs and a reverse proxy with a certificate):

docker-compose.yml
services:
  db:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_DB: nextcloud
      POSTGRES_USER: nextcloud
      POSTGRES_PASSWORD_FILE: /run/secrets/db_password
    volumes:
      - db:/var/lib/postgresql/data
    secrets: [db_password]

  app:
    image: nextcloud:stable
    restart: unless-stopped
    depends_on: [db]
    environment:
      POSTGRES_HOST: db
      POSTGRES_DB: nextcloud
      POSTGRES_USER: nextcloud
      POSTGRES_PASSWORD_FILE: /run/secrets/db_password
      NEXTCLOUD_TRUSTED_DOMAINS: cloud.example.com
    volumes:
      - data:/var/www/html
    secrets: [db_password]

volumes:
  db:
  data:

secrets:
  db_password:
    file: ./secrets/db_password.txt

How the move works

I plan a move from a public cloud or a shared folder so that work does not stop:

  1. Inventory: which folders, who has access, how much data.
  2. Deploying and configuring Nextcloud, backups and monitoring.
  3. Folder structure and access groups: better thought through in advance than reworked after the move.
  4. A pilot with a small group of employees.
  5. Moving the data and switching everyone else over, with a short guide for staff.
  6. The old storage stays read-only during the transition period.

Nextcloud is just one of the open-source services you can run yourself: mail, a corporate messenger, single sign-on. More on the Open Source for business page.

Considering your own cloud for the company?

Tell me where your files are stored now and how many employees work with them. I will help you assess whether Nextcloud fits and plan the move.

Discuss your task

Alexei SergeevEngineer, IT infrastructure and DevOps

Read next

Business email on your own domain: your own server or a cloud service

I compare running your own mail server with cloud email for a company: who each option suits, which DNS settings keep your mail out of spam, and how to move mailboxes without losing messages.

Office network segmentation on MikroTik: VLANs for staff, guests and servers

Why a flat network where every device sees every other one is the main source of trouble in a small office, and how to split it into VLANs on MikroTik with RouterOS 7: the layout, bridge configuration, firewall rules an…

Backup internet for the office: two ISPs and automatic failover on MikroTik

How to set up a second internet connection so the office switches to it automatically and back again when the main provider recovers. Recursive routing on MikroTik, reachability checks and the pitfalls.