railway-domain by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill railway-domain为 Railway 服务添加、查看或移除域名。
生成一个由 Railway 提供的域名(每个服务最多 1 个):
railway domain --json
针对特定服务:
railway domain --json --service backend
返回生成的域名 URL。服务必须已有部署。
railway domain example.com --json
返回所需的 DNS 记录:
{
"domain": "example.com",
"dnsRecords": [
{ "type": "CNAME", "host": "@", "value": "..." }
]
}
告知用户将这些记录添加到他们的 DNS 提供商。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
使用 railway-environment skill 查看已配置的域名,或直接查询:
query domains($envId: String!) {
environment(id: $envId) {
config(decryptVariables: false)
}
}
域名位于 config.services.<serviceId>.networking 中:
serviceDomains - Railway 提供的域名customDomains - 用户提供的域名使用 railway-environment skill 移除域名:
{
"services": {
"<serviceId>": {
"networking": {
"customDomains": { "<domainId>": null }
}
}
}
}
{
"services": {
"<serviceId>": {
"networking": {
"serviceDomains": { "<domainId>": null }
}
}
}
}
然后使用 railway-environment skill 应用并提交更改。
| 标志 | 描述 |
|---|---|
[DOMAIN] | 要添加的自定义域名(省略则生成 Railway 域名) |
-p, --port <PORT> | 要连接的端口 |
-s, --service <NAME> | 目标服务(默认为已链接的服务) |
--json | JSON 输出 |
No service linked. Use --service flag or run `railway service` to select one.
Service already has a railway-provided domain. Maximum 1 per service.
Service has no deployment. Deploy first with `railway up`.
Invalid domain format. Use a valid domain like "example.com" or "api.example.com".
每周安装量
150
仓库
GitHub 星标数
23.4K
首次出现
2026年1月21日
安全审计
安装于
claude-code130
opencode118
gemini-cli116
cursor111
antigravity106
codex103
Add, view, or remove domains for Railway services.
Generate a railway-provided domain (max 1 per service):
railway domain --json
For a specific service:
railway domain --json --service backend
Returns the generated domain URL. Service must have a deployment.
railway domain example.com --json
Returns required DNS records:
{
"domain": "example.com",
"dnsRecords": [
{ "type": "CNAME", "host": "@", "value": "..." }
]
}
Tell user to add these records to their DNS provider.
Use railway-environment skill to see configured domains, or query directly:
query domains($envId: String!) {
environment(id: $envId) {
config(decryptVariables: false)
}
}
Domains are in config.services.<serviceId>.networking:
serviceDomains - Railway-provided domainscustomDomains - User-provided domainsUse railway-environment skill to remove domains:
{
"services": {
"<serviceId>": {
"networking": {
"customDomains": { "<domainId>": null }
}
}
}
}
{
"services": {
"<serviceId>": {
"networking": {
"serviceDomains": { "<domainId>": null }
}
}
}
}
Then use railway-environment skill to apply and commit the change.
| Flag | Description |
|---|---|
[DOMAIN] | Custom domain to add (omit for railway domain) |
-p, --port <PORT> | Port to connect |
-s, --service <NAME> | Target service (defaults to linked) |
--json | JSON output |
No service linked. Use --service flag or run `railway service` to select one.
Service already has a railway-provided domain. Maximum 1 per service.
Service has no deployment. Deploy first with `railway up`.
Invalid domain format. Use a valid domain like "example.com" or "api.example.com".
Weekly Installs
150
Repository
GitHub Stars
23.4K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
claude-code130
opencode118
gemini-cli116
cursor111
antigravity106
codex103