Railway Domain

Manage Railway service domains - add, view, and remove with ease

✨ The solution you've been looking for

Verified
Tested and verified by our team
16036 Stars

Add, view, or remove domains for Railway services. Use when user wants to add a domain, generate a railway domain, check current domains, get the URL for a service, or remove a domain.

railway domain dns infrastructure deployment custom-domain url networking
Repository

See It In Action

Interactive preview & real-world examples

Live Demo
Skill Demo Animation

AI Conversation Simulator

See how users interact with this skill

User Prompt

I need a URL for my Railway service. Can you generate a domain?

Skill Processing

Analyzing request...

Agent Response

A Railway-provided domain URL that you can use immediately to access your service

Quick Start (3 Steps)

Get up and running in minutes

1

Install

claude-code skill install railway-domain

claude-code skill install railway-domain
2

Config

3

First Trigger

@railway-domain help

Commands

CommandDescriptionRequired Args
@railway-domain generate-railway-domainGet a Railway-provided domain for your deployed serviceNone
@railway-domain add-custom-domainConfigure a custom domain with proper DNS recordsNone
@railway-domain domain-managementView current domains and remove unused onesNone

Typical Use Cases

Generate Railway Domain

Get a Railway-provided domain for your deployed service

Add Custom Domain

Configure a custom domain with proper DNS records

Domain Management

View current domains and remove unused ones

Overview

Railway Domain Management

Add, view, or remove domains for Railway services.

When to Use

  • User asks to “add a domain”, “generate a domain”, “get a URL”
  • User wants to add a custom domain
  • User asks “what’s the URL for my service”
  • User wants to remove a domain

Add Railway Domain

Generate a railway-provided domain (max 1 per service):

1railway domain --json

For a specific service:

1railway domain --json --service backend

Response

Returns the generated domain URL. Service must have a deployment.

Add Custom Domain

1railway domain example.com --json

Response

Returns required DNS records:

1{
2  "domain": "example.com",
3  "dnsRecords": [
4    { "type": "CNAME", "host": "@", "value": "..." }
5  ]
6}

Tell user to add these records to their DNS provider.

Read Current Domains

Use railway-environment skill to see configured domains, or query directly:

1query domains($envId: String!) {
2  environment(id: $envId) {
3    config(decryptVariables: false)
4  }
5}

Domains are in config.services.<serviceId>.networking:

  • serviceDomains - Railway-provided domains
  • customDomains - User-provided domains

Remove Domain

Use railway-environment skill to remove domains:

Remove custom domain

1{
2  "services": {
3    "<serviceId>": {
4      "networking": {
5        "customDomains": { "<domainId>": null }
6      }
7    }
8  }
9}

Remove railway domain

1{
2  "services": {
3    "<serviceId>": {
4      "networking": {
5        "serviceDomains": { "<domainId>": null }
6      }
7    }
8  }
9}

Then use railway-environment skill to apply and commit the change.

CLI Options

FlagDescription
[DOMAIN]Custom domain to add (omit for railway domain)
-p, --port <PORT>Port to connect
-s, --service <NAME>Target service (defaults to linked)
--jsonJSON output

Composability

  • Read domains: Use railway-environment skill
  • Remove domains: Use railway-environment skill
  • Apply removal: Use railway-environment skill
  • Check service: Use railway-service skill

Error Handling

No Service Linked

No service linked. Use --service flag or run `railway service` to select one.

Domain Already Exists

Service already has a railway-provided domain. Maximum 1 per service.

No Deployment

Service has no deployment. Deploy first with `railway up`.

Invalid Domain

Invalid domain format. Use a valid domain like "example.com" or "api.example.com".

What Users Are Saying

Real feedback from the community

Environment Matrix

Dependencies

Railway CLI

Context Window

Token Usage ~1K-3K tokens for typical domain operations

Security & Privacy

Information

Author
davila7
Updated
2026-01-30
Category
domain-utilities