ClickHouse + Tabix
ClickHouse high-performance columnar OLAP database with Tabix web UI for analytics and data exploration.
Overview
ClickHouse is a high-performance columnar database management system designed for online analytical processing (OLAP) workloads. Developed by Yandex in 2009 and open-sourced in 2016, ClickHouse excels at processing billions of rows in milliseconds through its innovative column-oriented storage architecture and advanced compression algorithms. Unlike traditional row-based databases, ClickHouse stores data in columns, making it exceptionally fast for analytical queries that typically scan large datasets but only need specific columns. Tabix provides a modern web-based interface for ClickHouse, offering visual query building, data exploration tools, and interactive dashboards. This web client transforms ClickHouse's command-line interface into an accessible graphical environment where users can write SQL queries, visualize results, and manage database schemas without technical expertise. Tabix includes features like query history, result formatting, and connection management that streamline database interactions. This combination delivers enterprise-grade analytical capabilities for organizations processing large volumes of time-series data, logs, or business metrics. Data engineers and analysts benefit from ClickHouse's sub-second query performance on massive datasets while business users can explore data through Tabix's intuitive interface, making advanced analytics accessible across different skill levels.
Key Features
- Column-oriented storage with advanced compression reducing storage by 10x compared to traditional databases
- Real-time query performance processing billions of rows in milliseconds
- Native SQL support with extensions for analytical functions and window operations
- Tabix web interface with visual query builder and interactive result visualization
- MergeTree engine family optimized for time-series and analytical workloads
- Distributed query execution across multiple nodes for horizontal scaling
- Approximate query processing for ultra-fast statistical analysis
- Built-in materialized views for pre-aggregated analytics and real-time reporting
Common Use Cases
- 1Real-time business intelligence dashboards analyzing customer behavior and sales metrics
- 2Log analytics for monitoring application performance and system health at scale
- 3Time-series analysis for IoT sensor data and infrastructure monitoring
- 4Financial data analysis processing trading records and market data
- 5E-commerce analytics tracking user journeys and conversion funnels
- 6Media analytics measuring content engagement and advertising effectiveness
- 7Telecommunications data analysis for call detail records and network optimization
Prerequisites
- Minimum 8GB RAM recommended for production workloads with large datasets
- Docker Engine 20.10+ and Docker Compose V2 for container orchestration
- Available ports 8123 (HTTP API), 9000 (native protocol), and 8080 (Tabix UI)
- Basic SQL knowledge for writing analytical queries and data modeling
- Understanding of columnar database concepts and OLAP workload patterns
- SSD storage recommended for optimal query performance on large datasets
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 clickhouse: 3 image: clickhouse/clickhouse-server:latest4 container_name: clickhouse5 restart: unless-stopped6 environment: 7 CLICKHOUSE_USER: ${CLICKHOUSE_USER}8 CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}9 CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 110 volumes: 11 - clickhouse_data:/var/lib/clickhouse12 - clickhouse_logs:/var/log/clickhouse-server13 ports: 14 - "8123:8123"15 - "9000:9000"16 networks: 17 - clickhouse-network18 ulimits: 19 nofile: 20 soft: 26214421 hard: 2621442223 tabix: 24 image: spoonest/clickhouse-tabix-web-client:stable25 container_name: tabix26 restart: unless-stopped27 environment: 28 CH_HOST: clickhouse29 CH_PORT: 812330 ports: 31 - "8080:80"32 depends_on: 33 - clickhouse34 networks: 35 - clickhouse-network3637volumes: 38 clickhouse_data: 39 clickhouse_logs: 4041networks: 42 clickhouse-network: 43 driver: bridge.env Template
.env
1# ClickHouse Configuration2CLICKHOUSE_USER=default3CLICKHOUSE_PASSWORD=changemeUsage Notes
- 1Docs: https://clickhouse.com/docs
- 2Tabix UI at http://localhost:8080 | HTTP API at http://localhost:8123
- 3Native protocol on port 9000 - use for high-performance clients
- 4Test query: curl 'http://localhost:8123/?query=SELECT%201'
- 5Use MergeTree engine family for time-series and analytics workloads
- 6Optimized for OLAP - billions of rows in sub-second queries
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
clickhouse
clickhouse:
image: clickhouse/clickhouse-server:latest
container_name: clickhouse
restart: unless-stopped
environment:
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
volumes:
- clickhouse_data:/var/lib/clickhouse
- clickhouse_logs:/var/log/clickhouse-server
ports:
- "8123:8123"
- "9000:9000"
networks:
- clickhouse-network
ulimits:
nofile:
soft: 262144
hard: 262144
tabix
tabix:
image: spoonest/clickhouse-tabix-web-client:stable
container_name: tabix
restart: unless-stopped
environment:
CH_HOST: clickhouse
CH_PORT: 8123
ports:
- "8080:80"
depends_on:
- clickhouse
networks:
- clickhouse-network
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 clickhouse:5 image: clickhouse/clickhouse-server:latest6 container_name: clickhouse7 restart: unless-stopped8 environment:9 CLICKHOUSE_USER: ${CLICKHOUSE_USER}10 CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}11 CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 112 volumes:13 - clickhouse_data:/var/lib/clickhouse14 - clickhouse_logs:/var/log/clickhouse-server15 ports:16 - "8123:8123"17 - "9000:9000"18 networks:19 - clickhouse-network20 ulimits:21 nofile:22 soft: 26214423 hard: 2621442425 tabix:26 image: spoonest/clickhouse-tabix-web-client:stable27 container_name: tabix28 restart: unless-stopped29 environment:30 CH_HOST: clickhouse31 CH_PORT: 812332 ports:33 - "8080:80"34 depends_on:35 - clickhouse36 networks:37 - clickhouse-network3839volumes:40 clickhouse_data:41 clickhouse_logs:4243networks:44 clickhouse-network:45 driver: bridge46EOF4748# 2. Create the .env file49cat > .env << 'EOF'50# ClickHouse Configuration51CLICKHOUSE_USER=default52CLICKHOUSE_PASSWORD=changeme53EOF5455# 3. Start the services56docker compose up -d5758# 4. View logs59docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/clickhouse/run | bashTroubleshooting
- ClickHouse container exits with 'Memory limit exceeded': Increase container memory limits and set max_memory_usage in ClickHouse configuration
- Tabix shows 'Connection refused' to ClickHouse: Verify CH_HOST environment variable matches ClickHouse service name and both containers are on same network
- Queries timeout on large datasets: Tune max_execution_time setting and consider using LIMIT clauses for initial data exploration
- High memory usage during queries: Configure max_memory_usage_for_user and optimize queries to use appropriate WHERE clauses
- Tabix interface loads but queries fail: Check ClickHouse user permissions and ensure CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT is enabled
- Poor query performance: Verify data is using MergeTree engine family and consider adding appropriate ORDER BY keys for your query patterns
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download