Enterprise

On-Premise OTA: Complete Hosting Guide

Deploy SwiftPatch on your own infrastructure. Complete guide to self-hosted OTA updates for React Native with data residency compliance.

S
SwiftPatch Team
Enterprise
15 min read

Introduction

For enterprises with strict data residency, compliance, or security requirements, SwiftPatch offers a fully self-hosted deployment option. Run your entire OTA infrastructure on your own servers, in your own cloud, or behind your firewall.

Why Self-Host?

Data Residency

Compliance

Security

Air-Gapped Environments

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                    Your Infrastructure                        │
├─────────────────────────────────────────────────────────────┤
│                                                               │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐       │
│  │   SwiftPatch │    │   Object    │    │  PostgreSQL │       │
│  │   Server     │────│   Storage   │    │  Database   │       │
│  │   (Docker)   │    │   (S3/Minio)│    │             │       │
│  └─────────────┘    └─────────────┘    └─────────────┘       │
│         │                   │                   │             │
│         └───────────────────┴───────────────────┘             │
│                             │                                 │
│                    ┌────────┴────────┐                        │
│                    │   Load Balancer │                        │
│                    │   (nginx/ALB)   │                        │
│                    └────────┬────────┘                        │
│                             │                                 │
└─────────────────────────────┼─────────────────────────────────┘
                              │
                    ┌─────────┴─────────┐
                    │   Mobile Apps     │
                    │   (Your Users)    │
                    └───────────────────┘

Requirements

Minimum Specs

Recommended (Production)

Installation

Step 1: Get Enterprise License

Contact sales@swiftpatch.io for an enterprise license key.

Step 2: Docker Compose Setup

# docker-compose.yml
version: '3.8'

services:
  swiftpatch:
    image: swiftpatch/server:latest
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgres://user:pass@db:5432/swiftpatch
      - S3_ENDPOINT=http://minio:9000
      - S3_BUCKET=swiftpatch-bundles
      - LICENSE_KEY=${SWIFTPATCH_LICENSE_KEY}
    depends_on:
      - db
      - minio

  db:
    image: postgres:14-alpine
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=pass
      - POSTGRES_DB=swiftpatch

  minio:
    image: minio/minio:latest
    command: server /data --console-address ":9001"
    volumes:
      - miniodata:/data
    environment:
      - MINIO_ROOT_USER=admin
      - MINIO_ROOT_PASSWORD=password

volumes:
  pgdata:
  miniodata:

Step 3: Start Services

docker-compose up -d

Step 4: Initialize Database

docker exec swiftpatch swiftpatch-cli db:migrate

Step 5: Configure Your App

import { SwiftPatch } from 'swiftpatch';

SwiftPatch.init({
  deploymentKey: 'YOUR_DEPLOYMENT_KEY',
  serverUrl: 'https://updates.yourcompany.com', // Your server
});

Production Deployment

Kubernetes Helm Chart

helm repo add swiftpatch https://charts.swiftpatch.io
helm install swiftpatch swiftpatch/swiftpatch \
  --set license.key=YOUR_LICENSE_KEY \
  --set postgres.host=your-postgres-host \
  --set s3.endpoint=your-s3-endpoint

AWS Deployment

SwiftPatch provides CloudFormation templates for AWS:

aws cloudformation deploy \
  --template-file swiftpatch-aws.yaml \
  --stack-name swiftpatch-production \
  --parameter-overrides LicenseKey=YOUR_KEY

Security Configuration

TLS/SSL

# Enable TLS
services:
  swiftpatch:
    environment:
      - TLS_CERT_PATH=/certs/server.crt
      - TLS_KEY_PATH=/certs/server.key
    volumes:
      - ./certs:/certs:ro

Authentication

  • SAML 2.0 (Okta, Azure AD)
  • OIDC (Auth0, Keycloak)
  • LDAP/Active Directory

Audit Logging

Enable comprehensive audit logging:

environment:
  - AUDIT_LOG_ENABLED=true
  - AUDIT_LOG_DESTINATION=s3://your-audit-bucket

Monitoring

Prometheus Metrics

SwiftPatch exposes metrics at /metrics:

# prometheus.yml
scrape_configs:
  - job_name: 'swiftpatch'
    static_configs:
      - targets: ['swiftpatch:3000']

Key Metrics

  • swiftpatch_updates_total: Total updates served
  • swiftpatch_bundle_size_bytes: Bundle sizes
  • swiftpatch_download_duration_seconds: Download times
  • swiftpatch_rollbacks_total: Rollback events

Backup & Recovery

Database Backup

# Daily backup
pg_dump swiftpatch | gzip > backup-$(date +%Y%m%d).sql.gz

Bundle Storage Backup

# Sync to backup bucket
aws s3 sync s3://swiftpatch-bundles s3://swiftpatch-backup

Conclusion

Self-hosted SwiftPatch gives you complete control over your OTA infrastructure. Whether it's for compliance, security, or data residency, you get all the features of SwiftPatch cloud with the privacy of your own infrastructure.

Contact sales for enterprise pricing →

Ready to ship updates faster?

Get started with SwiftPatch for free. No credit card required.

Join Waitlist

Related Articles