railway logs adds DNS query logs
Introduced 2026-07-27 · score 0.98
HOW TO USE IT
When debugging a service’s network behavior, run `railway logs --dns` to stream DNS queries; add `--lines`, `--since`, or `--until` to fetch history, and use DNS filters to narrow results. [Railway CLI logs docs](https://docs.railway.com/cli/logs)
railway logs --dnsrailway logs --dns --status failedrailway logs --dns --qname <name> --lines 50WHY THIS HELPS
Inspect DNS query logs while debugging a deployment's network behavior.
REQUIREMENTS AND LIMITATIONS
- Version: v5.29.0
- --dns (required): Select DNS query logs. Log type flags are mutually exclusive.
- --lines <N>: Fetch this number of log lines; disables streaming.
- --since <TIME>: Show logs since a time; disables streaming.
- --until <TIME>: Show logs until a time; disables streaming.
- --filter <QUERY>: Filter logs with Railway query syntax; can be combined with DNS typed filters.
- --status <STATUS>: DNS filter requiring `--dns`; accepts `ok` or `failed`.
- --rcode <RCODE>: DNS filter requiring `--dns`; filters by response code, such as `NOERROR`, `NXDOMAIN`, `SERVFAIL`, `TIMEOUT`, or `ERROR`. Values are normalized to uppercase.
- --zone <ZONE>: DNS filter requiring `--dns`; accepts `internal` or `external`.
- --domain <DOMAIN>: DNS filter requiring `--dns`; matches a domain and its subdomains.
- --qtype <TYPE>: DNS filter requiring `--dns`; filters by record type, such as `A`, `AAAA`, `CNAME`, `PTR`, or `TXT`. Values are normalized to uppercase.
- --qname <NAME>: DNS filter requiring `--dns`; matches the exact queried name.
- --deployment, --build, --http, --network: Other log type selectors; mutually exclusive with `--dns`.
- Typed filter flags require `--dns`.
- DNS logs shipped in the dashboard this week; the dashboard path is deployment → Network tab → DNS.
FIRST-PARTY EVIDENCE
- https://github.com/railwayapp/cli/releases/tag/v5.29.0
- https://github.com/railwayapp/cli/pull/1025
- https://docs.railway.com/cli/logs
Check the installed version and the source before using it. Entry JSON