Skip to main content
Connect

Endpoints

Tell your nodes and clients where the Rivet control plane is, with the namespace and token in one URL.

Local development

No configuration is needed. RivetKit runs a local control plane on your machine.

Production

Private endpoint

The private endpoint tells your nodes and backend where the control plane is. It carries a secret token, so keep it server-side.

Environment Variable

RIVET_ENDPOINT=https://my-namespace:<rivet-token>@rivet.example.com

Config

import { actor, setup } from "rivetkit";

const myActor = actor({
  state: {},
  actions: {}
});

const registry = setup({
  use: { myActor },
  endpoint: "https://my-namespace:<rivet-token>@rivet.example.com",
});

URL auth syntax

Endpoint URLs carry the namespace and token:

https://namespace:token@host/path

This is the recommended form. Alternatively, set them separately:

RIVET_ENDPOINT=https://rivet.example.com
RIVET_NAMESPACE=my-namespace
RIVET_TOKEN=<rivet-token>

On a self-hosted control plane, use your namespace slug and your Rivet token, the auth.admin_token value from the control plane config. For the default namespace: https://default:<rivet-token>@rivet.example.com.

Reference

Environment VariableConfig OptionDescription
RIVET_ENDPOINTendpointControl plane URL for your nodes and backend
RIVET_NAMESPACEnamespaceNamespace for Rivet Actor isolation
RIVET_TOKENtokenToken for the control plane connection