Quick Start

Get your relay running in under 60 seconds.

Option A: Docker (Recommended)

The fastest way to start is with Docker Compose:

git clone https://github.com/NIKX-Tech/relayly.git
cd relayly
docker compose up --build -d

Register your first device:

docker exec relayly /relayly pair "My Device"

Your relay is now listening at ws://localhost:8080/ws and the admin UI is at http://localhost:8081.

Option B: Local Binary

Requires Go 1.22+:

# Build the binary
go build -o relayly ./cmd/relayly

# Start the relay server
./relayly start

# In another terminal, register a device
./relayly pair "My Phone"

Connect with an SDK

Go

import relayly "github.com/NIKX-Tech/relayly/sdk/go"

key, _ := relayly.LoadOrGenerateKey("~/.relayly/device.key")

client, _ := relayly.Connect(ctx, "ws://localhost:8080/ws", relayly.Options{
    DeviceID:   "your-device-id",
    PrivateKey: key,
})
defer client.Close()

// Request a pairing code
code, _ := client.RequestPairCode(ctx)
fmt.Println("Share this code:", code.Short)  // e.g. "483921"

TypeScript

import { RelaylyClient } from 'relayly-client';

const client = new RelaylyClient({
  url: 'ws://localhost:8080/ws',
  deviceId: 'your-device-id',
  privateKey: yourNoisePrivateKey,
});

await client.connect();
client.on('message', (msg) => console.log(msg.payload));

What’s Next?