Create a custom DNS alias by setting up a reverse proxy
Learn how to set up a custom DNS alias for your instance using a reverse proxy
In this knowledgebase article, we will walk you through how you can set up a
custom DNS alias for your ClickHouse Cloud instance through the use of a reverse
proxy such as Nginx for ClickHouse native client.
This step is not needed if you are using signed certificates.
Create a self-signed certificate with the domain name of your choice.
In this example we will use a domain name xyz-customdomain.com and
create a certificate called MyCertificate.crt. Refer to "Create SSL certificates"
for further details.
Add the certificate to /etc/clickhouse-client/config.xml:
You are now ready to connect using your custom alias:
clickhouse-client --host xyz.customdomain.com --secure --password 'xxxxxxx'
ClickHouse client version 23.12.1.428 (official build).
Connecting to xyz.customdomain.com:9440 as user default.
Connected to ClickHouse server version 23.9.2.
clickhouse-cloud :)