Layer 3 · self-hosting reality check
What it actually takes to self-host DuckDB
The docs say 512 MB. In practice you want Roughly the size of the working set you query at once. Here is the honest version — real requirements, real monthly cost, what you will be maintaining, and the one thing that catches people out.
Usually reached from Snowflake alternatives, where DuckDB is one of the picks.
| RAM — documented minimum | 512 MB |
|---|---|
| RAM — what it really needs | Roughly the size of the working set you query at once |
| CPU | 4 vCPU — it parallelises aggressively |
| Disk | Columnar and compressed; a fraction of the source data |
| Monthly cost | $0 — it is an embedded library, not a server. It runs inside your process. |
| Setup time | 5 minutes |
| How you install it | a library import, or a CLI binary. There is nothing to deploy, which is the whole point. |
| Ongoing maintenance | Effectively none. There is no server to keep alive. |
| Where it stops scaling | Hundreds of gigabytes on one machine, faster than people expect. It queries Parquet on object storage directly, which covers a surprising amount of 'we need a warehouse'. |
The thing that catches people out
It is single-writer by design. Multiple processes cannot write to the same database file concurrently, and people discover this when their second worker fails with a lock error. DuckDB is for analytics inside one process — if you need concurrent writers you want Postgres or ClickHouse, and no amount of configuration changes that.
When not to self-host DuckDB
You need a shared database that several services write to. DuckDB is SQLite's analytical cousin, not a data warehouse server.
Every guide here carries this section. A site that only ever tells you to self-host is selling something — the useful answer is sometimes no.
Other Layer 3 self-hosting guides
Common questions
- How much RAM does DuckDB actually need?
- Roughly the size of the working set you query at once in practice. The documented minimum is 512 MB, which is the figure at which the process starts rather than the figure at which it works under real use. 4 vCPU — it parallelises aggressively alongside it.
- What does self-hosting DuckDB cost per month?
- $0 — it is an embedded library, not a server. It runs inside your process. This is commodity VPS pricing and excludes your time, which is the larger cost for most people — budget for effectively none. There is no server to keep alive.
- How long does it take to set up DuckDB?
- 5 minutes, via a library import, or a CLI binary. There is nothing to deploy, which is the whole point..
- When should I NOT self-host DuckDB?
- You need a shared database that several services write to. DuckDB is SQLite's analytical cousin, not a data warehouse server.
- What is the most common mistake when self-hosting DuckDB?
- It is single-writer by design. Multiple processes cannot write to the same database file concurrently, and people discover this when their second worker fails with a lock error. DuckDB is for analytics inside one process — if you need concurrent writers you want Postgres or ClickHouse, and no amount of configuration changes that.