- Run SQL queries over the ClickHouse HTTP interface
- Explore schema and table metadata via system tables
- Paginate large result sets with
LIMITandOFFSET - Enforce per-query time limits to keep requests bounded
Common use cases and example apps
Exact behavior depends on your tables, the permissions of the ClickHouse user you connect with, and what you ask Lovable to build.
How ClickHouse connections work
- HTTP interface: The connector talks to the ClickHouse HTTP interface over HTTPS. You provide the full HTTPS URL of the interface, including the port (for example
https://abc123.eu-central-1.aws.clickhouse.cloud:8443). - Authentication: ClickHouse uses HTTP basic auth. Provide the username and password of the database user you want to connect with. Credentials are stored securely in Lovable’s gateway and are never exposed to the browser or your app’s frontend code.
- Gateway: Queries are proxied through Lovable’s connector gateway, which injects the host and credentials so your app never sends them. See Gateway-based connectors for token handling and per-project request limits.
- Data access: What you can read or run depends entirely on the permissions of the ClickHouse user you connect with.
How to connect ClickHouse
Who can connect ClickHouse depends on your plan and workspace settings. See Who can create connections and clients for details.Prerequisites
Before connecting in Lovable, make sure you have:- A ClickHouse database (self-hosted or ClickHouse Cloud) with the HTTP interface reachable over HTTPS
- The HTTPS URL of your HTTP interface, including the port
- A ClickHouse user (a read-only user is recommended) with access to the data your app needs
- Permission to create connections in your Lovable workspace
Set up your ClickHouse connection
1
Navigate to ClickHouse connector
Open Connectors and select ClickHouse.
2
Add a new connection
Click Add connection.
3
Name the connection
In Display name, name the connection (for example,
ClickHouse Production or ClickHouse read-only).4
Enter your connection details
- HTTP Interface URL: the full HTTPS URL of your ClickHouse HTTP interface, including the port (e.g.
https://abc123.eu-central-1.aws.clickhouse.cloud:8443). - Username: the ClickHouse user for HTTP basic authentication.
- Password: that user’s password.
default user. See the HTTP interface docs for details.5
Choose who can use this connection
Under Who can use this connection, decide who in your workspace can use the connection:
- Only you (default): only the person creating the connection can use it and its associated data.
- Invite specific people: only you and explicitly added workspace members can use the connection and its associated data.
- Invite entire workspace: click Invite entire workspace to make the connection available to everyone in your Lovable workspace.
6
Connect
Click Connect. Lovable verifies the connection through the gateway with a
SELECT 1 query.Limitations
- No per-user data scoping. Everyone using a connection queries with the same ClickHouse user. Use a read-only user scoped to the right databases, and restrict who can use the connection.
- Queries are synchronous. There is no polling or server-side cursor. Paginate with SQL
LIMIT/OFFSET, and raise the per-query time limit for long queries. - No default database. Qualify table names with the database (e.g.
mydb.users). - Gateway limits apply as described in Gateway-based connectors.
Manage your connection
Connections are managed from Connectors: select , then open the connection.- Unlink projects to remove access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
- Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use stop working until a new connection is added. See Delete a connection for the steps and who can delete.