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
Variable | Description | Required | Default |
---|---|---|---|
VITE_CLICKHOUSE_URL | ClickHouse server URL | Yes | - |
VITE_CLICKHOUSE_USER | ClickHouse username | No | "" |
VITE_CLICKHOUSE_PASS | ClickHouse password | No | "" |
VITE_CLICKHOUSE_USE_ADVANCED | Enable advanced features | No | false |
VITE_CLICKHOUSE_CUSTOM_PATH | Custom HTTP path | No | - |
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:
-
Reverse Proxy Setup
- Use Nginx/Apache as a reverse proxy
- Enable HTTPS
- Implement authentication
-
Network Security
- Run on a private network when possible
- Use VPN for remote access
- Implement IP whitelisting
-
Access Control
- Use minimal privilege ClickHouse users
- Regularly rotate credentials
- Monitor access logs
Getting Started Guide π
Connect to ClickHouse
- Launch CH-UI
- Navigate to Settings
- Enter your ClickHouse connection details
Explore Your Data
- Use the Database Explorer to browse tables
- View table structures and sample data
- Create custom views and filters
Write Queries
- Open the SQL Editor
- Use IntelliSense for code completion
- Execute and analyze queries
Organize Your Work
- Create workspace tabs
- Save frequently used queries
- Export results as needed
Support & Community π₯
- Documentation: Browse our comprehensive guides
- GitHub Issues: Report bugs or request features on our GitHub repository
- Discussions: Join our community discussions
Support the Project
If you find CH-UI helpful, consider:
Next Steps π―
- Explore Core Concepts
- Learn about Advanced Features
- Check out our API Reference
- Join our Community