Self-Hosting with Docker
Run the full tmam stack — dashboard, API server, and database — on your own machine with a single command.
Prerequisites
- Docker v20+
- Docker Compose v2+
Step 1 — Clone the repo
git clone https://github.com/tmam-dev/tmam.git
cd tmam
Step 2 — Configure the server
Open server/src/.env and update the values for your setup:
# -- Database ------------------------------------------
DB_TYPE=Local
DB_LOCAL_URI=mongodb://mongo:27017/
# -- Security (required: change these before deploying) -
EDCRYPT_PASS=change_me_to_something_strong
PBECRYPT_PASS=change_me_to_something_strong
# -- Email via SendGrid (Optional)---------------------------------
# Used for: email confirmation, password reset, and team invitations
SENDGRID_API_KEY=your_sendgrid_api_key
SENDGRID_SENDER=support@yourdomain.com
FRONTEND_URL=http://localhost:3001
# -- Google OAuth (optional) ----------------------------
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
Tip
The JWT private/public key pair in
.envis pre-generated for local development.
For production, replace it with your own RSA key pair.
Step 3 — Configure the web client
Open web-client/.env and set:
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET=your_generated_secret
NEXTAUTH_URL=http://localhost:3001/
EXTERNAL_API_URL=http://server:5050/
# (Optional) Must match the Google Client ID in server/.env
GOOGLE_CLIENT_ID=your_google_client_id
Step 4 — Start everything
docker compose up --build
| Service | URL | Description |
|---|---|---|
| Dashboard | http://localhost:3001 | Web UI for observability |
| API Server | http://localhost:5050 | Backend API |
| SDK Endpoint | http://localhost:5050/api/sdk | Point your SDK url here |
| MongoDB | localhost:27018 | Internal database |
Useful Docker commands
# Run in the background
docker compose up --build -d
# Stream logs
docker compose logs -f
# Stop all services
docker compose down
# Stop and wipe all data (database included)
docker compose down -v