Skip to main content
All SlackHive configuration lives in a single .env file in the project root. The slackhive init CLI generates this file for you automatically. For manual setup, copy the example file and fill in the values:
cp .env.example .env
Never commit your .env file to version control. It contains passwords and cryptographic keys. It’s already listed in .gitignore, but double-check before pushing.

Claude Authentication

You need one of these two options — not both. If both are set, the API key takes precedence.

Option A: Anthropic API Key

Best for teams, production deployments, and predictable billing.
ANTHROPIC_API_KEY=sk-ant-api03-...
All agents share this key. You’re billed per token via the Anthropic API. Set up your billing and usage limits on the Anthropic console.

Option B: Claude Max Subscription

Best for individual developers on a Claude Pro or Max plan (100100–200/month for unlimited usage).
# Leave ANTHROPIC_API_KEY unset (comment it out)
CLAUDE_BIN=/usr/local/bin/claude
First, run claude login on the host machine to authenticate. Then mount the credentials into the runner container by adding this to docker-compose.yml:
runner:
  volumes:
    - ~/.claude:/root/.claude
The CLAUDE_BIN variable tells the runner where the claude binary lives on your host. Find the path with which claude.

Database (PostgreSQL)

VariableRequiredDescription
POSTGRES_DBYesDatabase name. Default: slackhive
POSTGRES_USERYesDatabase user. Default: slackhive
POSTGRES_PASSWORDYesDatabase password. Use a strong random value.
POSTGRES_DB=slackhive
POSTGRES_USER=slackhive
POSTGRES_PASSWORD=change-this-to-something-strong
The DATABASE_URL used internally is constructed from these values automatically in docker-compose.yml. You don’t set it directly.

Cache (Redis)

VariableRequiredDescription
REDIS_PASSWORDYesRedis authentication password. Used for the pub/sub event bus between the dashboard and the runner.
REDIS_PASSWORD=change-this-to-something-strong

Dashboard Authentication

VariableRequiredDescription
ADMIN_USERNAMEYesSuperadmin login name. Stored only in .env, never in the database.
ADMIN_PASSWORDYesSuperadmin login password. Stored only in .env.
AUTH_SECRETYesCryptographic key for signing session cookies. Changing this logs out all users.
ENV_SECRET_KEYYesEncryption key for the secret store (AES-256 via pgcrypto). Changing this breaks all stored secrets.
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change-this-to-something-strong
AUTH_SECRET=generate-with-openssl-rand-hex-32
ENV_SECRET_KEY=generate-with-openssl-rand-hex-32
Generate strong values for AUTH_SECRET and ENV_SECRET_KEY:
openssl rand -hex 32
Run this command twice — once for each variable. Each should be unique.
Do not rotate these keys after your initial setup without planning ahead.
  • Rotating AUTH_SECRET immediately invalidates all active user sessions — everyone gets logged out.
  • Rotating ENV_SECRET_KEY makes all stored secrets unreadable. You must re-enter every secret manually in Settings → Env Vars before any MCP servers using envRefs will work again.

Platform

VariableRequiredDefaultDescription
NODE_ENVNodevelopmentSet to production for production deployments. Affects log verbosity and error handling.
AGENTS_TMP_DIRNo/tmp/agentsRoot directory for agent workspaces inside the runner container. Each agent gets a subdirectory containing its CLAUDE.md, skills, and session data.
NODE_ENV=production
# AGENTS_TMP_DIR=/tmp/agents  # only change if you need a custom path

Complete .env.example

Here’s the full template for reference:
# ============================================================
# SlackHive — Environment Configuration
# Copy to .env and fill in your values.
# ============================================================

# --- Claude Authentication (choose ONE) ---

# Option A: Anthropic API key (pay-per-token)
# ANTHROPIC_API_KEY=sk-ant-api03-...

# Option B: Claude Pro or Max subscription
# Leave ANTHROPIC_API_KEY unset. Run `claude login` on the host first.
# CLAUDE_BIN=/usr/local/bin/claude

# --- PostgreSQL ---
POSTGRES_DB=slackhive
POSTGRES_USER=slackhive
POSTGRES_PASSWORD=change-me

# --- Redis ---
REDIS_PASSWORD=change-me

# --- Dashboard Auth ---
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change-me
AUTH_SECRET=generate-with-openssl-rand-hex-32
ENV_SECRET_KEY=generate-with-openssl-rand-hex-32

# --- Platform ---
NODE_ENV=production

Next steps

Slack App Setup

Configure the Slack app for each agent.

MCP Servers

Use the encrypted env store to safely pass secrets to MCP tools.