Network access
Every connection to a managed database is encrypted with TLS. Two settings decide who can open one: public access and the IP allowlist. You manage both on the instance's Network page or with hubfly db network.
The endpoint
| Engine | Endpoint |
|---|---|
| PostgreSQL, MySQL | The instance hostname and a port assigned to the instance, for example app-db-k3x9.db.hubfly.app:31544. TLS terminates in the database itself. The port is kept for the life of the instance, so connection strings survive restarts, updates and public-access changes. |
| SQLite (libSQL) | HTTPS on port 443: libsql://<host> for libSQL clients, https://<host> for plain HTTP requests. |
The port is not the engine's usual 5432 or 3306. Copy the host and port from the Connect page, hubfly db info or hubfly db url rather than assuming them.
Public access
Public access is on by default: the instance is reachable from the internet at its Hubfly space hostname, over TLS, by any client that also passes the allowlist and has valid credentials. You can create an instance without a public endpoint (hubfly db create --private, or switch it off in the create form) and turn it on later.
Turning public access off removes the public endpoint, and clients outside Hubfly space lose access immediately. The allowlist is kept for when you turn it back on.
Connection strings use the public endpoint
hubfly db network app-db # endpoint, public access and allowlist
hubfly db network public app-db off # asks for confirmation; add --yes in scripts
hubfly db network public app-db onIP allowlist
The allowlist limits which networks may connect. It holds up to 64 IPv4 or IPv6 addresses or CIDR ranges, each with an optional label. A single address is stored as a /32 (IPv4) or /128 (IPv6) range.
- Empty list: every IP may connect. The Dashboard marks the instance Open to all IPs; credentials and TLS still apply.
- With entries: only connections from the listed ranges reach the database. Hubfly space enforces the list in its proxy, before the database sees the connection.
- Changes apply as a short operation that you can follow on the page. Removing a range stops new connections from it; connections that are already open are not interrupted.
- Your own address: the Dashboard can detect the IP you are browsing from and the CLI adds it with
--my-ip. The Dashboard warns you before you remove your own IP.
hubfly db network allow app-db 203.0.113.0/24 --label office
hubfly db network allow app-db --my-ip
hubfly db network remove app-db 203.0.113.0/24
# Or set it while creating the instance:
hubfly db create app-db --allow 203.0.113.0/24 --allow-my-ipIf someone else changed the allowlist after you loaded it, the Dashboard tells you and asks you to review the newer list instead of overwriting it.
Apps on Hubfly space use the same endpoint
Client IP addresses
Where the location supports it, Hubfly space's proxy passes the real client address through to PostgreSQL and MySQL, so it appears in pg_stat_activity, the server logs and the Dashboard's Sessions view. Some connections still arrive from the proxy's own address, including IPv6 clients and apps on the same Hubfly space host that connect through the public endpoint. The Sessions view labels those via Hubfly space proxy instead of showing the proxy address as the client. The client's source port is not preserved.
TLS
- PostgreSQL refuses unencrypted connections; use at least
sslmode=require. - MySQL runs with
require_secure_transport; usessl-mode=REQUIRED. - libSQL is served over HTTPS with a publicly trusted certificate.
PostgreSQL and MySQL instances use a self-signed certificate of their own. require encrypts the connection; to also verify the server, download the instance's CA certificate and use verify-full. See Connect and verify TLS.