AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Deploying Codeium Self-Hosted in Air-Gapped VPCs: Architecture, Indexing, and Enterprise Hardening

Ana Lázaro Touza · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

For engineering teams in defense, financial infrastructure, intelligence, and healthcare, public AI SaaS plugins represent an unacceptable compliance hazard. When regulatory mandates such as ITAR, CJIS, FedRAMP High, or PCI-DSS Level 1 forbid any payload from egressing the private corporate perimeter, commercial cloud coding assistants are disqualified immediately. Codeium addresses this barrier through Codeium Enterprise Self-Hosted, an architecture designed to run containerized inference, semantic code indexing, and developer tooling entirely inside an isolated Virtual Private Cloud (VPC) with zero internet dependency.

At 365Finds, our institutional stance on this architecture is clear: if your security mandate enforces an uncompromising air-gap, Codeium Self-Hosted remains one of the few battle-tested, enterprise-grade AI coding stacks capable of delivering sub-200ms autocomplete and repository-wide context behind an absolute firewall. However, self-hosting is an infrastructure commitment, not a simple software rollout. Running local Large Language Models (LLMs) requires dedicated GPU clusters, disciplined offline artifact ingestion pipelines, and continuous vector index management. If your regulatory framework permits VPC peering or zero-data-retention (ZDR) transit, Codeium's Hybrid model offers significantly lower operational overhead. But when absolute data sovereignty and zero external egress are non-negotiable legal mandates, this air-gapped VPC blueprint provides the production-ready standard.


Air-Gapped System Architecture

An air-gapped Codeium Self-Hosted deployment operates as a sovereign, self-contained system running within private Kubernetes worker nodes (such as Amazon EKS, Google GKE Private Clusters, Azure AKS, or on-premises OpenShift/RKE2). The system comprises four interconnected operational tiers:

+------------------------------------------------------------------------------------+
|                                PRIVATE VPC / ON-PREMISES                           |
|                                                                                    |
|  +-----------------------+           +------------------------------------------+  |
|  |  Developer Endpoints  |           |        Internal SCM Infrastructure       |  |
|  |  (VS Code / JetBrains)|           |  (GitLab Self-Managed / GitHub Server)   |  |
|  +-----------+-----------+           +--------------------+---------------------+  |
|              |                                            |                        |
|              | (Internal HTTPS / Corporate CA)            | (mTLS / Webhooks)      |
|              v                                            v                        |
|  +-------------------------------------------------------------------------------+ |
|  |                   Private Ingress Gateway (Envoy / NGINX)                     | |
|  +-------------------+------------------------------------+----------------------+ |
|                      |                                    |                        |
|                      v                                    v                        |
|  +-------------------------------------+  +-------------------------------------+  |
|  |       Enterprise Control Plane      |  |     Context & Indexing Engine       |  |
|  |  - Codeium Enterprise Portal        |  |  - AST & Code Chunk Parser          |  |
|  |  - Offline JWT License Daemon       |  |  - Embedding Generator              |  |
|  |  - SAML 2.0 / OIDC (Keycloak/AD)    |  |  - Hybrid Vector/Lexical Index      |  |
|  |  - PostgreSQL Metadata Store        |  |  - Multi-Repo RBAC Evaluator        |  |
|  +-------------------+-----------------+  +-------------------+-----------------+  |
|                      |                                        |                    |
|                      +-------------------+--------------------+                    |
|                                          |                                         |
|                                          v                                         |
|  +-------------------------------------------------------------------------------+ |
|  |                    GPU Inference Compute Cluster (vLLM / C++)                 | |
|  |  - NVIDIA GPU Operator & CUDA Runtime                                         | |
|  |  - Code Completion Service (Low-Latency Autocomplete Model)                  | |
|  |  - Chat & Reasoning Service (Larger Instruction Model)                        | |
|  |  - High-IOPS NVMe Persistent Volume Claims (Model Weights Cache)              | |
|  +-------------------------------------------------------------------------------+ |
+------------------------------------------------------------------------------------+

Core Architecture Components

  1. Enterprise Control Plane: Hosts the Codeium Enterprise Portal, serving as the central administration surface. It manages user seat allocation, offline license enforcement via pre-shared cryptographically signed tokens, telemetry isolation, and authentication integrations (SAML 2.0/OIDC via internal Keycloak or Active Directory). Backed by internal PostgreSQL and Redis clusters.
  2. GPU Inference Cluster: Powered by GPU-accelerated Kubernetes worker nodes running NVIDIA Container Toolkit. Codeium uses specialized, low-latency inference containers designed for continuous batching and KV-cache optimization, serving separate models for autocomplete (latency-critical) and chat/instruction tasks (throughput-oriented).
  3. Context Awareness & Indexing Engine: Parses connected internal repositories (GitLab Self-Managed, GitHub Enterprise Server, or Bitbucket Server). It extracts Abstract Syntax Tree (AST) definitions, generates vector embeddings using a local embedding model, and constructs hybrid lexical (BM25) and dense vector indices. Strict role-based access control (RBAC) ensures context retrieval mirrors each developer's Git repository permissions.
  4. Internal Ingress Gateway: Terminated with corporate Public Key Infrastructure (PKI) certificates. IDE extensions connect exclusively to this internal endpoint without making any outbound requests to public internet gateways.

Prerequisites and Infrastructure Sizing

Running inference locally requires provisioning appropriate GPU compute and high-speed persistent storage. Attempting to run inference on shared or under-provisioned GPUs will cause autocomplete latency to spike past human tolerance thresholds (p95 latency must remain below 200ms).

GPU & Compute Sizing Matrix

Concurrent Active DevelopersWorkload ProfileRecommended GPU ConfigurationCPU & Memory per NodeStorage Allocation
50 – 150Autocomplete only1x NVIDIA A10G (24GB) or 1x NVIDIA L40S (48GB)16 vCPU; 64 GB RAM500 GB NVMe (gp3/io2) for weights and cache
150 – 500Autocomplete + Context Chat2x NVIDIA A100 (80GB PCIe) or 2x NVIDIA H100 NVL32 vCPU; 128 GB RAM1.5 TB NVMe; 10 Gbps network throughput
500 – 1,500Full Suite + Multi-Repo Indexing4x to 8x NVIDIA A100 (80GB) or H100 with Tensor Parallelism64 vCPU; 256 GB RAM4 TB High-IOPS Local NVMe; dedicated indexing pool

Network & Security Prerequisites


Step-by-Step Deployment Runbook

Step 1: Ingesting Artifacts across the Air-Gap (The Two-Machine Protocol)

Because the destination cluster cannot reach public container registries, all artifacts—including container images, Helm charts, and model checkpoints—must be staged in a connected DMZ and transferred through an approved data diode or encrypted physical sneakernet.

  1. Download and Mirror Images on the Internet-Connected Staging Machine:

    # Export Codeium Enterprise container images
    IMAGE_LIST=(
      "codeium/enterprise-portal:latest"
      "codeium/inference-engine:latest"
      "codeium/indexer-service:latest"
      "codeium/embedding-worker:latest"
    )
    
    for img in "${IMAGE_LIST[@]}"; do
      docker pull "$img"
      docker save "$img" | gzip > "${img//\//_}.tar.gz"
    done
    
  2. Integrity Verification and Security Auditing: Run vulnerability scanning (using Trivy or Grype) on each container image and compute SHA-256 checksums on all tarballs and model weight directories:

    sha256sum *.tar.gz > manifest.sha256
    
  3. Transfer and Push to the Internal Air-Gapped Registry: Move the verified media across the air-gap boundary, unpack the archives, and push the images into your internal registry:

    docker load < codeium_enterprise-portal_latest.tar.gz
    docker tag codeium/enterprise-portal:latest harbor.corp.internal/ai/codeium-portal:v1.0
    docker push harbor.corp.internal/ai/codeium-portal:v1.0
    

Step 2: Preparing the Kubernetes GPU Worker Nodes

Ensure the NVIDIA GPU Operator is installed in offline mode on your Kubernetes cluster.

  1. Verify that NVIDIA drivers and container runtime hooks are registered:

    kubectl get nodes -o custom-columns=NAME:.metadata.name,GPU:.status.allocatable.'nvidia\.com/gpu'
    

    Each GPU worker node must report the expected number of allocatable GPUs (e.g., nvidia.com/gpu: 2).

  2. Create the dedicated namespace and secret containing your offline enterprise license key:

    kubectl create namespace codeium-enterprise
    kubectl create secret generic codeium-license \
      --namespace codeium-enterprise \
      --from-file=license.jwt=/secure/pki/codeium_offline_license.jwt
    

Step 3: Configuring Helm Values for Air-Gapped Operation

Deploy Codeium Self-Hosted using Helm, explicitly turning off all external telemetry, setting internal registry endpoints, and dedicating GPU resources. Create a custom values-airgapped.yaml:

global:
  airgapped: true
  telemetry:
    enabled: false
  imageRegistry: harbor.corp.internal/ai
  imagePullSecrets:
    - name: internal-registry-secret

portal:
  replicaCount: 2
  licenseSecretName: codeium-license
  ingress:
    enabled: true
    className: nginx-internal
    hosts:
      - host: codeium.corp.internal
        paths:
          - path: /
            pathType: Prefix
    tls:
      - secretName: codeium-tls-cert
        hosts:
          - codeium.corp.internal

inference:
  resources:
    limits:
      nvidia.com/gpu: "2"
      memory: 64Gi
      cpu: "16"
    requests:
      nvidia.com/gpu: "2"
      memory: 32Gi
      cpu: "8"
  modelStorage:
    storageClassName: high-iops-nvme
    size: 500Gi
  env:
    - name: OFFLINE_MODE
      value: "true"
    - name: MAX_BATCH_SIZE
      value: "64"
    - name: KV_CACHE_DTYPE
      value: "float16"

indexer:
  replicaCount: 2
  resources:
    limits:
      memory: 32Gi
      cpu: "8"
  persistentVolume:
    storageClassName: high-iops-nvme
    size: 1Ti

databases:
  externalPostgres:
    host: "postgres-ha.corp.internal"
    port: 5432
    database: "codeium_enterprise"
    user: "codeium_admin"
    secretName: "codeium-db-credentials"
  externalRedis:
    host: "redis-cluster.corp.internal"
    port: 6379

Deploy the stack:

helm install codeium-enterprise ./codeium-helm-chart \
  --namespace codeium-enterprise \
  -f values-airgapped.yaml

Step 4: Connecting Self-Hosted SCM for Context Indexing

To deliver contextual autocomplete and accurate multi-file reasoning, Codeium's Indexer service must index your internal source code repositories while honoring access control boundaries.

  1. Service Account and Token Provisioning:

    • In your internal GitLab Self-Managed or GitHub Enterprise Server, create a dedicated system bot account (codeium-indexer-bot).
    • Grant read-only API and repository permissions (read_api, read_repository).
    • Restrict repository access strictly to projects approved for AI indexing.
  2. Configure Webhook Push Notifications:

    • Point your Git server's system webhooks to the internal indexer endpoint: https://codeium.corp.internal/api/v1/indexing/webhook.
    • Enable triggers for Push Events and Merge Request Events on default branches (main, master, release/*). This triggers incremental background index updates whenever commits land.
  3. Synchronize Multi-Repo RBAC:

    • Configure the Codeium Portal to synchronize user group memberships against your corporate directory via SAML/OIDC.
    • The indexer tags vector chunks with repository ACL metadata. When an engineer executes a context-aware chat query, the engine restricts retrieval to chunks belonging to repositories where that engineer's token possesses explicit read rights.

Step 5: IDE Extension Deployment and Client Configuration

In an air-gapped organization, developers cannot download plugins from the VS Code Marketplace or JetBrains Plugin Repository. Client extensions must be distributed and configured via managed internal channels.

  1. Host Plugins in an Internal Marketplace: Mirror the Codeium extension .vsix (for VS Code) and .zip (for JetBrains) files into an internal Open VSX registry or corporate Artifactory distribution repository.

  2. Enforce Enterprise Portal Configuration: Distribute global IDE configuration policies across developer workstations using tools like Ansible, Jamf, or Windows Group Policy (GPO):

    For VS Code (settings.json):

    {
      "codeium.enterpriseUrl": "https://codeium.corp.internal",
      "codeium.apiServer": "https://codeium.corp.internal/api",
      "codeium.enableTelemetry": false,
      "codeium.enterpriseMode": true
    }
    

    For JetBrains IDEs (codeium.xml inspection profile):

    <application>
      <component name="CodeiumSettings">
        <option name="portalUrl" value="https://codeium.corp.internal" />
        <option name="apiServerUrl" value="https://codeium.corp.internal/api" />
        <option name="telemetryOptOut" value="true" />
      </component>
    </application>
    
  3. Trust Internal Corporate Root CA: Ensure that the operating system trust store and the IDE runtime environment (e.g., Node.js for VS Code and Embedded JDK for JetBrains) trust your enterprise Root CA. If the IDE runtime rejects the TLS handshake of https://codeium.corp.internal, the extension will fail silently or display connectivity errors.


Hardware Sizing, Latency Benchmarks, and Verification

Verifying deployment health requires monitoring inference latency under representative load. Autocomplete suggestions must be returned almost instantaneously to avoid disrupting developer typing flow.

Performance Benchmarks and Latency Targets

Request Timeline: Autocomplete Pipeline
[IDE Keystroke] 
      │
      ├──> (15ms)  Internal Network Transit (TLS)
      ├──> (30ms)  Prompt Packaging & Local Context Lookup
      ├──> (110ms) GPU Forward Pass (Codeium Autocomplete Model)
      └──> (20ms)  Return Stream & IDE Inline Ghost Text Render
Total p95 Latency: ~175ms (Well under the 200ms usability ceiling)

Cluster Validation Script

Execute an end-to-end health probe against the internal API gateway from an authorized developer bastion:

curl -k -X POST https://codeium.corp.internal/api/v1/health \
  -H "Authorization: Bearer <DEVELOPER_TEST_TOKEN>" \
  -H "Content-Type: application/json"

# Check GPU node utilization across the cluster
kubectl top nodes -l accelerator=nvidia-gpu

Day-2 Operations and Maintenance

Maintaining an air-gapped AI stack requires operational procedures distinct from standard SaaS developer tools:

  1. Annual License File Rotation: Air-gapped licenses are delivered as signed cryptographically bound files (JWT format) with set expiration dates. Configure monitoring alerts 60 days prior to license expiration to initiate corporate procurement of renewed license files and execute zero-downtime secret replacement:

    kubectl create secret generic codeium-license \
      --namespace codeium-enterprise \
      --from-file=license.jwt=/secure/pki/codeium_license_2027.jwt \
      --dry-run=client -o yaml | kubectl apply -f -
    kubectl rollout restart deployment/codeium-portal -n codeium-enterprise
    
  2. Index Pruning and Garbage Collection: As repositories grow and branches get deleted, stale vector indices consume memory and disk IOPS. Schedule a weekly indexing reconciliation job within the Codeium Portal admin panel to prune deleted branches, drop re-indexed files, and rebuild the BM25 inverted index.

  3. Security Vulnerability Patching: Establish a bi-monthly cadence where DevSecOps scans base container layers in the connected staging area, updates dependencies against current CVE disclosures, and re-imports patched container layers across the data diode.


365Finds Institutional Evaluation

Evaluation DimensionCodeium Self-Hosted (Air-Gapped)Codeium Hybrid ArchitecturePublic Cloud AI SaaS (GitHub Copilot / Standard SaaS)
Data Sovereignty & Leakage RiskAbsolute Zero Risk: zero external network routingLow Risk: code index stays local; transient GPU inferenceHigh Risk: prompt and code payloads egress across public internet
Regulatory Compliance (ITAR / CJIS / HIPAA)Fully Compliant: meets strict SCIF and air-gap specsConditional: requires approved VPC peering / ZDR waiverNon-Compliant: prohibited in high-assurance environments
Infrastructure TCOHigh: requires dedicated enterprise GPUs, NVMe, and operationsModerate: CPU-only local indexing; cloud GPU billingLow: predictable per-seat monthly subscription fee
Model Freshness & Reasoning AgilityLagging: manual ingestion cycles for updated model weightsCutting-Edge: immediate access to latest frontier modelsImmediate: automatically updated by vendor
Engineering Operational OverheadDemanding: requires active Kubernetes and GPU Operator managementLow: automated agent with minimal local footprintZero: fully managed turn-key service

Definitive Recommendation

For organizations operating under defense contracts, national intelligence security parameters, or banking regulatory firewalls where zero outbound network transit is mandated by law, Codeium Self-Hosted is the premier choice. It combines low-latency autocomplete with private repository context indexing inside an entirely isolated perimeter.

However, engineering leadership must not underestimate the infrastructure ownership cost. Running dedicated NVIDIA A100 or L40S nodes in private subnets carries substantial hardware and operational expense. If your compliance officers determine that transient, unpersisted data transmission under a Zero Data Retention (ZDR) agreement is legally acceptable, Codeium's Hybrid model offers a far more cost-effective alternative. When strict compliance leaves no room for compromise, the air-gapped architecture detailed above represents the definitive enterprise deployment standard.


References