Enable HTTP and TCP together
lifeofjer
PROOP

2 years 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

2 years ago

This is currently not possible unfortunately.


lifeofjer
PROOP

2 years ago

Copy. So, if we wanted to use railway for this type of architecture, we would:

  1. Setup TCP Proxy on our subdomain?
  2. 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.


2 years 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


lifeofjer
PROOP

2 years ago

Do you expose any ports that are no 443 publicly? If not, can we access the ssl certs using nginx?


2 years 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.


lifeofjer
PROOP

2 years 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.


2 years ago

Have you checked out how the template does it?


lifeofjer
PROOP

2 years ago


lifeofjer
PROOP

2 years ago


2 years 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.


2 years 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.


lifeofjer
PROOP

2 years 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.


2 years ago

You can't do custom domains on a TCP proxy regardless of what you do, you can only do custom domains on HTTPS.


lifeofjer
PROOP

2 years ago

Another thing I "can't" do with railway


2 years ago

What's your use case for custom domains on the TCP proxy? is there something wrong with the domain Railway provides?


lifeofjer
PROOP

2 years 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.


yvalois
TRIAL

2 years 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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...