Connectors for private networks
A connector lets CodeBeast reach a self-hosted GitLab that isn't reachable from the internet. You run it inside your network, next to your GitLab. It dials out to CodeBeast, so you don't need to open an inbound firewall port, set up a VPN or publish DNS.
How it works
- The connector opens an outbound TLS connection to CodeBeast on port 8446.
- CodeBeast sends git and API traffic for your instance through that link, and the connector forwards it to your GitLab.
- TLS stays end-to-end between CodeBeast and your GitLab. The tunnel carries encrypted bytes it can't read.
- Both sides pin the target. The connector only forwards to hosts on your allow-list, and CodeBeast only sends traffic for the instance URL of the matching git connection. The connector can't be used to reach anything else on your network.
Set up a connector Admin only
Open Repositories and scroll to Connectors. Click New connector.
Enter a Connector name (for example
datacenter-east) and click Create connector.Copy the registration token. It's shown once — if you lose it, click New token to issue another.
Copy the command shown under the token and run it on a machine inside your network that can reach your GitLab. It looks like this, with your token and CodeBeast's gateway address already filled in:
shdocker run -d --restart unless-stopped \ -v codebeast-connector-state:/state \ -e DHQF_GATEWAY=<gateway host>:8446 \ -e DHQF_CONNECTOR_TOKEN=<token> \ -e DHQF_ALLOW=<your-gitlab-host>:443 \ dronahq/codebeast-connector:1.0.0Replace
<your-gitlab-host>with your GitLab's hostname.Wait for the connector to show online. The list refreshes every 30 seconds.
Connect your GitLab with Access set to Via connector (private instance) and pick this connector.
The host in DHQF_ALLOW must be identical to the host in the GitLab Instance URL you enter when connecting. If they differ, every request is refused even though the connector shows online.
Without Docker
A static binary is available for VMs and bare-metal hosts. It takes the same values as flags:
codebeast-connector \
--gateway <gateway host>:8446 \
--token <token> \
--allow <your-gitlab-host>:443The binary stores its secret in ~/.dhqfactory-connector.
Settings reference
| Env var | Flag | Meaning |
|---|---|---|
DHQF_GATEWAY | --gateway | CodeBeast gateway as host:port. No https:// — a scheme breaks the connection. |
DHQF_CONNECTOR_TOKEN | --token | The one-time registration token. Only needed on the first run. |
DHQF_ALLOW | --allow | Hosts the connector may forward to, as host:port. Comma-separated (env) or repeat the flag. |
DHQF_STATE_DIR | --state-dir | Where the long-lived secret is stored. /state in the Docker image. |
On its first connection the connector swaps the registration token for a long-lived secret and saves it in the state volume. Later restarts don't need the token.
Pin the image version (for example :1.0.0) rather than using latest, so upgrades happen when you choose.
Status
| Badge | Meaning |
|---|---|
| awaiting first dial | Created, but the connector hasn't connected yet. |
| online | At least one replica is connected. The card shows the replica count, version and the hosts it serves. |
| offline | No replica is connected. The card shows when it was last seen. |
| revoked | The connector was revoked and can't connect again. |
High availability
Run more than one replica with the same state volume (the same secret). CodeBeast spreads traffic across live replicas and fails over when one drops, so restarting a connector doesn't interrupt a running task.
HTTP-only GitLab
Connector access needs an https instance URL, because TLS runs end-to-end through the tunnel. If your GitLab only speaks plain HTTP, or its hostname isn't in DNS, put a small TLS proxy (Caddy) in front of it on the connector machine. The full recipe is in the CodeBeast UI under My GitLab is HTTP-only, or its hostname isn't in DNS, below the token. In short:
- Pick a hostname, for example
gitlab.yourco.com. It needs no DNS record. - Run Caddy with
tls internal, proxying that hostname to your GitLab's HTTP address. - Put Caddy and the connector on a shared Docker network, with the hostname as Caddy's network alias.
- Set
DHQF_ALLOW=gitlab.yourco.com:443. - Connect GitLab with instance URL
https://gitlab.yourco.com, access Via connector, TLS Custom CA bundle, and paste Caddy's root certificate.
The chosen hostname must be identical in four places: the Caddyfile site, the network alias, DHQF_ALLOW and the instance URL.
Rotate or remove a connector Admin only
- New token issues a fresh registration token, for example to register a new machine.
- Revoke (or Remove, if nothing uses it) disconnects the connector permanently. Git connections that use it stop working until you point them at another connector.