|Docs

railway tcp-proxy

Manage public TCP proxies for a service.

TCP proxies expose non-HTTP application ports, such as database or game server ports, to the public internet. Only one TCP proxy is allowed per service instance. Creating a TCP proxy updates the service networking configuration.

Usage

Subcommands

SubcommandAliasesDescription
listlsList TCP proxies for a service
createadd, newCreate a TCP proxy for an application port
statusShow status for a TCP proxy
deleteremove, rmDelete a TCP proxy

Options

FlagDescription
-s, --service <SERVICE>Service name or ID
-e, --environment <ENVIRONMENT>Environment to use
-p, --project <PROJECT_ID>Project ID to use
--jsonOutput in JSON format

Examples

List TCP proxies

Lists TCP proxies for the selected service and environment.

Create a TCP proxy

Creates a TCP proxy for the application port. If the proxy doesn't become active, redeploy the service and check its status.

Show TCP proxy status

The proxy identifier can be a TCP proxy ID, domain, endpoint, proxy port, or application port.

Delete a TCP proxy

Deletes the selected TCP proxy. Omit --yes to confirm interactively.

Options for

Use railway tcp-proxy create with an application port.

FlagDescription
--port <PORT>Application port to expose through the TCP proxy

Arguments for

ArgumentDescription
<PROXY>TCP proxy ID, domain, endpoint, proxy port, or application port

Options for

FlagDescription
-y, --yesSkip confirmation