Atlas
Platform Operations

Custom Domains

Configure custom domains for enterprise workspaces so users access Atlas at your own URL.

Custom domains let workspaces use their own URL (e.g. data.acme.com) instead of the default app.useatlas.dev. Atlas integrates with Railway's custom domain API for provisioning and automatic TLS certificate management via Let's Encrypt.

SaaS Feature

Custom domains are available on app.useatlas.dev Enterprise plans. Self-hosted deployments configure domains directly in their hosting provider. Workspace admins can self-serve via Admin Console → Configuration → Custom Domain. Platform admins retain cross-workspace management at Admin Console → Platform → Custom Domains.

Prerequisites

  • Active Enterprise plan on app.useatlas.dev (or self-hosted "free" tier)
  • Internal database configured (DATABASE_URL)
  • Admin role (workspace admin for self-serve, platform admin for cross-workspace management)
  • Railway deployment with API token configured

How It Works

StepWhat Happens
RegisterAdmin registers a domain in the Atlas admin console. Atlas calls Railway to provision it
Configure DNSAdmin creates a CNAME record pointing their domain at the Railway target
VerifyAdmin clicks "Verify" — Atlas checks Railway for DNS propagation and TLS certificate status
RouteOnce verified, requests to the custom domain are routed to the correct workspace

Railway handles TLS certificate provisioning automatically. Atlas stores the domain-to-workspace mapping for host-based routing.

Configuration

Environment Variables

Add these to your .env file (get values from your Railway dashboard):

# Railway custom domain API
RAILWAY_API_TOKEN=your-workspace-scoped-token
RAILWAY_PROJECT_ID=your-project-id
RAILWAY_ENVIRONMENT_ID=your-environment-id
RAILWAY_WEB_SERVICE_ID=your-web-service-id
VariableDescription
RAILWAY_API_TOKENWorkspace-scoped API token from Railway dashboard → Settings → Tokens
RAILWAY_PROJECT_IDProject ID from your Railway project settings
RAILWAY_ENVIRONMENT_IDEnvironment ID (typically production)
RAILWAY_WEB_SERVICE_IDService ID for the web service that should receive custom domain traffic

Workspace Admin (Self-Serve)

Workspace admins on Enterprise plans can manage their own custom domain at Admin Console → Configuration → Custom Domain. One domain per workspace (MVP).

Adding a Domain

  1. Navigate to Admin Console → Configuration → Custom Domain
  2. Enter your domain (e.g. data.acme.com)
  3. Click Add Domain
  4. Atlas registers the domain and shows DNS configuration instructions

DNS Setup

After adding, set up a CNAME record with your DNS provider:

Record TypeNameValue
CNAMEdata.acme.com<target>.up.railway.app (shown in the admin page)

Click the copy button next to the CNAME target to copy it.

Checking Status

  1. After creating the DNS record, wait a few minutes for propagation
  2. Click Check Status on the domain page
  3. Status updates to Active (green) once DNS is propagated and TLS certificate is issued

Removing a Domain

Click Remove Domain and confirm. This removes the domain from both Railway and Atlas.

Plan Gating

Non-enterprise workspaces see an upgrade prompt instead of the domain form. Self-hosted deployments (which default to the "free" tier) can use custom domains without plan restrictions.

Platform Admin (Cross-Workspace)

Platform admins retain full domain management across all workspaces at Admin Console → Platform → Custom Domains.

Registering a Domain

  1. Click Add Domain
  2. Enter the Workspace ID and Domain (e.g. data.acme.com)
  3. Click Register Domain
  4. Atlas creates the domain in Railway and shows the CNAME target

Verification

  1. After creating the DNS record, wait a few minutes for propagation
  2. Click the refresh icon next to the domain in the admin table
  3. Atlas checks Railway for DNS propagation and certificate status
  4. Status updates to Verified (green) once DNS is propagated and TLS certificate is issued

Status Badges

StatusMeaning
Pending (yellow)Domain registered, waiting for DNS setup or certificate provisioning
Verified / Active (green)DNS verified and TLS certificate issued — domain is live. API returns "verified" status; workspace UI displays "Active"
Failed (red)DNS verification or certificate provisioning failed

Deleting a Domain

Click the trash icon next to any domain. This removes the domain from both Railway (revoking the TLS certificate) and Atlas.

Host-Based Routing

When a request arrives on a custom domain, Atlas:

  1. Looks up the hostname in the custom_domains table (with 60-second cache)
  2. If a verified match is found, sets the workspace context to the owning workspace
  3. All subsequent operations (queries, conversations, etc.) are scoped to that workspace

API Reference

Workspace Admin Endpoints

Require admin role and active organization. Enterprise plan required for adding a domain (POST /api/v1/admin/domain).

MethodPathDescription
GET/api/v1/admin/domainGet workspace custom domain (null if none)
POST/api/v1/admin/domainAdd a custom domain ({ domain })
POST/api/v1/admin/domain/verifyCheck verification status
DELETE/api/v1/admin/domainRemove workspace custom domain

Platform Admin Endpoints

Require platform_admin role and enterprise features.

MethodPathDescription
GET/api/v1/platform/domainsList all custom domains
POST/api/v1/platform/domainsRegister a domain ({ workspaceId, domain })
POST/api/v1/platform/domains/:id/verifyCheck verification status
DELETE/api/v1/platform/domains/:idDelete a domain

Troubleshooting

Domain stays in "Pending" status

  • Verify your CNAME record is correctly configured with your DNS provider
  • DNS propagation can take up to 48 hours (though usually minutes)
  • Check that the CNAME target matches exactly what Atlas shows in the admin UI
  • Click the verify button again after waiting

Certificate status shows "Failed"

  • Ensure no CAA records on your domain block Let's Encrypt (letsencrypt.org)
  • Verify no conflicting A or AAAA records exist for the same hostname
  • Delete and re-register the domain if the issue persists

"Railway API is not configured" error

  • Ensure all four Railway environment variables are set: RAILWAY_API_TOKEN, RAILWAY_PROJECT_ID, RAILWAY_ENVIRONMENT_ID, RAILWAY_WEB_SERVICE_ID
  • Verify the API token has workspace-level permissions in Railway

"Domain is not available" error

  • The domain may already be registered in another Railway project
  • Check Railway dashboard for existing custom domain entries

On this page