Workspace hostname

postgresql

#1

Hi,

I’m trying to connect to a c9 postgres connection using a 3rd party software called Postico.

I was wondering how to figure out the hostname for the postgres instance?

Thanks!


#2

In the terminal you can run echo $C9_HOSTNAME which gives you the hostname. Let me know if this works!


#3

Nope, didn’t work. “Could not connect to the server” :-/


#4

Anyone else know of a way to connect to postgres via an outside 3rd party application?


#5

As far as I know there are only a few ports open so its the same reason you cant use MySQL workbench and connect:

“Please note that 8080, 8081, and 8082 are the only available ports on a hosted Cloud9 workspace.”


#6

All public ports are tunneled through an HTTP proxy before reaching your workspace. Because of that, you can only access HTTP or WebSocket servers from the outside. They must listen on port 8080-8082.