title: Docker Connector Setup tags: [docker, onboarding, connectors]
Docker connector setup
This guide describes the current Docker bootstrap image, not the managed NixOS module. Read it before searching connector source during onboarding.
Start with the route
Ask what the agent should watch, where it should send a result, and whether
the user wants approval before sending. For a Discord-to-Slack notification,
the minimum choices are Discord server/channel scope and a Slack destination.
Ask whether the user has the bot credentials ready for private provisioning;
remind them not to paste credentials into chat. The selected connector names in
/opt/workspace/.cowboy/connector-interests.json express interest, not working
accounts. The seeded /etc/cowboy/agent.nix already has the agent name and
model.
What the image actually starts
cowboy init --mode docker starts the setup agent, a separate credential proxy,
and Redis. The proxy holds the age identity and encrypted provider credential;
the agent’s /etc/cowboy/keys.json contains only a "proxy" placeholder for
that provider. The proxy and Redis require a per-agent client password, which
the agent receives in its proxy settings, REDIS_URL and REDISCLI_AUTH; a
bridge must take its broker address from REDIS_URL, not
REDIS_HOST/REDIS_PORT alone. The CLI starts the agent only after the proxy
reports that both services enforce the password. A cached image from an
earlier release does not, so the CLI refuses it and asks you to pull the image
that matches the CLI. An agent container created by an earlier release has no
password in its environment. Once its proxy is recreated, the proxy and Redis
refuse that container until cowboy serve <name> recreates it too. The Docker container template builds a
cowboy-supervisor that starts one Cowboy serve process. It does not start Discord, Hermes/Slack,
or another connector process, and it does not generate bridge routing.
The image includes the Discord bridge executable. The Hermes Slack bridge is
available as cowboy.packages.${system}.hermes-service in the source flake but
is not part of the base image. The NixOS options in
docs/src/guides/chat-platforms.md and pkgs/{discord,hermes}/module.nix
configure systemd services on a managed NixOS host; putting those options in
the Docker template does not create services in this container.
cowboy __request-secret can hand the user to the masked credential screen and
store encrypted connector files in the proxy volume. That handoff alone does
not make a bridge able to authenticate. There is presently no Docker
connector declaration that starts the bridge, generates its sources.json,
and arranges proxy-side use of its credential. Do not read an encrypted file
from the agent, export a token into its environment, or claim a connector works
because the ciphertext exists.
Discord to Slack today
The intended path needs all of these pieces:
- A Discord ingest process with the bot’s access to the chosen channels.
- Routing from that source to the named Cowboy agent, plus a rule for which messages merit notification.
- A Slack outbox process with the destination channel and its own bot/app access.
- Connector credentials used by the proxy or another isolated companion, without exposing plaintext to the agent.
- Supervision, restart, and an end-to-end smoke check for both bridges.
The current Docker bootstrap supplies none of that service wiring. Save the user’s exact scope and approval choices in the agent profile, mark both connectors pending, and explain the missing Docker integration plainly. Do not burn the setup session surveying source files or improvise a background process that disappears on restart. Continue any independent setup the user requested. If the user wants a working connector now, a managed NixOS deployment has declarative Discord and Hermes modules; its configuration and secret paths are a different deployment path.
For Docker connector development, the focused starting files are
templates/container/flake.nix, cowboy/companion.py,
pkgs/discord/{ingest,outbox}.py, pkgs/hermes/outbox.py, and
pkgs/bridge/redis_utils.py. Treat this as product work with a bridge runtime
and tests, not as a one-off onboarding script.