For the complete documentation index, see llms-docs.txt or the site index llms.txt. Full docs corpus: llms-full-docs.txt. Prefer the markdown version of this page at /docs/setup/backend/domain.md. Product capabilities: skill.md. Docs MCP: /docs/mcp. Site MCP: /mcp.

Domain

Set up, configure, and run the Reloop domain microservice locally.

Custom sending domains, DKIM keys, DNS verification, and tracking subdomain setup.

Overview

PropertyValue
Directoryapps/backend/domain
Port8011
Local URLhttps://local.reloop.sh/api/domain
Swagger UIhttps://local.reloop.sh/api/domain/openapi
StackElysiaJS · PostgreSQL · Redis · NATS

Quick start

bun be:domain:dev

Or bun backend:dev / bun dev.

Environment

apps/backend/domain/.env — from bun setup / bun env:setup.

PG_URL=postgresql://reloop:reloop123@localhost:5432/reloop
REDIS_URL=redis://:reloop123@localhost:6379
PORT=8011
BASE_URL="https://local.reloop.sh"
HOST_DOMAIN=reloop.sh
DKIM_SELECTOR=reloop
NATS_URL=nats://localhost:4222
NODE_ENV=development
VariableRequiredDefault
PG_URLYESpostgresql://...
REDIS_URLYESredis://...
PORTYES8011
BASE_URLYEShttps://local.reloop.sh
HOST_DOMAINYESreloop.sh
DKIM_SELECTORYESreloop
NATS_URLYESnats://localhost:4222

Commands

CommandDescription
bun be:domain:devStart dev server with hot reloading
bun run --filter=be-domain buildCompile production bundle
bun run --filter=be-domain startRun compiled production build
bun run --filter=be-domain check-typesTypeScript type-check

Architecture

LayerDetail
DNS verificationValidates DKIM, SPF, DMARC, MX, and CNAME records per domain capability
Inbound validationUsed by inbound to verify recipient addresses
Schemadomain and domain_dns_record in packages/db/src/schema/domain.ts
EventsPublishes domain lifecycle events to NATS

Next

Was this page helpful?

Edit this page