Skip to documentation

Self-host Relay from source

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:

ToolRequired versionUse
Go1.26.4Build and run Relay
Node.js22.19.0Build the Nuxt interface
GitCurrent supported releaseClone the repository
MakeCurrent supported releaseRun the supported workflow

Start Relay

  1. Clone the public repository.
git clone https://github.com/anchorshell/relay.git anchorshell-relay
  1. Enter the repository.
cd anchorshell-relay
  1. Install the Go and frontend dependencies.
make deps
  1. Start the production-style application.
make run
  1. Save the generated RELAY_ADMIN_TOKEN, RELAY_API_TOKEN, and RELAY_MASTER_KEY. Relay prints generated values once and writes them to a mode-0600 .env file.
Warning: Keep RELAY_MASTER_KEY outside your database backup. You cannot recover existing encrypted provider credentials if you lose this key.
  1. Open http://localhost:11730/.
  2. Enter RELAY_ADMIN_TOKEN when 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-tools

Start the Go and Nuxt development servers.

make dev

Open http://127.0.0.1:3030 for frontend work. The backend and API remain at http://127.0.0.1:11730.

Recovery

  • If port 11730 is busy, stop the conflicting process or set an explicit backend address.
  • If Node has the wrong version, run nvm use 22.19.0 and repeat make 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 run workflow again. It rebuilds and embeds the Nuxt output.

Next

Send a request through the dummy model.