Air-Gapped Installation
advancedDeploy Hive in environments without internet connectivity. Covers offline package caching, USB deployment, and package verification.
Overview
In air-gapped or disconnected environments, Hive can be deployed without internet access. This guide covers preparing offline packages on a connected machine, creating USB deployment media, and installing on the target server with package verification.
Deployment methods:
- apt-cacher-ng — Local APT cache for Debian/Ubuntu packages
- Go module cache — Pre-downloaded Go dependencies
- USB deployment — Portable installation media with all dependencies
- GPG verification — Cryptographic package integrity checks
Instructions
Step 1. Prepare packages (on a connected machine)
Set up a local APT cache to collect all required packages:
sudo apt install apt-cacher-ng
sudo systemctl enable --now apt-cacher-ng
Pre-download all Hive dependencies:
sudo apt install --download-only nbdkit nbdkit-plugin-dev pkg-config \
qemu-system qemu-utils qemu-kvm libvirt-daemon-system \
libvirt-clients libvirt-dev make gcc unzip xz-utils file \
ovn-central ovn-host openvswitch-switch
Step 2. Create USB deployment media
mkdir -p /media/hive-deploy/{apt-packages,go-cache,hive-source}
cp /var/cache/apt/archives/*.deb /media/hive-deploy/apt-packages/
cp -r ~/go/pkg/mod/cache/ /media/hive-deploy/go-cache/
cp -r ~/Development/mulga/hive /media/hive-deploy/hive-source/
Step 3. Verify package integrity
Sign and verify packages before transferring to the target:
gpg --import /media/hive-deploy/mulga-signing-key.asc
gpg --verify hive-v1.0.tar.gz.sig hive-v1.0.tar.gz
sha256sum -c /media/hive-deploy/checksums.sha256
Step 4. Install on the target server
Mount the USB and install:
sudo mount /dev/sdb1 /mnt/usb
sudo dpkg -i /mnt/usb/apt-packages/*.deb
cp -r /mnt/usb/hive-source ~/Development/mulga/hive
cd ~/Development/mulga/hive && make build
Then follow the Source Install guide from Step 3 (Setup OVN) onwards.
Troubleshooting
Missing dependencies after dpkg install
Some packages may have unresolved dependencies. Fix with:
sudo dpkg -i /mnt/usb/apt-packages/*.deb
sudo apt-get install -f
The -f flag tells apt to fix broken dependencies using what's available locally.
GPG verification fails
The signing key may not match or the download was corrupted. Re-import the key and verify:
gpg --import /media/hive-deploy/mulga-signing-key.asc
gpg --verify hive-v1.0.tar.gz.sig hive-v1.0.tar.gz
If verification still fails, re-download the package on the connected machine and compare checksums:
sha256sum hive-v1.0.tar.gz
Go module cache errors
The Go module cache may have been incompletely copied. On the connected machine, re-export the full cache:
cp -r ~/go/pkg/mod/cache/ /media/hive-deploy/go-cache/
On the target, restore it:
mkdir -p ~/go/pkg/mod/
cp -r /mnt/usb/go-cache ~/go/pkg/mod/cache