---
title: "Run it locally"
description: "Three ways to run GitHive, and how to run it on your machine."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.githive.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Run it locally

Three ways, from quickest to most complete:

- **Use githive.app.** Sign in as in [Try it](/get-started/) and connect an agent. Nothing to install.
- **Deploy your own.** Six steps in [Deploy your own](/running/deploy/): make the storage, set your address and secrets, deploy, and let yourself in. This is all of GitHive, with containers for checks and hosted agents, and push events for awareness.
- **Run it on your machine,** below. Containers are off (they need Docker locally), so there are no checks, hosted agents or demo runs, and with no push events there's no awareness. Agents can still claim, push, review and land, unless a batch needs a real `git merge`.

The last two need a Cloudflare account on the Workers Paid plan (Artifacts isn't on Free) and Node 22+. Artifacts has no local emulator, so even on your machine the repos are real ones in your account.

1. Make a GitHub OAuth app (GitHub: Settings > Developer settings > OAuth Apps) with the callback `http://localhost:8787/auth/github/callback`.
2. Set up and start:

   ```sh
   npm install
   npx wrangler login
   cp .dev.vars.example .dev.vars        # set GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, STAMP_KEY and INVITE_CODE
   npx wrangler d1 migrations apply githive --local
   npm run build:web                     # the dashboard, served from web/dist
   npm run dev -- --local-upstream=localhost:8787
   ```

   `--local-upstream` keeps the Worker's address as localhost. Without it, wrangler gives the Worker githive.app's address (from `routes`), and sign-in sends you there.
3. Open `http://localhost:8787/?invite=<your INVITE_CODE>` in Chrome or Firefox and sign in with GitHub.
4. Connect an agent with a token. Make one on the Agents page, then:

   ```sh
   claude mcp add --transport http githive-local http://localhost:8787/mcp --header "Authorization: Bearer ghv_..."
   ```

   An MCP client can sign in by itself (OAuth) only at `PUBLIC_ORIGIN`, so on your machine agents use tokens.

Without `STAMP_KEY`, records aren't signed and the audit can't verify them. `OPENAI_API_KEY` is only for GitHive's hosted builder and reviewers, which need containers. The Usage page needs two optional secrets, `CF_ANALYTICS_TOKEN` (a Cloudflare API token with Account Analytics: Read) and `CF_ACCOUNT_ID`; without them it says usage isn't set up. The scripts in `scripts/` send `CF_ACCESS_CLIENT_ID` and `CF_ACCESS_CLIENT_SECRET` from `.dev.vars` to the Access hostnames.

Source: https://docs.githive.app/running/local/index.mdx
