selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

MyDuck Server logo

Self-host MyDuck Server

MySQL/Postgres compatible analytics server powered by DuckDB

BetaOpen SourceApache-2.0
Updatedlast month
LanguageGo
Setup difficultyModerate
Stars
594
Ports
3306 (MySQL wire protocol), 5432 (PostgreSQL wire protocol)
Docker
apecloud/myduckserver
Install with Docker

What is MyDuck Server?

MyDuck Server is an open-source analytics server that lets MySQL and PostgreSQL users run analytical queries at DuckDB speeds without leaving their familiar ecosystem. It implements both MySQL and PostgreSQL wire protocols, allowing any compatible client to connect and execute queries that are translated and executed by DuckDB's columnar OLAP engine. The server supports zero-ETL real-time replication from MySQL (via GTID-based replication) and PostgreSQL (via logical replication), making it a drop-in analytical replica. It also runs in standalone mode as a DuckDB server accessible via PostgreSQL protocol. Key capabilities include HTAP architecture support via ProxySQL or PGPool-II, end-to-end columnar I/O with Parquet/Arrow formats, bulk data loading via LOAD DATA and COPY commands, backup/restore to S3-compatible object storage, and integration with LLM applications via Model Context Protocol (MCP). The project is developed by ApeCloud and released under Apache-2.0 license. No stable releases have been published yet; the Docker image uses the 'latest' tag.

Should you self-host MyDuck Server?

MyDuck Server scores 49/100 on selfhost.directory (how scoring works) and ranks #30 of 38 in Databases. It has 594 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is SurrealDB (78/100, 33 241 stars). It scores higher overall, so compare the two before you pick. See MyDuck Server vs SurrealDB side by side.

Features

  • Arrow Flight SQLMarked as done in roadmap
  • Backup and restore to object storage
  • Bulk data loading
  • Consistent and efficient replication
  • DuckDB server mode
  • End-to-end columnar I/O
  • HTAP architecture support
  • LLM integration via MCP
  • Multiple database supportMarked as done in roadmap
  • MySQL wire protocol compatibility
  • PostgreSQL wire protocol compatibility
  • Python data science ecosystem integration
  • Raw DuckDB SQL access
  • Standalone mode
  • Zero-ETL replication

MyDuck Server README

How to install MyDuck Server

Install MyDuck Server with Docker

Environment variables
SETUP_MODE, SOURCE_DSN, DEFAULT_DB, SUPERUSER_PASSWORD, RESTORE_FILE, RESTORE_ENDPOINT, RESTORE_ACCESS_KEY_ID, RESTORE_SECRET_ACCESS_KEY

docker run -p 13306:3306 -p 15432:5432 apecloud/myduckserver:latest

Exposes port 13306 for MySQL protocol and 15432 for PostgreSQL protocol

How to configure MyDuck Server

  • DEFAULT_DBDefault database name to create on startup

    Default database name to create on startup

    values: any valid database name

  • RESTORE_ACCESS_KEY_IDAccess key ID for object storage

    Access key ID for object storage

    values: access key string

  • RESTORE_ENDPOINTEndpoint for object storage

    Endpoint for object storage

    values: S3 endpoint URL

  • RESTORE_FILEURI to the backup file for restore (e.g., s3://bucket/path/mysql.db)

    URI to the backup file for restore (e.g., s3://bucket/path/mysql.db)

    values: S3-compatible URI

  • RESTORE_SECRET_ACCESS_KEYSecret access key for object storage

    Secret access key for object storage

    values: secret key string

  • SETUP_MODESetup mode for the container: REPLICA for replication from primary database, SERVER for standalone/restore mode

    Setup mode for the container: REPLICA for replication from primary database, SERVER for standalone/restore mode

    values: REPLICA, SERVER

  • SOURCE_DSNConnection string to the primary database server for replication (MySQL or PostgreSQL)

    Connection string to the primary database server for replication (MySQL or PostgreSQL)

    values: mysql://user:pass@host:port/db or postgres://user:pass@host:port/db

  • SUPERUSER_PASSWORDPassword for the superuser account

    Password for the superuser account

    values: any string

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…