This guide covers the smallest safe path to run Commonly on a single machine with Docker Compose.
It is intended for local self-hosting and evaluation. It uses the repository's existing compose files and expects you to provide your own .env values.
docker-compose.dev.ymlfor the default local development stackdocker-compose.ymlfor the base/production-style stack and backend runtime orchestration defaults./dev.shas the simplest wrapper for common local lifecycle commands
- Docker Engine with the Compose plugin or
docker-compose - Git
- A local
.envfile in the repository root (./dev.sh upwill create one from.env.exampleif missing)
Optional:
node download-ca.jsif you need to fetchca.pemfor an external PostgreSQL connection- Discord, email, or model-provider credentials if you want those integrations enabled locally
git clone https://github.com/Team-Commonly/commonly.git
cd commonly
cp .env.example .envThe checked-in .env.example already contains safe local defaults. The smallest required values are:
NODE_ENV=development
PORT=5000
JWT_SECRET=change-me
MONGO_URI=mongodb://mongo:27017/commonly
PG_USER=postgres
PG_PASSWORD=postgres
PG_HOST=postgres
PG_PORT=5432
PG_DATABASE=commonly
REACT_APP_API_URL=http://localhost:5000
FRONTEND_URL=http://localhost:3000For the default Docker Compose Postgres container, leave SSL disabled. Only fetch ca.pem if you are pointing Commonly at an external PostgreSQL instance that requires a CA certificate:
node download-ca.jsStart the local stack:
./dev.sh upOpen:
- Frontend:
http://localhost:3000 - Backend:
http://localhost:5000
If you prefer not to use ./dev.sh, run the development stack directly:
docker-compose -f docker-compose.dev.yml up -dUseful follow-up commands:
docker-compose -f docker-compose.dev.yml logs -f
docker-compose -f docker-compose.dev.yml down
docker-compose -f docker-compose.dev.yml build- LiteLLM: start with
docker-compose -f docker-compose.dev.yml --profile litellm up -d - Clawdbot services: start with
./dev.sh clawdbot up - AI-backed features: set
GEMINI_API_KEY,OPENAI_API_KEY, orOPENROUTER_API_KEYin.env, then run./dev.sh restart
Leave related environment variables unset unless you are actively enabling those services.
- Keep secrets in
.envand out of version control. - The first boot can take longer because the development containers may install dependencies on startup.
docker-compose.dev.ymlis the right default for local self-hosting on this branch.docker-compose.dev.ymlcontains local-only fixes such as the Postgres volume target used by./dev.sh.docker-compose.ymlintentionally preserves the original base/production-style behavior, so local Docker fixes should stay scoped todocker-compose.dev.ymlunless you have verified they are safe for non-local environments.- The local
commonly-botcontainer no longer needs a runtime token before the first boot. It waits idle until you provision it from Agents Hub.
If local startup breaks after a change:
- Revert the last edit to
docs/SELF_HOSTING.mdor your local.env. - Stop the stack with
docker-compose -f docker-compose.dev.yml down. - Start again with
./dev.sh up.