coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
31.12k stars 1.58k forks source link

[Improvement]: Internal URL for services and other non-database applications #2596

Closed peaklabs-dev closed 2 weeks ago

peaklabs-dev commented 2 months ago

Description

I want to deploy phpMyAdmin and some other services on my VPS, but I do not want to add a public facing domain or use sslip.io (as these are accessible from the internet). I want to use an internal URL that is only accessible when I VPN into the coolify/docker instance or something similar that is only locally accessible -> an internal private URL, like there is for databases but for hole services. (I am not sure if this is technically possible though)

Minimal Reproduction (if possible, example repository)

-> Challenge: Each container has its own destination/ network.

Example structure: http://ContainerName-[uuid].local

Exception or Error

No response

Version

-

stuart-haas commented 2 months ago

Have you considered using an ssh tunnel to do this? I'll follow up with an example.

stuart-haas commented 2 months ago

@ayntk-ai

Assuming you have SSH enabled for your VPS you can edit /etc/ssh/sshd_config and enable port forwarding by removing the comment hash from AllowTcpForwarding yes. The example command below assumes you can login using an SSH key-pair. I tested it with an AWS EC2 instance running Amazon Linux 2.

ssh -i /path/to/ssh.pem -N -L local-port:remote-host:remote-port remote-user@remote-host

You can then go to http://localhost:local-port in a web browser to access the remote environment.

peaklabs-dev commented 2 months ago

@stuart-haas I am using Twingate and sometimes another OpenVPN setup but I need a way to access applications deployed on Coolify only through a local URL. Which is a challenge as each container/each service has its own network where a VPN connector would need to be deployed unless there was some kind of structure like an internal URL that would be available for the host VPS.

stuart-haas commented 2 months ago

@ayntk-ai If you have a VPN why not just use that? You could always add a layer of authentication, too.

peaklabs-dev commented 2 months ago

@stuart-haas because how would I access mt ressource, it has its own network? And what would be the URL?

diogox commented 1 month ago

+1 on this. Would be very useful to expose certain ports on deployments to a VPN, for eg.