Deployment
Overview
crocbot supports two deployment paths:- Local — native Node for development and testing
- Docker — runtime-only container for production or isolated environments
Local Deployment (Node)
Run crocbot directly on your machine with Node.js.Prerequisites
- Node.js 22+
- pnpm
Quick Start
Environment Variables
Set these in.env or export them:
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY | Anthropic API key | - |
TELEGRAM_BOT_TOKEN | Telegram bot token | - |
CROCBOT_STATE_DIR | Runtime state directory | ~/.crocbot |
CROCBOT_WORKSPACE | Agent working directory | ~/croc |
Commands
Docker Deployment
Use Docker for production or isolated environments. The Dockerfile packages a pre-builtdist/ into a lean node:22-slim runtime image.
Prerequisites
- Docker Engine + Docker Compose v2
- Pre-built
dist/directory (pnpm build)
Quick Start
Environment Variables
Set these in.env or export them:
| Variable | Description | Default |
|---|---|---|
CROCBOT_CONFIG_DIR | Host path for config | ~/.crocbot |
CROCBOT_WORKSPACE_DIR | Host path for workspace | ~/croc |
CROCBOT_GATEWAY_PORT | Gateway HTTP port | 18789 |
CROCBOT_GATEWAY_TOKEN | Gateway auth token | Auto-generated |
ANTHROPIC_API_KEY | Anthropic API key | - |
TELEGRAM_BOT_TOKEN | Telegram bot token | - |
Commands
CI/CD Pipeline
The repository includes CI workflows:ci.yml— runs lint, build, and tests on push/PRdocker-release.yml— builds and publishes Docker images on releasesecurity.yml— CodeQL security scanning
Release Process
- Update version in
package.json - Update
CHANGELOG.md - Create release commit
- Tag with version:
git tag vYYYY.M.D - Push with tags:
git push --tags - CI builds and publishes Docker image
