https://questdb.io logo
Title
s

SM

03/07/2023, 2:04 AM
Trying QuestDB 7 and it's working great. How do I open up access to http port for GUI, writing (via ILP) and reading (via PG port) on the local network? What do I need to change in the server.conf and which ports will I have to open in firewall of the host? Thanks
j

Jaromir Hamala

03/07/2023, 8:12 AM
hi, HTTP, ILP and PGWire ports are opened by default. Are you having difficulties to connect? What error are you getting? How did you deploy QuestDB? Is it a Docker container? Running on your local or in a cloud?
j

javier ramirez

03/07/2023, 9:00 AM
These are the default ports I open when starting questdb
docker run --add-host=host.docker.internal:host-gateway -p 9000:9000 -p 9009:9009 -p 8812:8812 -p 9003:9003 questdb/questdb:latest
9000 is the web/http interface, 9009 is the ILP protocol, 8812 is the postgresql protocol, and 9003 is the health/metrics server. You can disable or change the port numbers via server.conf or ENV variables
a

Andrey Pechkurov

03/07/2023, 9:03 AM
You can also set read-only mode for PGWire by setting
pg.security.readonly=true
. The same can be done for HTTP & Web Console:
http.security.readonly=true
s

SM

03/07/2023, 4:33 PM
Thanks for the direction so far. I am running questdb natively on Ubuntu 20.04, not docker. I want to be able to access this questdb installation on a different computer on the same network as the host. I opened up 9000, 9009 and 8812 with sudo ufw allow <port>/tcp one by one. I can now at least access the UI from another computer. Haven't tried reading or writing from this non-localhost computer but hope it will work. If I have to open udp access, please advise. I haven't changed anything in server.conf though I suspect I will have to mess with http.enabled and http.net.bind. They are both commented and look like this right now: #http.enabled=true #http.net.bind=0.0.0.0:9000 In PG, you have to change listen_address to '*' in conf to enable access to database outside of localhost so I am expecting something similar here? @javier ramirez @Jaromir Hamala
j

javier ramirez

03/07/2023, 5:26 PM
When the lines are commented out on server.conf it doesn’t mean there is no default value. Specifically for the http server you can see the default is to bind to 0.0.0.0:9000, meaning anyone who can access that machine can connect to the server, assuming firewall access is open
and the same is true for the defaults of line.tcp.net.bind.to and pg.net.bind.to. If you want to limit to localhost you can change server.conf to bind only on 127.0.0.1