Self-host Relay from source
Clone the public Relay repository, start the embedded application, and protect its first-run secrets.
Purpose
Run AnchorShell Relay from the public source repository. This procedure starts the Go service and its embedded admin interface.
Prerequisites
Install these tools before you continue:
| Tool | Required version | Use |
|---|---|---|
| Go | 1.26.4 | Build and run Relay |
| Node.js | 22.19.0 | Build the Nuxt interface |
| Git | Current supported release | Clone the repository |
| Make | Current supported release | Run the supported workflow |
Start Relay
- Clone the public repository.
git clone https://github.com/anchorshell/relay.git anchorshell-relay- Enter the repository.
cd anchorshell-relay- Install the Go and frontend dependencies.
make deps- Start the production-style application.
make run- Save the generated
RELAY_ADMIN_TOKEN,RELAY_API_TOKEN, andRELAY_MASTER_KEY. Relay prints generated values once and writes them to a mode-0600.envfile.
Warning: Keep RELAY_MASTER_KEY outside your database backup. You cannot recover existing encrypted provider credentials if you lose this key.- Open
http://localhost:11730/. - Enter
RELAY_ADMIN_TOKENwhen the interface asks you to unlock administration.
Expected result
The Dashboard opens. Relay serves the admin interface and the OpenAI-compatible gateway from port 11730.
The management token protects the dashboard and management API. Inference separately requires RELAY_API_TOKEN. An explicitly empty RELAY_API_TOKEN= disables inference authentication; use that only in a controlled environment. Keep HTTPS and network access controls for remote deployments.
Verification
Open http://localhost:11730/ and confirm that the admin unlock screen loads. After configuration, send a request and confirm it appears in Logs.
Use hot reload
Install the development watcher once.
make install-dev-toolsStart the Go and Nuxt development servers.
make devOpen http://127.0.0.1:3030 for frontend work. The backend and API remain at http://127.0.0.1:11730.
Recovery
- If port
11730is busy, stop the conflicting process or set an explicit backend address. - If Node has the wrong version, run
nvm use 22.19.0and repeatmake deps. - If Relay rejects the master key, restore the exact key that encrypted the stored provider credentials.
- If the UI build is stale, run the supported
make runworkflow again. It rebuilds and embeds the Nuxt output.