Start working with your data! How to use CH-UI
DocumentationGetting Started

Getting Started with CH-UI πŸš€

Welcome to CH-UI! This guide will help you get up and running quickly with our modern interface for ClickHouse databases.

Quick Start ⚑

Choose your preferred installation method:

Simple Docker Setup

docker run -p 5521:5521 ghcr.io/caioricciuti/ch-ui:latest

Docker with Environment Variables

docker run -p 5521:5521 \
  -e VITE_CLICKHOUSE_URL=http://your-clickhouse-server:8123 \
  -e VITE_CLICKHOUSE_USER=your-username \
  -e VITE_CLICKHOUSE_PASS=your-password \
  ghcr.io/caioricciuti/ch-ui:latest

System Requirements πŸ–₯️

Prerequisites

  • A running ClickHouse server (Installation Guide)
  • For Docker: Docker Engine 20.10.0 or newer
  • For building from source:
    • Node.js >= 20.x
    • npm >= 10.x

Configuration Options βš™οΈ

Environment Variables

VariableDescriptionRequiredDefault
VITE_CLICKHOUSE_URLClickHouse server URLYes-
VITE_CLICKHOUSE_USERClickHouse usernameNo""
VITE_CLICKHOUSE_PASSClickHouse passwordNo""
VITE_CLICKHOUSE_USE_ADVANCEDEnable advanced featuresNofalse
VITE_CLICKHOUSE_CUSTOM_PATHCustom HTTP pathNo-

Advanced Features (required to set custom path)

When VITE_CLICKHOUSE_USE_ADVANCED is enabled:

  • VITE_CLICKHOUSE_CUSTOM_PATH is required to set a custom HTTP path for ClickHouse.
  • The path should be relative to the ClickHouse server URL, without the protocol (e.g., β€œ/path/to/clickhouse”).

Development Environment πŸ› οΈ

Local ClickHouse Instance

Run a local ClickHouse instance for development:

# Start ClickHouse
docker-compose -f docker-compose-dev.yml up -d
 
# Stop ClickHouse
docker-compose -f docker-compose-dev.yml down

Default credentials:

  • URL: http://localhost:8123
  • Username: dev
  • Password: dev

Data is persisted in .clickhouse_local_data directory.

Project Structure πŸ“

ch-ui/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/    # Reusable React components
β”‚   β”œβ”€β”€ pages/        # Main page components
β”‚   β”œβ”€β”€ store/        # State management (Zustand)
β”‚   β”œβ”€β”€ lib/          # Utility functions
β”‚   └── types/        # TypeScript definitions
β”œβ”€β”€ public/           # Static assets
β”œβ”€β”€ App.tsx          # Main application component
└── main.tsx         # Application entry point

Security Best Practices πŸ”’

For production deployments, we recommend:

  1. Reverse Proxy Setup

    • Use Nginx/Apache as a reverse proxy
    • Enable HTTPS
    • Implement authentication
  2. Network Security

    • Run on a private network when possible
    • Use VPN for remote access
    • Implement IP whitelisting
  3. Access Control

    • Use minimal privilege ClickHouse users
    • Regularly rotate credentials
    • Monitor access logs

Getting Started Guide πŸ“š

Connect to ClickHouse

  1. Launch CH-UI
  2. Navigate to Settings
  3. Enter your ClickHouse connection details

Explore Your Data

  1. Use the Database Explorer to browse tables
  2. View table structures and sample data
  3. Create custom views and filters

Write Queries

  1. Open the SQL Editor
  2. Use IntelliSense for code completion
  3. Execute and analyze queries

Organize Your Work

  1. Create workspace tabs
  2. Save frequently used queries
  3. Export results as needed

Support & Community πŸ‘₯

Support the Project

If you find CH-UI helpful, consider:

Buy Me A Coffee

Next Steps 🎯