Roboflow Secure Gateway — Podman Installer Guide. This is the canonical install walkthrough that ships inside the Podman installer tarball as README.md. Bookmark the bundle URL alongside this guide — both live next to each other in repo.roboflow.com/rfdm/secure-gateway/podman/.

Roboflow Secure Gateway — offline installer for Podman

This tarball installs the Roboflow Secure Gateway on a Linux x86_64 host running rootful Podman (RHEL 9 and other podman-native distributions). After install, the gateway runs as two Podman containers (secure-gateway, seaweedfs) supervised by rfdm in podman mode.

For plain Linux + Docker hosts, use the docker-flavor bundle (secure-gateway-offline-installer-*) instead; for Red Hat Device Edge (MicroShift) hosts, use the MicroShift flavor (secure-gateway-microshift-installer-*).


TL;DR

# 1. Download the latest bundle + its sha256 sidecar
curl -fOL https://repo.roboflow.com/rfdm/secure-gateway/podman/latest/secure-gateway-podman-installer-linux-amd64.tar.gz
curl -fOL https://repo.roboflow.com/rfdm/secure-gateway/podman/latest/secure-gateway-podman-installer-linux-amd64.tar.gz.sha256

# 2. Verify integrity
echo "$(cat secure-gateway-podman-installer-linux-amd64.tar.gz.sha256)  secure-gateway-podman-installer-linux-amd64.tar.gz" \
  | sha256sum -c -

# 3. Extract and run
tar xzf secure-gateway-podman-installer-linux-amd64.tar.gz
cd secure-gateway-podman-installer

sudo ./install-podman.sh \
    --api-key   <ROBOFLOW_API_KEY> \
    --device-id <DEVICE_ID> \
    --workspace <WORKSPACE>

The installer is idempotent. It enables podman.socket, loads the bundled images into root podman storage, generates a long-lived TLS cert, and starts rfdm in podman mode.


Requirements

OS Linux x86_64 with systemd and SELinux-aware Podman (RHEL 9.x recommended)
Podman 4.x+ (RHEL 9 ships 4.x/5.x), rootful, with the netavark network backend — the installer forces netavark if the host has drifted to legacy CNI
Privileges root (sudo)
Disk ~3 GB free on / plus cache space under /data
Ports 80/443 free on the host — rfdm's podman mode handles the unprivileged-port sysctl at container-create time
Network Outbound HTTPS to api.roboflow.com (or your --api-base-url) and repo.roboflow.com once running. Nothing is pulled during install.
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, and openssl unless you pass --cert/--key. The installer checks them before changing the host and prints the dnf packages to install; RHEL 10 cloud images, for example, lack openssl.

Warning: rootful Podman shares /var/lib/containers/storage with CRI-O. If this host also runs CRI-O or MicroShift, rfdm's periodic image prune can reclaim images CRI-O still needs. A dedicated gateway host is recommended (the installer warns if it detects CRI-O/MicroShift; for MicroShift hosts use the MicroShift-flavor bundle instead).


Install

sudo ./install-podman.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.

The script:

  1. Preflights: podman >= 4 present, warns if CRI-O/MicroShift shares the container storage, enables podman.socket, and verifies the network backend is netavark — if the host auto-selected legacy CNI (stray configs in /etc/cni/net.d), it pins netavark via /etc/containers/containers.conf.d/99-roboflow-netavark.conf (existing podman containers on the host must be recreated after that). On SELinux-enforcing hosts it also enables the container_read_certs boolean, since rfdm bind-mounts the host CA bundle (cert_t) into the containers.
  2. podman loads the bundled secure-gateway and seaweedfs OCI archives into root podman storage, under exactly the tags the rfconfig pins.
  3. Installs the gateway TLS cert at /var/lib/rfdm/data/secure-gateway/tls/tls.{crt,key} (mode 0640, owner 1000:0 — the gateway container runs as UID 1000 with primary group root, the OpenShift arbitrary-UID convention, so the directory is root:0 0770 for gid-0 traversal), and creates the handshake state directory (see Host directories).
  4. Creates /data/seaweedfs/ for the cache backend.
  5. Writes /opt/rfdm/config/device.json with "runtime": "podman" and drops the bundled podman-mode rfconfig.json into place — before rfdm ever starts, so the first start reconciles from the local config and never waits on a cloud config fetch.
  6. Runs rfdm -install, which generates a podman-aware systemd unit (Requires=podman.socket) and starts rfdm, which creates the containers via podman's Docker-compatible API. Also enables podman-restart.service for boot-time restart-policy coverage.

SELinux note: the rfconfig's bind mounts carry :Z/:z suffixes, so podman relabels the host paths itself — no manual chcon is needed, and the install works unchanged with SELinux enforcing.


TLS certificate

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).

Clients 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 podman 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.

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.

Host directories

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.


Pointing clients at the gateway

Same as the docker flavor — 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.


Verify

systemctl is-active rfdm                                        # active
sudo podman ps --filter name=secure-gateway --filter name=seaweedfs
# secure-gateway   Up <N>m (healthy)
# seaweedfs        Up <N>m

sudo podman 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/health

Day-2

rfdm 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 podman 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

Troubleshooting

Symptom What to do
install-podman.sh hangs at "Restarting rfdm" rfdm can't reach api.roboflow.com. Check outbound HTTPS/proxy and re-run.
Containers up but the gateway can't reach seaweedfs (DNS errors in podman logs secure-gateway) The network backend fell back to legacy CNI (no aardvark-dns). sudo podman info --format '{{.Host.NetworkBackend}}' must print netavark; the installer pins it via /etc/containers/containers.conf.d/99-roboflow-netavark.conf. If podman refuses to switch, sudo podman system reset and re-run the installer.
secure-gateway exits with a TLS PermissionError /var/lib/rfdm/data/secure-gateway/tls/tls.key must be owned 1000:0 mode 0640 and the directory root:0 0770 (the container runs as UID 1000 with gid 0). Re-run the installer to fix ownership.
secure-gateway crash-loops with PermissionError reading SSL_CERT_FILE (/etc/ssl/certs/ca-certificates.crt) SELinux is blocking the container from the host CA bundle rfdm bind-mounts in (cert_t, and the AVC is dontaudit'ed so ausearch shows nothing). sudo setsebool -P container_read_certs on — the installer does this in preflight; re-run it.
Gateway can't bind 80/443 rfdm's podman mode sets the unprivileged-port sysctl on the container at create time — make sure rfdm (not a manual podman run) created it, and nothing else holds the ports: ss -tlnp 'sport = :443'.
rfdm inactive with Requires=podman.socket failures sudo systemctl enable --now podman.socket, then sudo systemctl restart rfdm.
Images disappeared after host cleanup A CRI-O/kubelet GC or manual prune on a shared-storage host can remove them. Re-run ./install-podman.sh to re-load.

Log sources by component:

Component Where
rfdm sudo journalctl -u rfdm
Gateway HTTP sudo podman logs secure-gateway
Cache backend sudo podman logs seaweedfs
Podman API socket sudo journalctl -u podman.socket

Uninstall

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 podman rm -f secure-gateway seaweedfs 2>/dev/null
sudo podman rmi repo.roboflow.com/roboflow-edge/secure-gateway:* \
                repo.roboflow.com/chrislusf/seaweedfs:* 2>/dev/null
sudo rm -f /etc/containers/containers.conf.d/99-roboflow-netavark.conf
sudo systemctl disable --now podman-restart.service 2>/dev/null
sudo systemctl daemon-reload