Air-Gapped Deployment (Docker Compose)
This page provides step-by-step instructions for deploying KMI in air-gapped (offline) environments. The air-gap package contains all necessary Docker images and configuration files for deployment in environments without internet access.
Minimum System Requirements
Section titled “Minimum System Requirements”Hardware
Section titled “Hardware”| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4 cores |
| RAM | 4 GB | 8 GB |
| Disk | 10 GB free | 20 GB free |
CPU Architecture
Section titled “CPU Architecture”The suite is available for both amd64 and arm64 architectures. Make sure you are using the bundle that matches your host architecture.
Software
Section titled “Software”| Software | Version |
|---|---|
| Docker Engine | 20.10 or later |
| Docker Compose | v2.0 or later |
Verify your Docker installation:
docker --versiondocker compose versionNetwork Ports
Section titled “Network Ports”The following ports must be available on the host:
| Port | Service | Purpose |
|---|---|---|
| 3000 | Frontend | Web UI access |
| 27017 | MongoDB | Database (internal) |
| 18002 | Backend | Data Replicator API |
| 18003 | Backend | Monitoring Service API |
| 18004 | Backend | WebSocket connections |
| 9310-9399 | Metrics Collectors | Dynamic port range for collectors |
Prerequisites
Section titled “Prerequisites”Before starting the installation:
- Ensure Docker is installed and running.
- Ensure the current user has permissions to run Docker commands.
- Ensure all required ports are available.
- Transfer the air-gap package to the target server.
Package Contents
Section titled “Package Contents”The air-gap package contains:
Docker bundle (kmi-airgap-docker-vX.x-<arch>.tar.gz): deploy.sh # Deployment script docker-compose.yml # Container orchestration .env.example # Configuration template mongo-init.sh # Database initialization script images.tar.gz # Pre-built Docker images README.md # This guide
Kubernetes bundle (kmi-airgap-kubernetes-vX.x-amd64.tar.gz): k8s-deploy.sh # Deployment script for K8s k8s-deploy-package/ # Helm charts for K8s .env.example # Configuration template mongo-init.sh # Database initialization script images.tar.gz # Pre-built Docker images README.md # This guideInstallation Steps
Section titled “Installation Steps”-
Extract the package.
Terminal window tar -xzf kmi-airgap-docker-vX.x-amd64.tar.gz -C /path/to/deploycd /path/to/deploy -
Create the configuration file.
Copy the example configuration and edit it:
Terminal window cp .env.example .envOpen
.envin your preferred editor and configure all required values. See the Configuration Reference below for details. -
Generate secrets.
Generate secure values for
JWT_SECRETandAES_KEY:Terminal window # Generate JWT secret (16 bytes hex)openssl rand -hex 16# Generate AES key (32 bytes hex)openssl rand -hex 32Copy these values into your
.envfile. -
Run the deployment script.
Terminal window ./deploy.shThe script loads Docker images from
images.tar.gz, creates the Docker network, and starts all services. -
Verify the deployment.
Wait approximately 30-60 seconds for all services to initialize, then verify:
Terminal window docker psYou should see these containers running:
kmi-mongodbkmi-frontendkmi-backend
-
Access the application.
Open your browser and navigate to:
http://<server-ip>:3000Log in with the admin credentials you configured in the
.envfile.
Configuration Reference
Section titled “Configuration Reference”MongoDB Credentials
Section titled “MongoDB Credentials”MONGO_USERNAME=your_mongo_usernameMONGO_PASSWORD=your_mongo_passwordThese credentials are used internally by the application to connect to MongoDB. Choose strong, unique values.
Admin User
Section titled “Admin User”ADMIN_USER_ID=adminADMIN_EMAIL=admin@yourcompany.comADMIN_PASSWORD=your_secure_passwordThis is the initial administrator account for logging into the web interface.
Service Account Emails
Section titled “Service Account Emails”DATA_REPLICATION_SERVICE_EMAIL=datarepl@yourcompany.comSCHEMA_REPLICATION_SERVICE_EMAIL=schemarepl@yourcompany.comKAFKA_CLI_SERVICE_EMAIL=kafkacli@yourcompany.comMONITORING_SERVICE_EMAIL=monitoring@yourcompany.comCOLLECTOR_SERVICE_EMAIL=collector@example.comThese are internal service accounts used for inter-service authentication. They do not need to be real email addresses, but must be unique.
Application Secrets
Section titled “Application Secrets”JWT_SECRET=<generated-16-byte-hex>JWT_EXPIRES_IN=8hJWT_EXPIRES_INT=8USE_SECURE_COOKIES=falseAES_KEY=<generated-32-byte-hex>| Variable | Description |
|---|---|
| JWT_SECRET | Secret key for signing authentication tokens |
| JWT_EXPIRES_IN | Token expiration time (for example, 8h, 24h, 7d) |
| JWT_EXPIRES_INT | Numeric value matching JWT_EXPIRES_IN |
| USE_SECURE_COOKIES | Set to true if using HTTPS |
| AES_KEY | Encryption key for sensitive data storage |
Service Ports
Section titled “Service Ports”MONGODB_PORT=27017FRONTEND_PORT=3000DATA_REPLICATOR_PORT=18002MONITORING_SERVICE_PORT=18003MONITORING_SOCKET_PORT=18004Modify these only if you have port conflicts on your system.
Post-Installation Verification
Section titled “Post-Installation Verification”Check container status:
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"All containers should show an “Up” status.
Common Operations
Section titled “Common Operations”View Logs
Section titled “View Logs”# Follow all logsdocker compose logs -f
# Follow a specific servicedocker compose logs -f frontendStop Services
Section titled “Stop Services”docker compose downStart Services
Section titled “Start Services”docker compose up -dRestart with a Fresh Database
Section titled “Restart with a Fresh Database”docker compose down -vdocker compose up -dUpdate Configuration
Section titled “Update Configuration”After modifying .env:
docker compose downdocker compose up -dTroubleshooting
Section titled “Troubleshooting”UI Shows “Internal Server Error” on Login
Section titled “UI Shows “Internal Server Error” on Login”Symptom: Login fails with an internal server error.
Cause: Usually indicates database connection issues.
Solution:
- Check the database is running:
docker ps | grep mongodb - Check the database logs:
docker logs kmi-mongodb - Verify the credentials in
.envmatch what the database was initialized with. - If the credentials were changed, restart with fresh volumes.
- Make sure you are using the bundle with the correct architecture.
Backend Shows Authentication Timeouts
Section titled “Backend Shows Authentication Timeouts”Symptom: Backend logs show repeated timeout errors connecting to the UI.
Cause: Services started before dependencies were ready, or performance issues on slower systems.
Solution:
- Restart the backend:
docker compose restart kmi-backend - If persistent, increase the Docker memory allocation.
Port Already in Use
Section titled “Port Already in Use”Symptom: A container fails to start with a “port already in use” error.
Solution:
- Find what is using the port:
lsof -i :<port> - Either stop the conflicting service or change the port in
.env.
Services Cannot Communicate
Section titled “Services Cannot Communicate”Symptom: Services fail to connect to each other.
Solution:
- Verify the Docker network exists:
docker network ls | grep kmi - If missing, create it:
docker network create kmi-network - Restart services:
docker compose down && docker compose up -d
Known Limitations
Section titled “Known Limitations”- Air-gap updates: To update the application, you must obtain a new air-gap package and redeploy. In-place updates are not supported.
- Single node: This deployment is designed for single-node installations. High-availability configurations require additional setup not covered here.
- License required: The application requires a valid license key for operation. Contact your administrator to obtain a license.
Support
Section titled “Support”For issues not covered here, collect the following information before contacting support:
# System informationuname -adocker --versiondocker compose version
# Container statusdocker ps -a
# Recent logsdocker compose logs --tail=100