Skip to main content

Getting Started with Duck-UI

Duck-UI is a web-based interface for interacting with DuckDB, providing a powerful and intuitive way to work with data directly in your browser. This guide will help you get Duck-UI up and running quickly.

Installation Options​

Choose your preferred installation method:

The easiest way to get started with Duck-UI is using Docker. You can use either the simple docker run command or Docker Compose.

Using docker run

Run this command:

docker run -p 5522:5522 ghcr.io/caioricciuti/duck-ui:latest

Then open your browser and navigate to http://localhost:5522.

Using Docker Compose
  1. Create a docker-compose.yml file with the following content:
version: '3.8'
services:
duck-ui:
image: ghcr.io/caioricciuti/duck-ui:latest
restart: always
ports:
- "${DUCK_UI_PORT:-5522}:5522"
  1. Run docker compose:
docker-compose up -d

You can then access Duck-UI in your browser at http://localhost:5522 (or the port you have set using DUCK_UI_PORT environment variable).

Core Features​

SQL Editor​

  • Write and execute SQL queries with syntax highlighting
  • Auto-completion support
  • Execute queries using Cmd/Ctrl + Enter
  • View results in a formatted table

Data Import​

Import your data from various formats:

  • CSV files
  • JSON files
  • Parquet files
  • Apache Arrow files

Data Explorer​

  • Browse databases and tables
  • View table schemas
  • Preview table contents
  • Manage table operations

Keyboard Shortcuts​

ActionShortcut
Expand/Shrink SidebarCmd/Ctrl + B
Open Search BarCmd/Ctrl + K
Run QueryCmd/Ctrl + Enter
Run Highlighted QueryCmd/Ctrl + Shift + Enter

Quick Start Example​

Here's a quick example to get you started:

  1. Launch Duck-UI and navigate to the SQL Editor

  2. Create a sample table:

    CREATE TABLE users (
    id INTEGER,
    name VARCHAR,
    email VARCHAR
    );

    INSERT INTO users VALUES
    (1, 'John Doe', '[email protected]'),
    (2, 'Jane Smith', '[email protected]');
  3. Query the data:

    SELECT * FROM users;

Troubleshooting​

If you encounter any issues:

  1. Check if you're using the latest version
  2. Verify that your browser supports WebAssembly
  3. Clear your browser cache and reload
  4. Check our GitHub Issues page

Need Help?​