Deploy ClickHouse with the clickhouse template
Deploy ClickHouse with the clickhouse template
Stand up ClickHouse, a fast analytical column store, on a single Quake AI instance using the validated OpenTofu template clickhouse. You apply the template, read the bootstrap credentials, connect with the HTTP interface, create a database and table, and run an analytical query.
ClickHouse is the query layer for large analytical datasets. You run it yourself; this is a self-hosted tool you operate, not a managed warehouse.
Monthly cost estimate
Pricing calculator ↗Sized as a custom package on dedicated vCPU.
Monthly total for the required template above. Use the configurator below to add optional pieces and see the total update.
What each resource is for
ClickHouse host
m2a.large · 2 dedicated vCPU, 8 GiB RAM, 0.5 Gbps
Runs ClickHouse in Docker (analytical column store), with table data on an attached volume.
ClickHouse analytical workloads run on 2 vCPU and 8 GiB RAM. Size up for heavier query concurrency or larger in-memory working sets.
Compute shown per role at custom-package rates ($29/dedicated vCPU, $7.25/shared vCPU, $1/GiB RAM). The headline above is the billed total: the cheaper of a named plan and the custom package, plus add-ons.
Included in baseline
m2a.large
2 dedicated vCPU, 8 GiB RAM, 0.5 Gbps
Compute + RAM rate basis
2 vCPU + 8 GiB RAM at $29/dedicated vCPU, $7.25/shared vCPU, $1/GiB RAM (regular). Totals apply the flat −$5/mo package promotion.
Block storage (90 GiB)
90 GiB at $0.08/GiB/mo
Public IP (included)
1 included with the custom package
Package promotional discount
Flat −$5.00/mo on the custom package (same promotion as named plans).
Included at no charge
These line items are zero on Quake AI. Many other providers meter them separately.
Data transfer (inbound and outbound)
Unlimited data transfer on every plan; Quake AI does not meter per-GB egress.
AWS, GCP, and Azure meter outbound transfer per GB. DigitalOcean and Hetzner include an allowance on compute plans, then charge overage.
Learn morePrivate networking
Private networks, subnets, Neutron routers, and security groups are included with the plan.
VPC objects are usually free to create elsewhere, but NAT gateways bill hourly plus per-GB processed. Quake AI uses router SNAT with no separate NAT line item.
Control-plane API requests
OpenStack API calls for provisioning and management are included.
Some managed services on other clouds meter API calls or charge for premium control-plane features.
Dev/test vs production
Start on shared CPU for dev/test, then promote to dedicated for production with a flavor resize. The network, storage, and template stay the same.
Dev/test on shared CPU
Burstable s1a flavors; suited to prototyping and low or bursty load.
Production on dedicated CPU
The headline estimate above; predictable steady-load performance.
Saves $49.50/mo while you build on shared CPU.
Shared flavors carry less RAM (m2a.large (8 GiB RAM) -> s1a.small (2 GiB RAM)). A resize reboots the instance; data on attached volumes persists. Size the dedicated flavor for the RAM your production workload needs.
Pricing data last validated: . For current rates, check quake.ai/pricing.
Prerequisites#
You need:
- OpenTofu 1.6.0 or later (or Terraform 1.6.0 or later) installed locally.
- Your OpenStack credentials sourced into the shell (
source openrc.sh). See the OpenStack CLI guide. - An SSH keypair that already exists in your project. Record its name for the
key_namevariable. - A copy of the
clickhousetemplate directory from the template reference page. - Your workstation's public IP address. Find it with
curl -sS https://api.ipify.org.
Step 1: Set the variables and apply the template#
Copy the template's example variables file and set your key and workstation IP:
cp terraform.tfvars.example terraform.tfvarskey_name = "YOUR_KEY_NAME"
client_allowed_cidr = "YOUR_IP/32"Initialize, plan, and apply:
tofu init
tofu plan
tofu applyRecord floating_ip and http_url from tofu output.
Step 2: Read the bootstrap credentials#
ClickHouse does not ship a default password. cloud-init writes credentials to /opt/clickhouse/.bootstrap-user:
ssh ubuntu@YOUR_FLOATING_IP "sudo cat /opt/clickhouse/.bootstrap-user"Confirm the container is running:
ssh ubuntu@YOUR_FLOATING_IP "sudo docker ps --filter name=clickhouse"Step 3: Create a database and run a query#
Replace YOUR_PASSWORD with the password from step 2:
curl "http://YOUR_FLOATING_IP:8123/?user=default&password=YOUR_PASSWORD" \
--data-binary "CREATE DATABASE IF NOT EXISTS demo"
curl "http://YOUR_FLOATING_IP:8123/?user=default&password=YOUR_PASSWORD" \
--data-binary "
CREATE TABLE IF NOT EXISTS demo.events (
event_date Date,
event_name String,
count UInt32
) ENGINE = MergeTree()
ORDER BY (event_date, event_name);
INSERT INTO demo.events VALUES
('2026-07-01', 'page_view', 120),
('2026-07-01', 'signup', 8),
('2026-07-02', 'page_view', 95),
('2026-07-02', 'signup', 12)
"
curl "http://YOUR_FLOATING_IP:8123/?user=default&password=YOUR_PASSWORD" \
--data-binary "
SELECT event_name, sum(count) AS total
FROM demo.events
GROUP BY event_name
ORDER BY total DESC
FORMAT PrettyCompact
"What you built#
- Applied the
clickhousetemplate to provision network, security group, data volume, instance, and floating IP - Read bootstrap credentials and connected over the HTTP interface
- Created a database, loaded sample data, and ran an aggregation query
Scope of this deployment#
This template runs a single-VM ClickHouse host, not a managed warehouse. The instance is CPU-only and runs in one region. You operate the instance, Docker, ClickHouse, and the data volume yourself.
Next steps#
Clean up#
tofu destroyExport any datasets you want to keep before you destroy.
See Also
Instances
Prerequisite
Migrate a Docker container app from AWS to Quake AI
Shares: Docker, Containers
Deploy Airbyte with the airbyte template
Shares: Docker, Containers
Deploy Airflow with the airflow template
Shares: Docker, Containers
Deploy Umami with the analytics-umami template
Shares: Docker, Containers