Host domain

olivierpak12
FREE

2 months ago

Subject: Request to expose public port for SSH server on Railway

Hello Railway Support Team,

My name is Olivier and I'm hosting a small SSH tunnel server on your platform using the free tier. The service is deployed under the project cooperative-healing and the service name is Ncyuzuzo-ssh-server.

I would like to request that you expose a public port (e.g., port 22 or any available one) so I can connect to this service externally via SSH. Currently, I don't see any public hostname or IP with port assigned to the container, and I need this for tunneling internet traffic from my Android app.

Please let me know if there's a way to enable public access or port forwarding to this service.

Thanks for providing such a great platform!

Best regards,

Olivier

Solved$10 Bounty

4 Replies

2 months ago

Hey Oliver,

Unfortunately Railway doesn't support SSH for applications on Railway, this is because installing SSH on each container is invasive on user applications and could be a problem for light resource-sensitive containers. You can tunnel into your applications using Railway's own SSH solution which instead of using SSH directly which involves using the container's shell over the internet instead, which leads to roughly the same result apart from not having support for SSH specific features like file transfers.

You can make use of Railway's SSH by right clicking on a container and clicking "Copy SSH Command", then pasting that in your terminal of choice, note that this does require an up to date Railway CLI to be installed.

You mention you'd like to know whether there is a way for you to enable public access or port forwarding to the service, Railway handles all that for you and all you need to do is grab a domain for your service in your service settingsm you can generate a domain or provide a custom one and you can also specify a port there (if you generated a domain, edit the domain to edit the port).

However, I am confused as to why you're "tunneling internet traffic from your Android app", mind elaborating on what you're doing? Using SSH for connections isn't necassery for an API server and I can't really think of any reason within Railway's fair-use you'd ever need to use SSH for user connections.

Hope this provides some clarity!


dev

Hey Oliver,Unfortunately Railway doesn't support SSH for applications on Railway, this is because installing SSH on each container is invasive on user applications and could be a problem for light resource-sensitive containers. You can tunnel into your applications using Railway's own SSH solution which instead of using SSH directly which involves using the container's shell over the internet instead, which leads to roughly the same result apart from not having support for SSH specific features like file transfers.You can make use of Railway's SSH by right clicking on a container and clicking "Copy SSH Command", then pasting that in your terminal of choice, note that this does require an up to date Railway CLI to be installed.You mention you'd like to know whether there is a way for you to enable public access or port forwarding to the service, Railway handles all that for you and all you need to do is grab a domain for your service in your service settingsm you can generate a domain or provide a custom one and you can also specify a port there (if you generated a domain, edit the domain to edit the port).However, I am confused as to why you're "tunneling internet traffic from your Android app", mind elaborating on what you're doing? Using SSH for connections isn't necassery for an API server and I can't really think of any reason within Railway's fair-use you'd ever need to use SSH for user connections.Hope this provides some clarity!

lofimit
HOBBY

2 months ago

Mark as solved?


lofimit

Mark as solved?

2 months ago

Good point, thanks for the reminder


2 months ago

Oliver if you have any other questions, feel free to reopen this thread


Status changed to Solved dev 2 months ago


Status changed to Solved chandrika 2 months ago


Host domain - Railway Help Station