Skip to content
debpalashPublic

About

Open-source, self-hosted alternative to Clay.com for lead sourcing, enrichment waterfalls, AI research, buying signals, and outbound automation.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

153 stars

Watchers

0 watching

Forks

Latest commit

 

History

2,833 Commits

Folders and files

OpenGTM mark

OpenGTM

An open-source, self-hosted workspace for GTM teams and their agents.

Docs · Install · Releases · AGPL-3.0

Strategic sponsor
Spicrawl
Recommended by OpenGTM
Live web data for your AI agents.
Scrape pages, automate browsers, and batch URLs into clean Markdown or JSON.
API   CLI   MCP
Get 1,000 free credits →  ·  Pricing
Every month · Free during beta · No credit card

OpenGTM Companies workbench in the Global 100 demo workspace: a table of companies with their marks, domains, one-line descriptions and next action, beside the grouped workspace navigation

Companies workbench · v4.0.0 and later · built-in Global 100 demo

Give OpenGTM a market, a list, or a workbook. It finds companies and people, enriches rows through cost-ordered provider waterfalls, researches hard questions with cited agents, watches for buying intent, and sends qualified records to the tools your team already uses. Your data stays on your infrastructure; third-party calls use keys you choose. A zero-key demo is included.

Configure Firecrawl search and Spicrawl research.

See the workbench

The dashboard workbench runs on the native Go backend, with separate Companies and People, shared record history, Clay/CSV import mapping, and compact workspace navigation. Switch Light, Dark, System, and UI scale directly in the account menu. These recordings use fictional companies and people imported from CSV. The dashboard ships in v4.0.0 and later; v3.0.0 has the earlier UI. Every image here is retaken from a running stack by node scripts/screenshots/capture.mjs.

Companies, People and connected employment · 11-second demo

Inspect shared company facts, see its people, and follow a person's employment history without leaving the workbench.

Demo of the company inspector, connected people and employment history

Open the static dashboard screenshot.

Import a Clay table · 11-second demo

Map source columns, check the row preview, and import into the record library. The preview keeps import and enrichment as separate actions.

Demo of CSV upload, column mapping, row review and a confirmed import

Open the static dashboard screenshot.

Run it

Desktop and mobile previews

Platform Download Where the backend runs
Windows x64 Desktop installer On this computer with WSL 2, or on an HTTPS server
macOS (Apple silicon) and Linux x64 Desktop archives On an HTTPS server
Android Mobile preview On an HTTPS server
iOS Simulator Simulator build for Xcode On an HTTPS server

Open the desktop app and choose This computer on Windows, enter a server URL, or install a backend on your Linux server over SSH. On mobile, enter the server URL and sign in. The release notes list signing details and SHA-256 checksums. See the native app guide for installation, backups, and agent access.

Step-by-step install pages are on the docs site for desktop and mobile. The support matrices list the devices, offline features, providers and backend versions that have been tested. To bring an existing Docker Compose installation into the Windows desktop app, see Move a Compose installation into Desktop.

OpenGTM desktop window connected to a server, showing the Companies table of the Global 100 demo workspace with the server address under the workspace name

Desktop app window, source build from main, connected to a local test server

Sign-in form at phone width, naming the connected server above the username and password fields, with a Switch server button Companies list at phone width with search, column and sort controls above company marks, names and domains Draft outreach at phone width: an initial email for Amazon with its subject and body prefilled from the saved company brief

The mobile app's web UI in Chromium at a 390×844 phone viewport. These are not captures of a physical device.

Try one account from research to outreach

In a development build, choose Overview → Install Global 100 demo. Open Amazon from the company list and inspect its research source under Outreach brief. Ask Assistant prepares a question using the saved facts. You can edit it before asking your configured model.

As a workspace administrator, choose Draft outreach on the company, edit the message, and save. Use Edit draft to revise it later. The new sequence starts with zero recipients. Drafting works with the model and email sender disconnected. External agents can read the same record using Copy company ID and the workspace’s get_company MCP tool.

Self-host with Docker

You need Git, Docker with Compose v2, and roughly 4 GB of available RAM. No provider key is required to try the demo.

On your laptop

macOS or Linux:

git clone https://github.com/debpalash/OpenGTM.git
cd OpenGTM
./scripts/install.sh

Windows PowerShell with Docker Desktop:

git clone https://github.com/debpalash/OpenGTM.git
Set-Location OpenGTM
.\scripts\install.ps1

Open http://localhost:3000. The first visit redirects to /setup: create the admin account there. The setup form asks for a one-time setup token, which the API prints once at startup (docker compose logs api-go | grep -i 'setup token'), or set SETUP_TOKEN in .env before the first start. No default admin account exists, and setup closes for good once an admin is created. The installer generates database, runtime-role, signing and service-token secrets, then starts the stack. It leaves an existing .env untouched.

Low-memory install

The browser service (Chromium) is the heaviest part. Skip it with the lite override: docker compose -f docker-compose.yml -f docker-compose.lite.yml up -d --build. Measured idle after start, empty database: about 396 MiB across the default stack's containers versus about 113 MiB in lite mode, and 2.43 GB versus 0.52 GB of images. Lite mode cannot run lead collection jobs or page scraping (they fail with a "browser service" error); everything else works. Numbers, caveats and the list of what is unavailable are in the Docker guide.

On a server

Deploy a release tag, not main. The example pins v4.0.0, the first release of the Go runtime (release notes); record the resolved commit. Point a domain at the host and provide a TLS reverse proxy such as Caddy. On Linux with Git and Docker Compose:

OPENGTM_REF=v4.0.0               # a release tag; see https://github.com/debpalash/OpenGTM/releases
git clone https://github.com/debpalash/OpenGTM.git
cd OpenGTM
git checkout "$OPENGTM_REF"
git rev-parse HEAD               # record this revision for rollback
./scripts/install.sh --no-start
DOMAIN=gtm.example.com                 # replace with your domain
cat >> .env <<EOF
APP_ENV=production
PORT=127.0.0.1:3000
CORS_ORIGINS=https://$DOMAIN
EOF
docker compose up -d --build

For Caddy, a site block is enough once DNS points at the server and ports 80/443 are open:

gtm.example.com {
    reverse_proxy 127.0.0.1:3000
}

Open https://gtm.example.com/setup and create the admin account (setup token: docker compose logs api-go | grep -i 'setup token'). Replace the example domain in both commands and Caddy config. The installer-generated secrets satisfy production startup checks; PORT=127.0.0.1:3000 keeps the bundled HTTP listener private. PostgreSQL, Redis, and the API bind to loopback or the internal Compose network. Set up backups and review the production checklist before inviting a team. Never expose port 3000 directly over the internet.

For a new release, fetch its tag, check it out and run docker compose up -d --build (the migrate service applies schema changes before the API starts). Keep the existing .env and Docker volumes when upgrading. The Docker guide explains the services and scaling.

Upgrade an existing Python installation

A v3.0.0 installation upgrades directly to v4.0.0 (the Go runtime); no intermediate release and no Python are needed. The upgrade is forward-only: there is no schema downgrade, and rolling back means restoring the backup and running v3.0.0 again (procedure). Keep the same SECRET_KEY (workspace secrets are copied still encrypted). Run every step from the existing installation directory, so the Compose project and its volumes stay the same.

# 1. Still on v3.0.0: stop intake, let the Python worker finish, stop everything, back up.
docker compose stop api scheduler
docker compose exec -T postgres psql -U "${POSTGRES_USER:-yupcha}" -d "${POSTGRES_DB:-yupcha}" \
  -Atc "SELECT count(*) FROM jobs WHERE status = 'processing'"   # repeat until 0, then:
docker compose stop worker
docker compose exec -T postgres pg_dump -U "${POSTGRES_USER:-yupcha}" -d "${POSTGRES_DB:-yupcha}" -Fc > opengtm-v3.0.0.dump
docker compose exec -T postgres pg_restore --list < opengtm-v3.0.0.dump | head   # the archive must list tables
cp .env opengtm-v3.0.0.env && cp -a data opengtm-v3.0.0-data                   # SECRET_KEY and the SQLite stores
docker compose down                                                           # keeps the volumes

# 2. Switch the checkout to v4.0.0 and add the two secrets the Go stack requires and v3.0.0 did not have.
git fetch origin tag v4.0.0 && git checkout v4.0.0
printf 'INTERNAL_SERVICE_TOKEN=%s\nBROWSER_SERVICE_TOKEN=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" >> .env

# 3. Migrate the database, then copy the SQLite stores.
docker compose up -d postgres
docker compose run --rm migrate                      # bridges the v3.0.0 schema, then applies the Go migrations
docker compose run --rm -v "$PWD/data:/v3data:ro" migrate import-v3 --data-dir /v3data --dry-run
docker compose run --rm -v "$PWD/data:/v3data:ro" migrate import-v3 --data-dir /v3data

# 4. Start the Go stack and normalise the suppression list once.
docker compose up -d --build --remove-orphans
docker compose run --rm --entrypoint /suppressnorm worker-go --dry-run   # then again without --dry-run

A job the Python worker was still running when it stopped goes back to the queue and is run by the Go worker; a queued job with no workspace is marked failed with the reason. The Go API and worker refuse to start until migrate has run. If your .env was not written by v3.0.0's installer, Compose names any other variable it requires (SECRET_KEY, POSTGRES_PASSWORD, YUPCHA_RUNTIME_DB_PASSWORD): set the first two to the values v3.0.0 ran with.

import-v3 copies the SQLite stores (workspaces and members, workspace secrets, provider keys, chat history, workbook functions, chat memories), never modifies them and can be re-run. Leads, outreach and signals of a default install are in PostgreSQL and are upgraded in place by the migrator. If your v3.0.0 had PG_LEAD_STORE off, or connected as a superuser, it kept them in leads.db/outreach.db/signals.db: import-v3 then stops without writing anything; move them with v3.0.0's scripts/migrate_sqlite_to_pg.py first (or pass --skip-unmigrated to leave them behind). Sign in with your existing v3.0.0 account. scripts/release/rehearse-upgrade.sh rehearses steps 3 and 4, and the .env requirement of step 2, on a throwaway v3.0.0 install with queued work (what it checks); rehearse on a copy of your own installation before upgrading production. See the 4.0.0 release notes for the limitations, the migration guide and the cutover runbook.

Operate it

docker compose ps                         # service health
docker compose logs -f api-go worker-go   # follow requests and jobs
docker compose up -d --scale worker-go=4  # add capacity
docker compose down                       # stop without deleting data

Build from source

Needs Go, Bun and a Postgres/Redis (make up starts the compose stack). The web UI is embedded in the Go API binary, so one build gives one server:

make build   # web UI + bin/opengtm-{api,worker,mcp,scheduler,seed,migrate} + bin/suppressnorm
make run     # build, then start api + worker in the background (.run/*.pid, .run/*.log)
make dev     # Vite dev server for apps/web (VITE_API_TARGET, default http://127.0.0.1:3000)
make kill    # stop whatever make run / make dev started
make up      # docker compose up -d --build
make down    # docker compose down
make test    # go vet + go test, web lint + build

make run uses the environment of the shell (DATABASE_URL, SECRET_KEY, ...); set SERVE_UI=false to serve the API only.

For a non-Docker install, make migrate needs an owner-privileged DATABASE_URL. Runtime-role provisioning is optional and disabled by default; see the Go migration runbook for the provisioning variables and the runtime connection setup before starting the app processes.

What you can build

  • Workbooks: import leads, add formulas, HTTP columns, enrichment waterfalls, AI research, and output columns. Estimated spend is shown before a run.
  • Live audiences: segment records, watch hiring and buying signals, and trigger scheduled refreshes and automations.
  • Activation: connect HubSpot, Salesforce, Slack, Sheets, Airtable, Instantly, Smartlead, webhooks, warehouses, or consent-gated ad audiences.
  • Agent access: use the same workspace through REST, webhooks, and an auditable MCP server with scoped read/write capabilities.

Provider keys are optional at install. Add them under Settings → API Keys when you're ready to use paid or authenticated providers.

Connect an AI agent

Create a workspace token from an admin session, then give your MCP client a read-only token first. The Go MCP server runs over stdio in a one-off container:

{
  "mcpServers": {
    "opengtm": {
      "command": "docker",
      "args": [
        "compose", "-f", "/absolute/path/to/OpenGTM/docker-compose.yml",
        "--profile", "mcp", "run", "--rm", "-T", "--no-deps", "-e", "OPENGTM_MCP_TOKEN",
        "mcp", "stdio"
      ],
      "env": { "OPENGTM_MCP_TOKEN": "YOUR_WORKSPACE_TOKEN" }
    }
  }
}

See the MCP guide for token creation, Codex/Claude/Pi/OpenCode setup, HTTP transport, and safe write scopes.

How it fits together

browser / REST / MCP
         │
         ▼
nginx ──► Go API (api-go, embedded web UI) ──► PostgreSQL + forced workspace RLS
              │                                     │
              ├──► Redis progress                   └──► durable job queue
              │                                              │
              │                    Go worker + Go scheduler ◄┘
              │                              │
              └──────────► browser service (internal: Playwright, scrapers; no DB, no secrets)
                                             │
                           providers / web / CRM / warehouse / ads

apps/backend-go owns the backend (API, worker, scheduler, MCP server, migrations), apps/web the React UI, apps/browser-service the internal browser/scraper service (the only Python, called only by Go), and apps/docs the documentation. Read the architecture guide for tenancy and failure behavior.

Backend

The backend is Go: APIs, enrichment orchestration, durable job workers and scheduling, with pooled HTTP clients, bounded concurrency, provider rate limits, cancellation and batched writes. Python remains only inside the internal browser service (Playwright Chromium and scraper libraries), which has no database access and no secrets. Optional Rust acceleration may follow where profiling and end-to-end benchmarks show a benefit. See the port notes and release readiness.

Scope and contribution

OpenGTM covers the discover → enrich → segment → act → learn loop. It is not a pixel-for-pixel Clay clone, and the provider catalog is still growing. Public multi-tenant hosting needs additional egress, identity, custody, restore, and security-review work beyond the supported team-controlled Compose deployment; see the parity roadmap.

Issues, provider requests, docs fixes, and focused pull requests are welcome. Start with CONTRIBUTING.md. Licensed under GNU AGPL-3.0; network use of modified versions carries source availability obligations.

About

Open-source, self-hosted alternative to Clay.com for lead sourcing, enrichment waterfalls, AI research, buying signals, and outbound automation.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

153 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages