This tarball installs the Roboflow Secure Gateway on an air-gapped
Linux x86_64 host. After install, the gateway runs as two Docker
containers (secure-gateway, seaweedfs)
supervised by rfdm.
# 1. Download the latest bundle (~256 MB) + its sha256 sidecar
curl -fOL https://repo.roboflow.com/rfdm/secure-gateway/latest/secure-gateway-offline-installer-linux-amd64.tar.gz
curl -fOL https://repo.roboflow.com/rfdm/secure-gateway/latest/secure-gateway-offline-installer-linux-amd64.tar.gz.sha256
# 2. Verify integrity
echo "$(cat secure-gateway-offline-installer-linux-amd64.tar.gz.sha256) secure-gateway-offline-installer-linux-amd64.tar.gz" \
| sha256sum -c -
# 3. Extract and run
tar xzf secure-gateway-offline-installer-linux-amd64.tar.gz
cd secure-gateway-offline-installer
sudo ./install.sh \
--api-key <ROBOFLOW_API_KEY> \
--device-id <DEVICE_ID> \
--workspace <WORKSPACE>The installer is idempotent. It generates a long-lived TLS cert, installs Docker if missing, loads the bundled images, and starts rfdm.
If the host sits behind a corporate HTTP proxy, set proxy env vars first — see Installing behind a proxy.
To pin a specific build instead of
latest, replace/latest/with/<sha>/and append the SHA-tagged filename:secure-gateway-offline-installer-<sha>-linux-amd64.tar.gz. Seehttps://repo.roboflow.com/rfdm/secure-gateway/latest/manifest.jsonfor the SHA thelatest/alias currently points at.
| OS | Linux x86_64 with systemd |
| Privileges | root (sudo) |
| Disk | ~3 GB free on / |
| Network | Outbound HTTPS to api.roboflow.com (or your
--api-base-url) and repo.roboflow.com,
directly or through the host proxy |
| Docker | Optional — the bundle ships static binaries and installs them if missing |
| TLS material | Optional: the installer generates a gateway CA and a certificate it signs if you don't bring your own |
| Host tools | sha256sum, cmp (diffutils),
getent, grep, sed,
systemctl, openssl unless you pass
--cert/--key, and
tar/find/head/groupadd
when Docker is not installed. The installer checks them before changing
the host and prints the dnf/apt-get packages
to install. |
sudo ./install.sh \
--api-key <KEY> \
--device-id <ID> \
--workspace <WS>| Flag | Default | Purpose |
|---|---|---|
--api-base-url <URL> |
https://api.roboflow.com |
Override for sovereign/enterprise (e.g.
https://api.roboflow.one). rfdm and the gateway's API
upstream (API_URL) both use it. |
--cert <path>
--key <path> |
auto-generated | Use your own TLS material. Must be passed together. |
--dns <IP> |
auto-detected | Pin dockerd's nameservers (repeatable). Useful when the host runs systemd-resolved with a 127.0.0.53 stub. |
The script:
/usr/local/bin/ and symlinks
docker+ctr into /usr/bin/
(skipped if Docker is already installed).docker loads the secure-gateway and seaweedfs
images./var/lib/rfdm/data/secure-gateway/tls/tls.{crt,key} (mode
0640, owner 1000:0) and creates the handshake
state directory (see Host
directories)./data/seaweedfs/ for the cache backend.rfconfig.json into place, so rfdm's
first start does not wait for a cloud configuration.rfdm -install to register the systemd unit, write
/opt/rfdm/config/device.json and start rfdm, which starts
the containers.The gateway certificate must cover both api.roboflow.com
and repo.roboflow.com in its DNS subject alternative names.
Clients route both hostnames to the gateway via /etc/hosts
and verify the TLS identities.
When you omit --cert/--key on a fresh install, the
installer generates a dedicated gateway CA (auto-ca.crt)
and a leaf certificate it signs (auto-tls.{crt,key}) under
/var/lib/rfdm/data/secure-gateway/tls/. It installs the
leaf followed by the CA as tls.crt, and the CA as
ca.crt. The CA's private key is discarded after signing, so
nothing on the gateway can mint certificates that clients trust, and the
CA's name constraints limit it to roboflow.com,
localhost and 127.0.0.1 (plus the
GATEWAY_PUBLIC_URL host when the gateway issues it).
CN=Roboflow Secure Gateway CA, O=Roboflow Secure Gateway, serialNumber=<serial>,
CA:true, pathlen:0, keyUsage
keyCertSign, cRLSign, the leaf's SANs, 7300 daysCN=repo.roboflow.com, O=Roboflow Secure Gateway, serialNumber=<serial>,
CA:false, serverAuthSANs: DNS:repo.roboflow.com, DNS:*.roboflow.com, DNS:localhost, IP:127.0.0.1Clients trust the CA, which the gateway serves at
/ca.crt. A trusted self-signed leaf is not enough for
OpenSSL 1.1.1 clients, including JetPack inference containers, which
fail with unable to get local issuer certificate.
Re-installs keep the current material: the chain in
/var/lib/rfdm/data/secure-gateway/tls (including one the
gateway reissued itself) or the existing auto-* files,
while the leaf has more than one year left. A self-signed certificate
from an earlier installer is kept too, with a warning. Pass
--rotate-tls to replace it with a new CA and leaf; any
reissue creates a new CA, because its key is not kept.
When the installer replaces tls.crt/tls.key
(after --rotate-tls or with a different
--cert), it restarts the secure-gateway
container, because the gateway loads its certificate only at startup and
rfdm keeps a running container whose spec did not change. If a later
step of that run fails, the next run still restarts it. If the container
does not exist yet, rfdm starts it with the new files. If you replace
the files any other way, run
sudo docker restart secure-gateway yourself.
After a rotation, every client must trust the new CA once. Take the
CA from the running gateway after it has restarted, because with
GATEWAY_PUBLIC_URL set the gateway issues its own CA after
the installer's:
curl -fsk https://<gateway>/ca.crt -o ca.crt, then
confirm it on the gateway host with
openssl verify -CAfile ca.crt /var/lib/rfdm/data/secure-gateway/tls/tls.crt.
ca.crt to the device,
run
sudo rfdm config gateway -url https://<gateway> -certificate-file ca.crt
(add -transparent if the device uses transparent mode),
then sudo systemctl restart rfdm.install-client.sh --force. A
re-run without --force trusts only the anchor already
installed, and every reissue creates a new CA, so it refuses the new one
and prints its fingerprints. Check the first of them against the
gateway's published CA (on the gateway host,
curl -fsk https://localhost/ca.crt | openssl x509 -noout -fingerprint -sha256)
before forcing.Replaced files are kept beside the originals as
<name>.legacy-<UTC timestamp> (with a numeric
suffix when two land in the same second), with the same mode and owner.
A rotation can leave more than one set, for example one from the
installer and one from the gateway's own reissue; the original material
is the set with the oldest timestamp. To roll back to a self-signed
certificate, copy that set over tls.crt,
tls.key, auto-tls.crt and
auto-tls.key, delete ca.crt and
auto-ca.crt, make sure TLS_REPLACE_LEGACY is
not set, and restart the gateway.
The backups include private keys, which can impersonate the old
identity to any client that still trusts it. Delete the
*.legacy-* files once every client has been re-trusted.
To bring your own cert, pass --cert/--key.
Later runs without --cert keep it; the installer moves its
earlier generated auto-* files aside as
*.legacy-<timestamp> backups. Include DNS SANs for
api.roboflow.com and repo.roboflow.com (an
applicable *.roboflow.com wildcard also works), plus the
hostname or IP in GATEWAY_PUBLIC_URL when configured.
Startup and client installation reject certificates missing either
canonical hostname; startup preserves the supplied certificate and key
for the operator to replace.
The gateway's TLS material and handshake state live under rfdm's data
directory, matching the rfdm secure-gateway service
definition:
| Host path | Container path | Owner and mode |
|---|---|---|
/var/lib/rfdm/data/secure-gateway/tls |
/etc/secure-gateway/tls |
root:0, 0770 |
/var/lib/rfdm/data/secure-gateway/state |
/var/lib/secure-gateway |
root:0, 2770 |
rfdm's systemd unit can write there; it cannot write
/etc/secure-gateway. rfdm releases after v0.12.0 reset both
directories to root:0 0770 when they start the
gateway; the gateway runs with primary group 0, so either mode
works.
Installers before this layout bound
/etc/secure-gateway/tls and
/var/lib/secure-gateway. Cloud configurations created
before rfdm moved the binds bind only
/etc/secure-gateway/tls. rfdm replaces the local
rfconfig.json with the device's cloud configuration once it
fetches one, so the installed file shows which paths the gateway is
using. For each old path the secure-gateway service still
binds at its usual container path, the installer replaces the new
directory with that path's content; other services' mounts do not count.
If there is no readable rfconfig.json and the new TLS
directory holds no certificate, the installer also takes the old TLS
directory's content rather than minting a new certificate. Clients
therefore keep trusting the same certificate, and the gateway keeps the
state it is actually using. For a path it no longer binds, the installer
copies nothing, so deleting a file from the new directory really removes
it, for example to force a new certificate.
A clean install cannot know whether the cloud configuration rfdm
fetches later binds the old paths, and rfdm cannot create a directory
under /etc itself. So on every run the installer also
creates both old paths with the same owners and modes, and copies the
TLS material, including the private key, into
/etc/secure-gateway/tls. A new --cert
therefore takes effect under either configuration. If you remove the old
directories, the next run creates them again.
On each client:
Clients require curl, jq,
openssl, cmp (diffutils), and the
distribution's CA trust tools. On an HTTPS gateway, re-running the
client installer on a configured client fetches /ca.crt and
/trust-bundle.crt first, over TLS verified against the
gateway anchor the client already has installed (or, if none is
installed, the system trust store), and refreshes the trust anchors if
they changed, for example a new device trust bundle. If the gateway's
certificate changed, so that the installed anchor no longer verifies it,
the re-run changes nothing and exits 1. It prints the SHA-256
fingerprints of what the gateway now publishes at /ca.crt.
Check that the first one matches the gateway's published CA (on the
gateway host,
curl -fsk https://localhost/ca.crt | openssl x509 -noout -fingerprint -sha256,
adding the port if it is not 443; the TLS certificate file starts with
the leaf, so it does not match) and re-run with --force to
trust them. A first install, or a run with --force, trusts
the gateway on first use, as earlier installers did, and prints the
fingerprints it trusts so they can be checked the same way. Because of
that fetch, the re-run exits 1 if the gateway is unreachable, where
earlier scripts exited 0 as already configured. Clients of a plain-HTTP
gateway (--insecure-http) install no trust anchors and
still exit 0 as already configured. The installer only installs
self-signed certificates from /ca.crt and
/trust-bundle.crt as trust anchors; a leaf or intermediate
of an operator certificate chain is skipped, so clients must already
trust that chain's root. Earlier installers also installed the
intermediate, which Go clients such as Docker and RFDM accepted as an
anchor; on operator full-chain setups, install the corporate root on
each client before re-running. Any PEM block other than
CERTIFICATE is refused. The client installer preserves
Docker settings and routes repo.roboflow.com directly
through the gateway; it does not configure a general HTTP forward proxy.
For a nondefault gateway port, include that port in Docker image
references.
# First install: nothing on the client can authenticate the gateway yet.
curl -fsSLk https://<gateway-host>/install-client.sh -o install-client.sh
sudo bash install-client.sh --server <gateway-host>The first install trusts what the gateway serves and prints its
SHA-256 fingerprints. Compare the first with the gateway's published CA,
on the gateway host:
curl -fsk https://localhost/ca.crt | openssl x509 -noout -fingerprint -sha256
(add the port if it is not 443). If they differ, something between the
client and the gateway served another certificate: run
sudo bash install-client.sh --uninstall to remove what was
installed, find the cause, and install again. The same check applies to
--force.
Re-run with the script fetched over TLS verified by the anchor the
first run installed, not with -k.
repo.roboflow.com already points at the gateway, and the
Host header selects the gateway's own routes:
# RHEL: --cacert /etc/pki/ca-trust/source/anchors/roboflow-secure-gateway.crt
curl -fsSL --cacert /usr/local/share/ca-certificates/roboflow-secure-gateway.crt \
-H 'Host: secure-gateway' https://repo.roboflow.com/install-client.sh \
| sudo bash -s -- --server <gateway-host>With an operator certificate no gateway anchor is installed; drop
--cacert, since the client already trusts the corporate
root. For a nondefault port, use
https://repo.roboflow.com:<port>/install-client.sh.
This:
<gateway-ip> repo.roboflow.com api.roboflow.com secure-gateway
to /etc/hosts.https://<gateway>/ca.crt and installs it to the
system trust store (/etc/pki/ca-trust/source/anchors/ on
RHEL, /usr/local/share/ca-certificates/ on Debian/Ubuntu)
plus /etc/docker/certs.d/repo.roboflow.com/ca.crt./etc/docker/daemon.json so Docker pulls from
repo.roboflow.com route through the gateway with full TLS
verification.Verify on the client:
curl -fI https://repo.roboflow.com/ # 2xx/3xx, no -k
openssl s_client -connect repo.roboflow.com:443 </dev/null \
| openssl x509 -noout -subject -dates -ext subjectAltName
docker pull repo.roboflow.com/inference/roboflow-inference-server-cpu:latestSet proxy env vars before running install.sh, and export
them to systemd so the rfdm service inherits them:
export HTTPS_PROXY=http://proxy.example.com:3128
export HTTP_PROXY=http://proxy.example.com:3128
export NO_PROXY=localhost,127.0.0.1,::1,169.254.169.254
sudo systemctl set-environment HTTPS_PROXY="${HTTPS_PROXY}"
sudo systemctl set-environment HTTP_PROXY="${HTTP_PROXY}"
sudo systemctl set-environment NO_PROXY="${NO_PROXY}"
sudo -E ./install.sh --api-key ... --device-id ... --workspace ...For the proxy to survive reboots, write a systemd drop-in:
sudo mkdir -p /etc/systemd/system/rfdm.service.d
sudo tee /etc/systemd/system/rfdm.service.d/proxy.conf >/dev/null <<EOF
[Service]
Environment=HTTPS_PROXY=http://proxy.example.com:3128
Environment=HTTP_PROXY=http://proxy.example.com:3128
Environment=NO_PROXY=localhost,127.0.0.1,::1,169.254.169.254
EOF
sudo systemctl daemon-reload
sudo systemctl restart rfdmrfdm propagates these into the secure-gateway and seaweedfs
containers and augments NO_PROXY with the sibling service
names and the RFC 1918 CIDRs, so intra-network traffic stays off the
proxy.
Endpoints the proxy must allow:
https://api.roboflow.com (or your
--api-base-url) — rfdm config poll + secure-gateway
handshakehttps://repo.roboflow.com — rfdm self-updatersystemctl is-active rfdm # active
sudo docker ps --filter name=secure-gateway --filter name=seaweedfs
# secure-gateway Up <N>m (healthy)
# seaweedfs Up <N>m
sudo docker logs secure-gateway 2>&1 | grep -E "Cache bound|startup complete" | tail
# [STARTUP] Cache bound to bucket=roboflow-cache prefix=... encryption=True
# INFO: Application startup complete.
curl -fk https://localhost/healthrfdm watches /opt/rfdm/config/rfconfig.json
and reconciles containers on change.
| Action | Command |
|---|---|
| Tail rfdm logs | sudo journalctl -u rfdm -f |
| Tail gateway logs | sudo docker logs -f secure-gateway |
| Edit container env | edit /opt/rfdm/config/rfconfig.json; rfdm picks it
up |
| Restart | sudo systemctl restart rfdm |
| Stop & disable | sudo systemctl disable --now rfdm |
| Symptom | What to do |
|---|---|
install.sh hangs at "Starting rfdm" |
rfdm can't reach api.roboflow.com. Set proxy env (see
above) and re-run. |
secure-gateway (unhealthy) |
sudo docker logs secure-gateway — usually a handshake
failure to the API; check the proxy chain. |
Client
x509: certificate signed by unknown authority |
Re-run install-client.sh so the gateway cert is added
to the client's trust store. Verify
/etc/docker/certs.d/repo.roboflow.com/ca.crt exists. |
sudo docker: command not found |
Symlinks at /usr/bin/docker are missing. Re-run
install.sh. |
Log sources by component:
| Component | Where |
|---|---|
| rfdm | sudo journalctl -u rfdm |
| Gateway HTTP | sudo docker logs secure-gateway |
| Cache backend | sudo docker logs seaweedfs |
| Docker daemon | sudo journalctl -u docker |
sudo systemctl disable --now rfdm
sudo /opt/rfdm/bin/rfdm -uninstall
sudo rm -rf /opt/rfdm /var/lib/rfdm/data/secure-gateway /etc/secure-gateway /var/lib/secure-gateway /data/seaweedfs
sudo docker rm -f secure-gateway seaweedfs 2>/dev/null
sudo docker rmi repo.roboflow.com/roboflow-edge/secure-gateway:* \
repo.roboflow.com/chrislusf/seaweedfs:* 2>/dev/null
# Bundled Docker (only if installer extracted it):
sudo systemctl disable --now docker.service docker.socket containerd.service
sudo rm /etc/systemd/system/{docker.service,docker.socket,containerd.service}
sudo rm /usr/local/bin/{docker,dockerd,docker-init,docker-proxy,containerd,containerd-shim-runc-v2,ctr,runc}
sudo rm -f /usr/bin/docker /usr/bin/ctr
sudo systemctl daemon-reload