Skip to content

The Deska blog

AI Coding in Air-Gapped Environments

Learn how to implement AI coding in air-gapped environments. Explore local models, secure proxies, and local-first tools like Deska for isolated development.

12 min read

The rise of generative models has transformed software engineering, but implementing AI coding in air-gapped environments remains a significant challenge for high-security industries. When a workstation is physically or logically isolated from the public internet, standard cloud-based assistants cannot function. This restriction is common in defense, financial services, and critical infrastructure where data exfiltration risks outweigh the productivity gains of traditional AI. Achieving a functional AI development workflow in these settings requires a shift toward local-first architectures, self-hosted inference servers, and specialized tooling designed for restricted networks.

The Architecture of Isolated AI Development

Standard AI tools rely on constant communication with remote telemetry and inference servers. In an air-gapped setup, the entire stack must reside within the perimeter. This includes the model weights, the inference engine, and the user interface.

Engineers usually follow one of two paths for isolation. The first involves a completely offline machine with no network capability. The second involves an air-gapped network where multiple machines communicate with a centralized local server that hosts a Large Language Model (LLM). In both scenarios, the primary hurdle is ensuring the coding environment can communicate with the local model endpoint without requiring external verification.

Local Inference Engines and Model Management

To enable AI coding in air-gapped environments, you must deploy an inference engine that mimics the APIs of popular providers. This allows your development tools to treat a local server as if it were a cloud service.

Common solutions for local hosting include:

  • Ollama: A streamlined tool for running models locally on macOS, Linux, and Windows. It simplifies the process of managing model versions and provides a local API.
  • vLLM: A high-throughput serving engine that is often used in air-gapped clusters for its memory efficiency.
  • LocalAI: A drop-in replacement for cloud APIs that can run various model architectures on consumer or professional hardware.

Hardware requirements are a critical factor. Running a model with enough logic for complex debugging generally requires at least 16GB of VRAM. For highly secure environments, these GPU-heavy machines must be provisioned and wiped according to strict protocols before entering the secure zone.

Integrating AI Assistants with Local Workspaces

Once a model is running, the next step is providing a workspace that can leverage it. Many modern IDEs are built with cloud-centric assumptions, making them difficult to configure when internet access is zero. This is where local-first development tools become essential.

A local-first approach ensures that the application logic, file indexing, and session data never leave the machine. In an air-gapped scenario, the tool should ideally support direct connections to local IP addresses or localhost ports. This prevents the "phone home" behavior that causes many AI extensions to fail or hang when they cannot reach a license server.

Deska as an Isolated Workspace

Deska provides a unique environment for developers working under these constraints. It is a free desktop application available for Mac, Windows, and Linux that prioritizes the user machine as the primary data store. By design, the workspace keeps code, files, and session history local.

The application uses an infinite canvas where you can arrange different functional units called panels. This layout is particularly useful for air-gapped work because it allows you to see your code, documentation, and multiple terminals at once without constant tab switching.

For AI integration, Deska supports several coding agents that can run side by side.

  1. Claude Code: A terminal-based agent that can be integrated into a panel.
  2. Codex CLI: Useful for quick command-line assistance.
  3. OpenCode: An open-source alternative for agentic workflows.

By using the BYOK (Bring Your Own Key) model, users can point these agents to their local inference endpoints. Since the workspace itself is a local binary, it does not require a persistent cloud connection to manage your layout or files.

Comparing Air-Gapped Implementation Strategies

StrategySecurity LevelImplementation EffortBest For
Fully Offline LocalhostHighestHighSensitive solo research
On-Premise GPU ClusterHighVery HighEnterprise dev teams
Secure Proxy/GatewayModerateMediumRegulated industries

The choice between these depends on your compliance requirements. A fully offline localhost setup is the easiest to audit but the hardest to scale. An on-premise cluster requires significant infrastructure investment but allows a team to share a powerful model.

Voice and Direct Workspace Control

In many secure facilities, typing speed and context switching are bottlenecks. Deska includes Ask Deska, a chat and voice assistant capable of driving the workspace. It can open panels, run commands, and check the status of existing sessions.

In an air-gapped environment, this adds a layer of efficiency. When working with complex systems, you can use the assistant to manage your canvas layout or find specific files without manually navigating deep directory structures. This is managed locally, ensuring that the control commands for your workspace remain within your hardware perimeter.

Secure Remote Monitoring

Even in restricted environments, there is sometimes a need to monitor long-running tasks like builds or model training from a distance within the same secure facility. The Deska mobile app allows for this through a direct pairing mechanism.

Unlike traditional remote desktop tools that require port forwarding or external cloud relays, Deska uses a secure relay where devices pair directly. This is designed to function without exposing internal ports to the broader network. It allows an engineer to step away from the physical terminal while maintaining a view of the agent threads or terminal output.

Security Considerations for Local Models

Running AI coding in air-gapped environments does not eliminate all risks. You must consider:

  • Model Poisoning: Ensure the model weights are verified via hash checks before moving them into the air-gapped zone.
  • Prompt Leaks: Even if the network is isolated, internal users might accidentally include secrets in prompts. Use local notes to sanitize data before sending it to a local LLM.
  • Binary Integrity: Only use trusted, signed binaries for your workspace and inference engine.

FAQ

How do I install AI models on a machine with no internet?

You must download the model weights and the inference engine (like Ollama or vLLM) on a machine with internet access. After verifying the files, move them to the air-gapped machine using a secure transfer method like an encrypted USB drive or a managed data diode.

Can I use Claude or GPT-4 in an air-gapped environment?

No, these are proprietary models that require an internet connection to reach the provider servers. To work air-gapped, you must use open-weight models like Llama 3, Mistral, or DeepSeek-Coder which can be hosted entirely on your own hardware.

Does Deska require a login to work?

Deska is a local-first application designed to run on your desktop. While some features like managed inference require a subscription, the core workspace and the ability to use your own local endpoints via BYOK are designed to prioritize the local machine.

Getting Started with Local-First AI

Setting up a secure environment takes time, but the productivity gains are worth the initial configuration. By combining robust local inference with a flexible workspace, you can maintain high velocity even under the strictest security protocols.

If you are ready to build your isolated development environment, you can download the Deska desktop app and begin configuring your local terminals and agents today. Check the getting started guide for more details on workspace configuration.

AI Coding in Air-Gapped Environments | Deska