Custom Domain for TCP Port (MQTT)
cburgdorfer
HOBBYOP

2 months ago

Hello, I want to use a custom domain for my MQTT broker that's running on TCP and port 1883.

Whenever I add my custom domain, it seems to add it to the HTTP section of this interface, not TCP. (See 2nd screenshot.)

Is it possible to run a TCP service on port 1883 on a custom domain?

Thanks!

Project-ID: c4205d3f-fb3e-4c17-8b93-eb9d31b3a8ae

Solved

5 Replies

2 months ago

Railway won't use your custom domain for your arbitrary TCP proxy endpoint.

For that usecase you can create a CNAME in your DNS provider's settings.


2 months ago

db.yourdomain.com → xxxx.proxy.rlwy.net (the TCP proxy host Railway gave you)


2 months ago

Some caveats:

  1. If you're using Cloudflare to manage your DNS, you will need to disable Proxying and keep it at 'DNS Only'

  2. You can't include the TCP Proxy port in the DNS record, you use it as part of the URL after creating the record.


cburgdorfer
HOBBYOP

2 months ago

I see, thanks @Medim . I can't change to a different port then, correct?


2 months ago

Correct


Status changed to Solved medim about 2 months ago


Loading...