This source did not publish a separate summary. Review SKILL.md before using the skill.
SKILL.md
ClickHouse Install & Auth
Overview
Set up the official ClickHouse client for Node.js or Python and configure
authentication to ClickHouse Cloud or a self-hosted instance. The workflow
below is the high-level path; each step links to a full walkthrough with
complete code in references/implementation.md.
Prerequisites
Node.js 18+ or Python 3.8+
A running ClickHouse instance (Cloud or self-hosted)
Configure environment variables. Put host, user, and password in .env
and add it to .gitignore. Cloud hosts use port 8443 (HTTPS); self-hosted
uses 8123 (HTTP).
Create the client. Pass url, username, and password to
createClient() (Node.js) or get_client() (Python). Cloud requires TLS —
supply an https:// URL and the client handles it.
The official client installed (@clickhouse/client or clickhouse-connect).
A .env holding CLICKHOUSE_HOST / CLICKHOUSE_USER / CLICKHOUSE_PASSWORD
(gitignored).
An initialized client module that reads those variables.
A successful ping() returning success: true and a SELECT version()
probe printing the server version and uptime — proof the connection and auth
both work.
Error Handling
Error
Cause
Solution
ECONNREFUSED
Server not running
Check host/port, verify ClickHouse is up
Authentication failed
Wrong user/password
Verify credentials in ClickHouse users.xml or Cloud console
CERTIFICATE_VERIFY_FAILED
TLS mismatch
Use https:// for Cloud, check CA certs for self-hosted
TIMEOUT
Network/firewall
Check IP allowlists in Cloud console, firewall rules
Database not found
Wrong database name
Run SHOW DATABASES to list available databases
Examples
Connect to ClickHouse Cloud (Node.js). With .env populated, create the
client against the https://…:8443 host and verify: