a year ago
I would like to enable HTTP and TCP together for a cluster of containers. These are the initial nodes for a public layer-1 proof-of-work blockchain, and all future nodes may need to connect to these to download the initial blockchain state.
17 Replies
a year ago
Copy. So, if we wanted to use railway for this type of architecture, we would:
Setup TCP Proxy on our subdomain?
Use nginx? to then process the requests on the TCP port and filter out the http traffic?
Not a networking pro so working through this. Would like to stay on railway if possible.
a year ago
Not quite but you are very much on the right track, instead of me explaining it, have a look at this template that does exactly what you will need to do, you may even be able to repurpose the proxy - https://railway.app/template/Hh00T5
a year ago
Do you expose any ports that are no 443 publicly? If not, can we access the ssl certs using nginx?
a year ago
Nope, at least not for HTTPS, it's only going to be port 443 there, there would be no way to access the certs with nginx or any other web server since that's all managed by Railway for you.
a year ago
I think I'm throwing in the towel. Confused why we can't have basic port access. I'm sure it's something technical I do not understand.
a year ago
I did. Was attempting this => https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/
a year ago
Here is the repo I deployed: https://github.com/marscredit/railway-reverse-proxy-nginx/tree/main
a year ago
You can not do SSL certs yourself it just won't work, Railway handles that for you.Caddy needs to listen to :{$PORT} as the template does.
a year ago
I'm not sure where the confusion is coming from, you expose your service's TCP port via the TCP proxy, and you expose the services HTTP port via a proxy service.
a year ago
Want to be able to click a button, not spin up another app just to access my app via TCP on my custom domain.Sadly, I'm a buildpack > deployment developer. Not super technical. Self taught. Reason I choose services like Heroku / Railway is for ease of tools. If I'm going to have to put this much effort in (9 hours already on this today just to get to this point, docs weren't clear), I might as well go to the final boss, AWS. Just some feedback for the railway team. Still a fan, but am starting to hit limitations.
a year ago
You can't do custom domains on a TCP proxy regardless of what you do, you can only do custom domains on HTTPS.
a year ago
Another thing I "can't" do with railway
a year ago
What's your use case for custom domains on the TCP proxy? is there something wrong with the domain Railway provides?
a year ago
Problem is we need both TCP + HTTP/S and it sounds like railway can't do that, or even more importantly, won't do it. And we need multiple ports.
Ethereum nodes often use TCP ports like 30303 for peer-to-peer communication in the network. For ease of customer access we need these available for end users to connect with their peer nodes:
node1.marscredit.xyz:30303 via TCP
node1.marscredit.xyz via HTTPS for other apps to connect
Still working on the RPC connections.
a year ago
I want help too, im trying to decifre https://railway.app/template/Hh00T5 this but my problem is that mi repo return a url that i need and with factory im trying to create a tcp proxy for port 5000 (is the port for comunating with database basically the backend) but when i make a request i just get page no found

