remoteSecure(). Traffic stays on ClickHouse Cloud’s private network instead of the public internet, so it works even when the service you’re reading from is locked down with PrivateLink or an IP access list.
Use it when:
- Your services are restricted to PrivateLink or a strict IP access list, so
remoteSecure()over the public endpoint isn’t an option. - Your security requirements don’t allow service-to-service traffic over the public internet.
- Your services don’t share data through warehouses (compute-compute separation), but you need to query across them.
This feature is in private preview, and our team sets up each connection for you. To join, contact your ClickHouse account team or ClickHouse support.
How it works
This guide uses two terms:- Producer: the service that holds the table you want to read.
- Consumer: the service that runs
remoteSecure()to read from the Producer.
GRANT. There are no passwords to create or rotate.
A query has to pass three checks:
- Network: only a Consumer with a connection can reach the Producer over the private network.
- Identity: the Consumer authenticates with a certificate tied to its hostname.
- Table permissions: the Producer decides which tables the Consumer can read with
GRANT. Anything not granted returns an access denied error.
Prerequisites
- Both services are in the same ClickHouse Cloud organization, cloud provider, and region. For example, a service in AWS
us-east-2can’t connect to one in AWSus-west-2. Our team will confirm that your services are eligible before creating the connection. - Neither service is a regulated (HIPAA or PCI) service.
- You have the service ID and hostname of both services. You can find both on each service’s Settings page in the console.
- You can run SQL as an admin on both services.
Set up a connection
Send us your service details
During the private preview, there’s no console UI for connections. Send your ClickHouse contact:- The service IDs of the Producer and the Consumer. Say which is which, and whether you need to query in both directions.
- A time when a rolling restart of the Consumer is acceptable. Later connections don’t restart anything.
ClickHouse creates the connection
We confirm both services are eligible and create the connection. We then create a certificate-authenticated user on the Producer namedrt_<Consumer service ID> and send you the exact name.
Grant the Consumer access to tables
Either run the test queries below or grant select on your own tables on the Producer.Query from the Consumer
Run the following on the Consumer. We will enable the private preview Named Collections feature for you. The SQL below creates a named collection that points at the Producer, then queries through it. Use the Producer’s hostname from the console, the same one you’d use to connect to it directly.Limitations
Scope
- Queries are read-only. A Consumer can
SELECTthroughremoteSecure()but can’tINSERTinto the Producer. - Both services must be in the same organization, cloud provider, and region. Cross-region and cross-organization connectivity are planned.
- A connection covers one service. If you use warehouses, a connection to one service doesn’t cover the other services that share its data. Each needs its own connection.
- Connections are one way. Querying in both directions needs two connections.
- The Producer executes the read, the same as with the
remoteSecure()table function today.
Idling
- An idle or stopped Producer doesn’t wake up for a
remoteSecure()query. The query returns connection refused. If Consumers need to query the Producer reliably, turn off idling on the Producer, which means it runs and bills for compute continuously. - Long-running
remoteSecure()queries can fail if the Consumer idles mid-query.
Error messages
Most failures show up as a generic network error, such as connection refused, handshake rejected, or a timeout, rather than a message that names the cause. Use the troubleshooting table below, and share the error text with us so we can improve these messages.Deleting a service
A connection doesn’t block deleting either service. During the private preview, let us know if you delete one so we can clean up the connection.Troubleshooting
FAQ
Does this cost extra?
Does this cost extra?
You only pay for the compute you use, including the time the Producer isn’t idling.
Do I need to manage passwords or certificates?
Do I need to manage passwords or certificates?
No. The Consumer authenticates with a certificate that ClickHouse Cloud manages for you.
Does traffic go over the public internet?
Does traffic go over the public internet?
No. Traffic stays on ClickHouse Cloud’s private network, which is why it works even when the Producer only accepts PrivateLink traffic or its IP access list allows nothing.
Can the Producer read from the Consumer?
Can the Producer read from the Consumer?
Not unless you ask for a second connection in that direction.
Will enabling this restart my services?
Will enabling this restart my services?
The first connection on a Consumer triggers one rolling restart. The Producer doesn’t restart, and later connections or revocations don’t restart anything.
How do I remove access?
How do I remove access?
To remove access to a table, run
REVOKE on the Producer. To remove the connection itself, contact your ClickHouse contact during the private preview.