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 offers several types of integrations for AI, from completely self-hosted options to integrations with external services like Open AI. Here's an overview of what you can use and where, and where it stands on our Ethical AI scale.
How do you modernize digital collaboration in government without losing control over your data?
Austria’s Federal Ministry for Economy, Energy and Tourism (BMWET) faced this challenge in 2024 - and decided to take a clear, pragmatic step toward digital sovereignty.
Nextcloud Hub 25 Autumn makes it easier to get started with powerful collaboration while fully in control of your data. From global design updates to improved usability and performance, discover our latest release in this blog.
Passionate about data privacy and Nextcloud? We invite you speak at the Nextcloud Community Conference to share your experience, knowledge and news with the community!
For the ninth time, Nextcloud has been nominated for the CloudComputing-Insider Readers’ Choice Award in the category of Cloud Content Management. We’d love to reach the top again! And we’re looking for the support of you and everyone else in our amazing community to get there. Nextcloud as the best Cloud Content Management tool? Only […]
In the Nextcloud 2024 wrap-up, we want to take a moment to celebrate this year's achievements. Join us as we continue to reimagine what’s possible - shaping a world where open source, privacy and connection come together and drive progress for the greater good.
Organisations, small and large, need a way to ensure the resiliency and digital sovereignty of their operations – an open-source, privacy-respecting alternative to Teams. And today, we present that solution - Nextcloud Talk.
Nextcloud has been recognized with the World Summit Award Germany that selects and promotes local digital innovation improving society, aiming to contribute to the United Nations' agenda of sustainable development goals.
DIE ZEIT, a prominent German outlet, interviewed Nextcloud’s founder Frank Karlitschek for an article on Microsoft’s anti-competitive behaviour on the European office software market. Read for a recap of the article and the key takeaways.
MagentaCLOUD’s migration to Nextcloud in 2021 resulted in a fully equipped Online Storage with an integrated online office suite that further improves the user experience, flexibility and security for customers.
We bring you a major update to the Nextcloud AI Assistant, plus the news we work with several big hosting providers like IONOS and OVHcloud to bring AI-as-a-Service options to you!
Bechtle and Nextcloud announce today a complete managed collaboration platform for the public sector that requires no tender and can be deployed immediately.
Discover how to make the switch from ownCloud to Nextcloud. Our quick guide provides insights into the migration process, helping you make the transition smoothly.
Today, US-based file sync & share vendor Kiteworks announced their acquisition of ownCloud and Dracoon. Kiteworks points out that their customers now have access to their file-sharing application. It is to be expected they will not maintain 3 similar products, but customers will have to migrate to the US firms’ platform or look for another […]
As part of Schleswig-Holstein's state digitization strategy, the state chancellery has announced they will work with Nextcloud to develop AI for working with government documents. This comes just after we announced the first private AI assistant last weekend with Hub 6. The German state already uses Nextcloud and their AI strategy aligns with our work on ethical, local AI technologies.
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.
We save some cookies to count visitors and make the site easier to use. This doesn't leave our server and isn't to track you personally!
See our Privacy Policy for more information. Customize
Statistics cookies collect information anonymously and help us understand how our visitors use our website. We use cloud-hosted Matomo
Service:Matomo
Cookies description:
_pk_ses*: Counts the first visit of the user
_pk_id*: Helps not to double count the visits.
mtm_cookie_consent: Remembers that consent for storing and using cookies was given by the user.
Cookies expiry:_pk_ses*: 30 Minuten
_pk_id*: 13 months
mtm_cookie_consent: 30 Dagen