R
Railway•12mo ago
aglen

MQTT Broker + TCP Proxy

Trying to get a docker container of a MQTT broker to run I am running one on AWS and looking to move it to Railway. Do I understand correctly that if the container exposes 1883 or 8883: Then I can use a TCP proxy <generated_domain>:<generated_port> -> 1883 || 8883. Does not seem to be working for me
11 Replies
Percy
Percy•12mo ago
Project ID: 670ec5a8-83d2-45f3-abf6-4e43eed89b36
aglen
aglen•12mo ago
670ec5a8-83d2-45f3-abf6-4e43eed89b36 Additional question, if I were to use a custom domain, cold i use reverse proxy also? or is it eaither or, in that case can i use nginx in the docker container to do the proxy there?
Brody
Brody•12mo ago
you can only expose a single tcp port per service, you enter in the internal port your app runs on and then are given a domain and a randomly generated port that will map to the internal port https://docs.railway.app/deploy/exposing-your-app#tcp-proxying
aglen
aglen•12mo ago
What is project in your context? if i only can expose i tcp port per project how am i running 1 project with 2 TimescaleDB containers both using tcp proxy, If you mean per "service" or "container" then i follow. I got the TCP proxy for the MQTT broker working, but it is now on one of the generated domain names, with a random port, is there any way to use a custom domain with TCP proxy of is it not interchangable?
Brody
Brody•12mo ago
im sorry, i misspoke, i did mean per service there is no way to provide your own domain or port for the tcp proxy, but for an mqtt broker does it matter?
aglen
aglen•12mo ago
Your correct it does not really matter, just wanted to see if you hadd some insight into what is possible and wat is not. The ip addresses for your generated domains, do they offten get changed?
Brody
Brody•12mo ago
they are dynamic, please do not use an ip
aglen
aglen•12mo ago
the MQTT broker i am replacing is used to IoT devices scattered on various Offshore vessels, and most of these have no DNS service so are bound by refering to the brokers IP instead of DNS record.
Brody
Brody•12mo ago
railway isnt gonna be ideal for that usecase
aglen
aglen•12mo ago
aaalright thanks for clearing that up! saved me some frustration
Brody
Brody•12mo ago
no problem 🙂 look into oracle's ARM vps
Want results from more Discord servers?
Add your server