- 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 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 → App 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.
How to unlink projects from a connection
Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects. To unlink projects:1
Open Connectors
Open Connectors and select .
2
Open the connection
Open the connection you want to manage.
3
Select projects
Under Linked projects, check the projects you want to unlink.
4
Confirm
Click Unlink projects and confirm.
How to delete a connection
Workspace admins and owners can delete connections. Other members can delete a connection if they created it, or if they have been explicitly granted access to it. Before deleting, review the Linked projects section to see which projects are currently using the connection. To delete a connection:1
Open Connectors
Open Connectors and select .
2
Open the connection
Open the connection you want to remove.
3
Review linked projects
Review the Linked projects section.
4
Delete
Under Delete this connection, click Delete and confirm.