> For the complete documentation index, see [llms.txt](https://galactic-bridge.gitbook.io/galactic-bridge-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://galactic-bridge.gitbook.io/galactic-bridge-docs/run-it-yourself.md).

# Run it yourself

The bridge is open source and runs locally with no server of your own.

## Windows

1. Install [Node.js LTS](https://nodejs.org/).
2. Download or clone [the repository](https://github.com/mckellen-eth/galactic-bridge).
3. Double-click **`start.bat`**.

On first run it creates a config file, installs dependencies and opens two console windows. Open `http://localhost:5173` when the frontend window is ready.

## macOS and Linux

```bash
git clone https://github.com/mckellen-eth/galactic-bridge.git
cd galactic-bridge
cp .env.example .env          # then edit .env, see below

cd backend  && npm install && cd ..
cd frontend && npm install && cd ..

grep '^VITE_' .env > frontend/.env

# terminal 1
cd backend && node server.js

# terminal 2
cd frontend && npm run dev
```

## Configuration

| Variable                 | Required | What it does                                                                                            |
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------- |
| `VITE_REOWN_PROJECT_ID`  | **Yes**  | Wallet connection. Get your own free ID at [dashboard.reown.com](https://dashboard.reown.com).          |
| `VITE_CF_BEACON_TOKEN`   | No       | Cloudflare Web Analytics, only if you host a public site. Empty means no analytics script loads at all. |
| `PORT`                   | No       | Backend port, default `3001`.                                                                           |
| `ALLOWED_ORIGINS`        | No       | Comma-separated CORS allowlist. Empty means open, which is fine for local use. Set it in production.    |
| `RL_MAX`, `RL_WINDOW_MS` | No       | Rate limit per IP, default 60 requests per 15 seconds.                                                  |
| `LOGS_RPC_<CHAIN>`       | No       | Archive RPC for one network — see [RPC nodes](/galactic-bridge-docs/rpc-nodes.md).                      |
| `RPC_FALLBACK_<CHAIN>`   | No       | Backup node used only when the public ones fail.                                                        |

{% hint style="warning" %}
Get your **own** Reown Project ID. It is tied to an account and has its own quota — reusing somebody else's will not work reliably. Without it the wallet window opens empty.
{% endhint %}

{% hint style="info" %}
`frontend/.env` is generated from the `VITE_` lines of the root `.env`. On Windows `start.bat` does this automatically; elsewhere run the `grep` command shown above. Vite reads environment variables only at startup, so restart the dev server after changing them.
{% endhint %}

## Adding a network

Add an entry to the `CHAINS` object in **both** `backend/lib/chains.js` and `frontend/src/lib/chains.js`, then register the chain for the wallet in `frontend/src/main.jsx`.

Take the endpoint ID (`eid`) from the [LayerZero deployments list](https://docs.layerzero.network/v2/deployments/deployed-contracts) — it is not the same number as the chain ID.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://galactic-bridge.gitbook.io/galactic-bridge-docs/run-it-yourself.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
