The open-source realtime database for Apache Iceberg. Run it on Contrast, or install it on your own machine with one command.
Lakeserve is a SQL database for Apache Iceberg tables, written in Rust and open source under Apache-2.0. Single-row inserts commit in milliseconds and the next query sees them, and the same binary runs as one process on a laptop or as a coordinator with workers across a cluster. Spark, Trino, DuckDB and other Iceberg readers can open the same tables.
You can use Lakeserve two ways:
| Lakeserve on Contrast | Lakeserve on your own machine | |
|---|---|---|
| Setup | Create a Lakeserve workspace | curl -fsSL https://lakeserve.contrastdb.com | sh |
| Tables | Iceberg in Contrast-managed storage, plus Iceberg catalogs you connect | Iceberg in a local warehouse directory, or in an Iceberg REST catalog such as AWS Glue on S3-compatible storage you own |
| Loading data | Sources sync databases, apps, event streams and files, including continuous PostgreSQL and Supabase change data capture | INSERT from your own clients |
| Querying | SQL in Contrast, the Postgres endpoint, the CLI, MCP and the API | Spark Connect on port 15002, and SQL over HTTP and the web UI on port 15080 |
| Compute | Serverless, or a dedicated cluster reserved for your workspace | Your hardware |
A Lakeserve workspace gives you a hosted database. Contrast stores your tables in Apache Iceberg in Contrast-managed storage, keeps them current as sources sync, and runs the SQL you send.
| Where you query | What runs it |
|---|---|
| SQL in Contrast, the CLI, MCP and the API | Serverless: shared capacity that Contrast scales for each query. Reads run on Lakeserve; a read Lakeserve can't serve runs on DuckDB instead. |
| A query that names a dedicated cluster | Lakeserve on compute reserved for your workspace. Dedicated clusters are in early access; see compute. |
| The Postgres endpoint | DuckDB SQL, run as written, for BI tools and Postgres drivers. |
Reads are written in Spark SQL everywhere except the Postgres endpoint. See the SQL reference for the dialect, table names and what each surface can run. Workspace permissions apply to every query, whichever engine runs it; see security and permissions.
| Capability | Free and pay as you go | Enterprise |
|---|---|---|
| Iceberg tables in Contrast-managed storage | Yes | Yes |
| Sync sources into Lakeserve, including continuous PostgreSQL and Supabase ingestion | Yes | Yes |
| Query Iceberg tables in your own catalogs in place | Yes | Yes |
| Iceberg tables in storage buckets you own | No | Yes |
| Accelerate existing Iceberg tables you already manage | No | Yes |
Managed storage and data scanned count toward your plan's allowances. Our team sets up Enterprise options with you; to ask about them, book a call with us.
Lakeserve is in preview, with builds for Linux on x86-64 and ARM64 and for macOS on Apple silicon. Install the latest build:
curl -fsSL https://lakeserve.contrastdb.com | shThe installer checks the download's SHA-256 and puts lakeserve in ~/.local/bin. Start a local database:
lakeserve startOpen the web UI at http://127.0.0.1:15080, or query from a shell:
lakeserve client --query "CREATE TABLE trips (id BIGINT, city STRING, fare DOUBLE)"
lakeserve client --query "INSERT INTO trips VALUES (1, 'Oslo', 12.5), (2, 'Lima', 7.0)"
lakeserve client --query "SELECT city, sum(fare) FROM trips GROUP BY city"Or connect with PySpark over Spark Connect:
from pyspark.sql import SparkSession
spark = SparkSession.builder.remote("sc://127.0.0.1:15002").getOrCreate()
spark.sql("SELECT * FROM trips").show()Or send SQL over HTTP. The response holds the columns with their Arrow types and the rows as text; send back the session it returns to keep USE and SET across requests.
curl -s http://127.0.0.1:15080/query -d '{"sql": "SELECT 1 AS one"}'lakeserve start keeps its tables in a local warehouse under ~/.lakeserve. To run it in the background now and at every login, use lakeserve install (a launchd agent on macOS, a systemd user unit on Linux); lakeserve uninstall removes it. Listening beyond this host with --address or --http-address needs a password, which lakeserve start asks for once, or takes from LAKESERVE_PASSWORD.
Lakeserve plans Spark SQL and DataFrame queries with Apache DataFusion and runs them on Arrow. lakeserve start is a coordinator without workers: it runs every query itself. In a cluster, lakeserve coordinator accepts sessions, plans queries and places their stages on lakeserve worker processes, which cache table data on local NVMe.
Lakeserve stores data as Parquet in standard Iceberg tables. Compaction, snapshot expiry and orphan-file removal stay with Spark or your catalog's table optimizers, as for any Iceberg table.
The Lakeserve repository has the source, build instructions and deployment guide for hosts, configuration and catalogs. Open an issue if something breaks.