Getting Started with HeliosDB
Getting Started with HeliosDB
Container images: HeliosDB Full images are not published on Docker Hub or any other public registry. Images and Helm charts are provided through private registry access during onboarding: contact sales@heliosdb.com. In the examples on this page, replace
heliosdb/heliosdbwith the image reference you receive.
Estimated Time: 30 minutes
Welcome to HeliosDB! This guide will help you install, configure, and run your first queries in under 30 minutes.
Table of Contents
- Prerequisites
- Installation
- Starting HeliosDB
- Connecting to HeliosDB
- Creating Your First Database
- Running Your First Queries
- Loading Sample Data
- Next Steps
Prerequisites
System Requirements
Minimum (for development/testing):
- CPU: 2 cores
- RAM: 4 GB
- Disk: 10 GB available space
- OS: Linux, macOS, or Windows
Recommended (for production):
- CPU: 8+ cores
- RAM: 32+ GB
- Disk: 100+ GB SSD (NVMe preferred)
- Network: 10 Gbps
- OS: Ubuntu 22.04 LTS or RHEL 9
Software Dependencies
- Rust: 1.75+ (if building from source)
- Docker: 24.0+ (for containerized deployment)
- PostgreSQL client: 14+ (for psql CLI)
Installation
Choose one of the following installation methods:
Option 1: Docker (Recommended for Quick Start)
Fastest way to get started - no compilation required!
# Pull the latest HeliosDB imagedocker pull heliosdb/heliosdb:latest
# Run HeliosDB containerdocker run -d \ --name heliosdb \ -p 5432:5432 \ -p 8080:8080 \ -p 50051:50051 \ -e HELIOSDB_PASSWORD=mysecretpassword \ -v heliosdb_data:/var/lib/heliosdb \ heliosdb/heliosdb:latest
# Verify it's runningdocker logs heliosdb
# Expected output:# HeliosDB v8.3.0 starting...# Listening on PostgreSQL port 5432# Listening on HTTP port 8080# Listening on gRPC port 50051# Database system is ready to accept connectionsPorts:
- 5432: PostgreSQL wire protocol
- 8080: HTTP REST API
- 50051: gRPC API
Option 2: Native Binary
HeliosDB Full is distributed to licensed customers. Native binaries, container images and source access are provided during onboarding — contact sales@heliosdb.com for access.
Starting HeliosDB
Docker Deployment
If you installed via Docker, skip this section (already running!).
Native Binary Deployment
Step 1: Initialize Data Directory
# Create data directorysudo mkdir -p /var/lib/heliosdbsudo chown $USER:$USER /var/lib/heliosdb
# Initialize database clusterheliosdb init --data-dir=/var/lib/heliosdbOutput:
Initializing HeliosDB cluster...✓ Creating directory structure✓ Generating configuration files✓ Creating system catalogs✓ Initializing WAL directory✓ Setting up authentication
Success! Database cluster initialized at /var/lib/heliosdb
Next steps: 1. Edit /var/lib/heliosdb/heliosdb.conf (configuration) 2. Edit /var/lib/heliosdb/pg_hba.conf (authentication) 3. Start the server: heliosdb server startStep 2: Configure Server (Optional)
Edit /var/lib/heliosdb/heliosdb.conf:
# Connection settingslisten_addresses = '*' # Allow connections from any IPport = 5432max_connections = 1000
# Memory settings (adjust based on your RAM)shared_buffers = '4GB' # 25% of total RAMwork_mem = '256MB'maintenance_work_mem = '1GB'
# Performance tuningrandom_page_cost = 1.1 # For SSD storageeffective_cache_size = '12GB' # 75% of total RAM
# Logginglog_destination = 'stderr'logging_collector = onlog_directory = '/var/log/heliosdb'log_filename = 'heliosdb-%Y-%m-%d.log'log_statement = 'all' # Log all SQL statements (dev only)Step 3: Start the Server
# Start server in foreground (for testing)heliosdb server start --data-dir=/var/lib/heliosdb
# Or start as background service (for production)heliosdb server start --data-dir=/var/lib/heliosdb --daemon
# Check server statusheliosdb server status
# View logstail -f /var/log/heliosdb/heliosdb-$(date +%Y-%m-%d).logVerify server is running:
# Check if port is listeningsudo netstat -tlnp | grep 5432# Output: tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 12345/heliosdbConnecting to HeliosDB
Using psql (PostgreSQL Client)
Install psql (if not already installed):
# Ubuntu/Debiansudo apt install postgresql-client
# macOSbrew install libpqConnect to HeliosDB:
# Using default settingspsql -h localhost -p 5432 -U helios -d postgres
# Enter password: mysecretpassword (Docker) or your configured password
# You should see:# psql (15.4, server HeliosDB 8.3.0)# Type "help" for help.## postgres=#Using HeliosDB CLI
Native HeliosDB shell (better autocomplete and features):
heliosdb cli connect \ --host=localhost \ --port=5432 \ --username=helios \ --database=postgres
# Interactive shell:# heliosdb> SELECT version();# version# -----------# HeliosDB v6.0.0 on x86_64-pc-linux-gnu, compiled by rustc 1.75.0# (1 row)Using Python Client
Install a PostgreSQL driver (HeliosDB Full speaks the PostgreSQL wire protocol):
pip install "psycopg[binary]"Connect and query:
import psycopg
with psycopg.connect( host="localhost", port=5432, user="helios", password="mysecretpassword", dbname="postgres",) as conn: print(conn.execute("SELECT version()").fetchone())See CONNECTING.md for more connection methods (Java, JavaScript, Go, etc.).
Creating Your First Database
Step 1: Create Database
-- Create a new databaseCREATE DATABASE myapp;
-- List all databases\l
-- Connect to new database\c myappStep 2: Create Schema
-- Create users tableCREATE TABLE users ( id SERIAL PRIMARY KEY, username VARCHAR(50) UNIQUE NOT NULL, email VARCHAR(255) UNIQUE NOT NULL, created_at TIMESTAMP DEFAULT NOW(), profile JSONB);
-- Create indexesCREATE INDEX idx_users_email ON users(email);CREATE INDEX idx_users_created_at ON users(created_at);
-- Create posts tableCREATE TABLE posts ( id SERIAL PRIMARY KEY, user_id INTEGER REFERENCES users(id) ON DELETE CASCADE, title VARCHAR(255) NOT NULL, content TEXT, published_at TIMESTAMP, tags TEXT[], metadata JSONB);
-- Create index on foreign keyCREATE INDEX idx_posts_user_id ON posts(user_id);Running Your First Queries
Insert Data
-- Insert usersINSERT INTO users (username, email, profile) VALUES('alice', 'alice@example.com', '{"role": "admin", "verified": true}'),('bob', 'bob@example.com', '{"role": "user", "verified": false}'),('charlie', 'charlie@example.com', '{"role": "moderator", "verified": true}');
-- Insert postsINSERT INTO posts (user_id, title, content, published_at, tags) VALUES(1, 'Getting Started with HeliosDB', 'This is my first post...', NOW(), ARRAY['heliosdb', 'tutorial']),(1, 'Advanced Features', 'Let me show you...', NOW(), ARRAY['heliosdb', 'advanced']),(2, 'Hello World', 'My introduction...', NOW(), ARRAY['intro']);Query Data
-- Simple SELECTSELECT * FROM users;
-- Filter with WHERESELECT username, emailFROM usersWHERE profile->>'role' = 'admin';
-- JOIN tablesSELECT u.username, p.title, p.published_atFROM users uJOIN posts p ON u.id = p.user_idWHERE p.published_at > NOW() - INTERVAL '7 days'ORDER BY p.published_at DESC;
-- Aggregate dataSELECT u.username, COUNT(p.id) AS post_countFROM users uLEFT JOIN posts p ON u.id = p.user_idGROUP BY u.id, u.usernameORDER BY post_count DESC;Update Data
-- Update single rowUPDATE usersSET profile = profile || '{"verified": true}'WHERE username = 'bob';
-- Update with JOINUPDATE postsSET metadata = '{"featured": true}'WHERE user_id IN ( SELECT id FROM users WHERE profile->>'role' = 'admin');Delete Data
-- Delete with conditionDELETE FROM posts WHERE published_at IS NULL;
-- Cascade delete (posts will be auto-deleted due to FK constraint)DELETE FROM users WHERE username = 'charlie';Loading Sample Data
Option 1: Load from CSV
-- Create tableCREATE TABLE sales ( id SERIAL PRIMARY KEY, product VARCHAR(100), quantity INTEGER, price DECIMAL(10,2), sale_date DATE);
-- Load from CSVCOPY sales (product, quantity, price, sale_date)FROM '/path/to/sales.csv'DELIMITER ','CSV HEADER;
-- VerifySELECT COUNT(*) FROM sales;Option 2: Generate Random Data
-- Install random data generator extensionCREATE EXTENSION IF NOT EXISTS helios_random;
-- Generate 1 million random usersINSERT INTO users (username, email, profile)SELECT 'user_' || generate_series AS username, 'user' || generate_series || '@example.com' AS email, json_build_object( 'role', (ARRAY['user', 'admin', 'moderator'])[floor(random() * 3 + 1)], 'verified', random() > 0.5 )::jsonb AS profileFROM generate_series(1, 1000000);
-- VerifySELECT COUNT(*) FROM users;-- Output: 1000000Option 3: Load Sample Database (TPC-H)
# Download and load TPC-H benchmark dataheliosdb load-sample --dataset=tpch --scale=1
# Available datasets:# - tpch (TPC-H benchmark)# - northwind (classic SQL database)# - world (countries, cities, languages)# - sakila (DVD rental database)Next Steps
Congratulations! You’ve successfully installed HeliosDB and run your first queries. Here’s what to explore next:
1. Learn Advanced Querying
- Query Guide - Comprehensive query examples
- Data Types Reference - All supported data types
2. Explore Unique Features
- Vector Search: Vector Search Guide
- Natural Language Queries: NL2SQL Guide
- Time-Series: Time-Series Guide
- Graph Queries: Graph Query Guide
3. Production Deployment
4. Development
5. Get Help
- FAQ - Frequently Asked Questions
- Support: support@heliosdb.com
- Discord Community
Quick Reference
Useful Commands
-- List databases\l
-- List tables\dt
-- Describe table\d users
-- List indexes\di
-- Show current databaseSELECT current_database();
-- Show server versionSELECT version();
-- Show active connectionsSELECT * FROM pg_stat_activity;
-- Show database sizeSELECT pg_size_pretty(pg_database_size('myapp'));
-- Show table sizeSELECT pg_size_pretty(pg_total_relation_size('users'));Configuration Files
- Server config:
/var/lib/heliosdb/heliosdb.conf - Authentication:
/var/lib/heliosdb/pg_hba.conf - Logs:
/var/log/heliosdb/ - Data directory:
/var/lib/heliosdb/
Common Issues
Can’t connect to server?
# Check if server is runningsudo systemctl status heliosdb# orps aux | grep heliosdb
# Check if port is listeningsudo netstat -tlnp | grep 5432Permission denied?
# Fix data directory permissionssudo chown -R $USER:$USER /var/lib/heliosdbOut of memory?
-- Reduce memory settings in heliosdb.confshared_buffers = '1GB'work_mem = '64MB'Next: Connecting to HeliosDB →