Because Nextcloud is self-hosted software rather than a service, you decide when, where, and how it runs, and Nextcloud Files, Talk, Office, Groupware, and Flow all keep working without an outside connection. Even Nextcloud Assistant can be run air-gapped, as long as you use a locally hosted AI model.
This guide walks you through planning, installing, configuring, and maintaining Nextcloud in an air-gapped environment.
Table of contents
Step 1: Choose your air-gap model
„Air-gapped“ can mean different levels of isolation, and Nextcloud works with all of them:
Limiting some internet traffic
Routing all traffic through a VPN
Running purely on premises with no internet access
Running on premises with no internet access, but allowing some form of VPN
First, decide how clients will reach the system. Three network layouts are common:
LAN only: All Nextcloud components are exposed only in the local network, typically through a load balancer, with storage, Redis, and the database behind it.
LAN plus mesh VPN: All client devices and all exposed servers join the same VPN, as with WireGuard or Tailscale, and everyone reaches the systems over it.
LAN plus traditional VPN: The systems are reachable only on the local network, and a VPN host acts as a bridge that routes remote clients‘ traffic through to Nextcloud.
Nextcloud doesn’t dictate how you manage your network, so pick the model that fits your security requirements.
Step 2: Plan your architecture
For an individual or an organization with fewer than around 500 users, a single server running all components is usually enough. At larger scale, you need to run Nextcloud on several web servers rather than one. Putting a load balancer in front of them spreads incoming user requests across the servers, so none of them gets overloaded and Nextcloud stays available if one fails.
Break the rest of the system down into its components so you can deploy and scale each one separately:
Storage: Shared storage that is identical for all web servers.
Identity services:LDAP, Active Directory, SAML, or OIDC, attached and shared across the web servers.
Nextcloud Talk high-performance backend: A separate signaling server and media gateway that lets calls with more participants scale. Without it, every participant sends their audio and video to every other participant.
Nextcloud Office document server: Nextcloud Office runs as its own server, separate from the Nextcloud web servers.
The Nextcloud software doesn’t have to live on the web servers themselves. Mounting it from an NFS share lets you swap web servers in and out and keeps Nextcloud upgrades independent of operating system upgrades.
If your users work from several locations, latency depends mostly on your infrastructure and your network bandwidth, not on Nextcloud. Disk performance often matters more than network latency, so prefer SSDs over single hard drives. Even a home instance on a 16 Mbit/s down and 3 Mbit/s up connection remains usable from the other side of the world, so solid infrastructure with decent bandwidth comfortably supports users in different regions.
Step 3: Open the required ports and plan certificates
Clients need these ports to reach your deployment:
Nextcloud (Files and web interface): ports 80 and 443
Nextcloud Talk: port 3478 (a TURN server can route port 443 traffic to 3478)
Nextcloud Office: port 443, usually through an HTTPS reverse proxy that also supports WebSocket connections
Nextcloud Office and Nextcloud Talk need direct access. Their backends run in parallel to Nextcloud rather than behind it, so every client device, whether a laptop, tablet, or phone, must be able to connect straight to the document server and the Talk backend, not just to the Nextcloud web servers. Nextcloud and the Nextcloud Office server must also be able to reach each other, so documents can be opened in the editor and changes saved back. Whether these backends sit behind your load balancer is up to you. The database and storage, by contrast, can stay fully behind Nextcloud.
If your firewall can’t allow port 3478 to the Talk backend, add a TURN server. It relays call audio and video when participants can’t connect to each other directly, for example behind strict firewalls or NAT. For deployments beyond roughly 100 users, run the Talk backend on its own server.
Finally, plan your SSL certificates. Avoid self-signed certificates, even in a fully air-gapped deployment, because they force users to accept them manually. Use valid certificates and schedule their renewal: expiry is easy to overlook in air-gapped and on-premises environments, and an expired certificate can suddenly lock users out.
Step 4: Install Nextcloud
There are two ways to install Nextcloud in an air-gapped environment.
Option A: Install first, then isolate (recommended)
Deploy Nextcloud in an environment that still has internet access, so it can download its package dependencies. Once Nextcloud is installed and configured, restrict the network.
With virtual machines, install everything before any user data or accounts exist, then shut the VMs down, copy their images (for example, QCOW2 or VMDK files) into your production environment, and start them up there. If the machines already sit where they’ll run in production, you may not need to move anything at all: simply tighten the network rules after setup.
Option B: Isolate first, then install
If the environment must be completely isolated from the start, you can set up a local package mirror. Nextcloud’s PHP dependencies come from your operating system’s package repositories, so mirror those for your distribution. For example, Ubuntu offers robust tooling for running your own mirror. Then download the Nextcloud release archive on a connected machine, transfer it, and deploy it directly in the isolated environment.
The Nextcloud AIO (All-in-One) Docker image isn’t designed for air-gapped installations, so use a package-based installation instead.
Step 5: Configure Nextcloud for offline operation
Adjust a few settings in config.php, which lives in the config folder of your Nextcloud installation, for example /var/www/nextcloud/config/config.php.
Setting has_internet_connection to “false” stops Nextcloud from trying to reach external services such as the app store, which would otherwise wait for connections that time out. Disabling updatechecker stops update checks.
Nextcloud Enterprise customers should also set has_valid_subscription to “true” in config.php, and they can apply their subscription key without internet access by using occ, Nextcloud’s command-line tool. Run it from the Nextcloud installation folder as the web server user, for example sudo -E -u www-data php occ on Debian or Ubuntu. To set the key, run occ config:app:set support potential_subscription_key --value <your-key>, or enter it in the „Support“ section of the administration settings.
Step 6: Install apps without the Nextcloud App Store
Additional apps and integrations with other systems are installed via the Nextcloud App Store, which an air-gapped instance cannot reach.
Here’s what you’ll need to do instead:
On a connected machine, open the app’s page on apps.sara-nana.com and click „Show Versions“.
Download the version that matches your Nextcloud release as a .zip or .tar file.
Extract the app into the apps directory on your Nextcloud host.
Enable it on the Apps page or with occ app:enable <app-id>.
If you keep a connected copy of your server, such as a cloned VM, you can also update apps there and then copy their folders into the apps, 3rdparty, or custom_apps directory of your air-gapped instance.
Step 7: Harden your deployment
Most hardening happens within Nextcloud itself. The built-in check in the „Overview“ section of the administration settings reviews your instance and recommends ways to improve its security. Enterprise customers will find further guidance on the Nextcloud Portal and, depending on their plan, can also book an installation review by one of Nextcloud’s Sales Engineers to make sure best practices are followed.
Step 8: Keep your deployment up to date
Pick an update strategy that fits your isolation model:
Clone the VMs without any user data, update the clones in a connected environment (Nextcloud as well as the operating system, web server, database, and PHP packages), and bring them back into the internal network.
Allow limited internet access only for the duration of an update.
Upload the new release files manually and update offline.
Whichever you choose, back up your database regularly, and always before you change or update the database servers, with mysqldump for MySQL or MariaDB and pg_dump for PostgreSQL.
When you replace the Nextcloud files during an update, always keep the config and data directories. Because apps are harder to download again in an air-gapped environment, also keep the apps, 3rdparty, and custom_apps directories where applicable. If you set a separate data directory or a remote mount during initial setup, make sure it isn’t overwritten.
Always upgrade one major version at a time. For example, go from Nextcloud 34 to 35, never straight from 34 to 36. The admin interface usually shows the available upgrade path, but on an air-gapped instance it may not be visible, so check it yourself. If Nextcloud can’t find some files after the upgrade, which is rare, run occ files:scan to rescan them.
Curious what an air-gapped Nextcloud looks like in practice? In our on-demand webinar, we cut a Nextcloud server off from the internet completely: a ping to Google goes nowhere, yet browsing files, opening spreadsheets, and creating new documents work just as they always do. The session also includes a Q&A with practical answers on updates, installing apps offline, and running Nextcloud Talk behind a firewall.
An air gap isolates a system from untrusted networks such as the internet, so attackers can’t reach it remotely and data can’t leave it unnoticed.
It’s a collaboration platform, with file storage, chat, video calls, and document editing, that runs entirely inside an isolated network. All servers and data stay within infrastructure you control.
It removes the remote attack surface, keeps your data away from third-party services, and gives you full control over what enters your environment, which also makes strict compliance requirements easier to meet. However, it doesn’t replace hardening and regular updates.
Strictly speaking, yes. In practice, the term also covers setups that only limit internet traffic or allow access through a VPN. Nextcloud works with all of them.
An on-premises cloud runs on your own servers but is usually still connected to the internet. An air-gapped cloud is also cut off from outside networks, so updates and apps have to be brought in manually.
Nextcloud Hub 26 Summer ist eine Gemeinschaftsleistung des Nextcloud-Teams, unserer Community und unserer Partner und wird auf Grundlage davon weiterentwickelt, wie es tagtäglich genutzt wird. Erstellen Sie mit Nextcloud Teams einen eigenen Bereich für Ihr Team, organisieren Sie Ihre Erinnerungen mit der neuen Nextcloud Photos-App und nutzen Sie die von Ihnen gewünschten Features in allen Apps. Lesen Sie weiter, um einen vollständigen Überblick über den neuesten Release zu erhalten.
Nextcloud ist die erste Cloud-Plattform, die mit dem Umweltzeichen „Blauer Engel“ ausgezeichnet wurde und damit beweist, dass eine digital souveräne und grüne IT möglich ist.
Unternehmen, ob klein oder groß, brauchen eine Möglichkeit, die Ausfallsicherheit und digitale Souveränität ihrer Abläufe zu gewährleisten - eine Open-Source-Alternative zu Teams, die die Privatsphäre respektiert. Und heute stellen wir diese Lösung vor - Nextcloud Talk.
Bechtle und Nextcloud kündigen heute eine vollständig verwaltete Kollaborationsplattform für den öffentlichen Sektor an, die keiner Ausschreibung bedarf und sofort bereitgestellt werden kann.
Our mission is to help individuals, businesses and organizations achieve digital sovereignty and regain control over their data. Nextcloud Hub 5 marks a massive step forward towards achieving this mission, putting the power of AI into your hands – in a way that keeps you in control. New release, new possibilities Hub 5 builds on […]
Organizations that run SharePoint or Exchange on their own infrastructure will soon lose browser-based document viewing, editing, and co-authoring. Find out how Nextcloud Hub can help.
Create slide decks without handing you data to a third party. With Nextcloud Present, you can co-edit, present, and store your slides on servers you control.
Wir speichern einige Cookies, um Besucher zu zählen und die Nutzung der Website zu erleichtern. Diese verlassen unseren Server nicht und dienen nicht der Verfolgung Ihrer online-Aktivitäten.
Weitere Informationen hierzu finden Sie in unserer Datenschutzrichtlinie. Anpassen
Statistik-Cookies sammeln anonym Informationen und helfen uns zu verstehen, wie unsere Besucher unsere Website nutzen. Wir verwenden cloud-gehostetes Matomo
Dienst:Matomo
Cookie-Beschreibung:
_pk_ses*: Zählt den ersten Besuch des Benutzers
_pk_id*: Hilft, die Besuche nicht doppelt zu zählen.
mtm_cookie_consent: Erinnert daran, dass der Nutzer seine Zustimmung zur Speicherung und Verwendung von Cookies gegeben hat.
Cookie-Ablauf:_pk_ses*: 30 Minuten
_pk_id*: 13 Monate
mtm_cookie_consent: 30 Tage