---
title: "Deploy pg_duckdb (v1.11 /Postgres 18)"
description: "DuckDB powered Postgres for analytics"
category: "Analytics"
url: https://railway.com/deploy/pgduckdb-v111-postgres-18
---

# Deploy pg_duckdb (v1.11 /Postgres 18)

DuckDB powered Postgres for analytics

**[Deploy pg_duckdb (v1.11 /Postgres 18) on Railway](https://railway.com/template/pgduckdb-v111-postgres-18)**

- **Creator:** datadanmark's Projects
- **Category:** Analytics
- **Total deploys:** 1

## Template content

### pg_duckdb https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://duckdb.org/trademark_guidelines&size=256

- **Image:** pgduckdb/pgduckdb:18-v1.1.1

## Documentation

# Deploy and Host pg_duckdb on Railway

[pg_duckdb](https://github.com/duckdb/pg_duckdb) is a PostgreSQL extension that integrates DuckDB's high-performance, columnar-vectorized analytics engine directly into PostgreSQL. 

It enables seamless execution of analytical queries, supports querying data lakes (Parquet, CSV, JSON, Iceberg, Delta Lake) from cloud storage, and integrates with platforms like MotherDuck for cloud analytics.

---

## About Hosting pg_duckdb

Hosting pg_duckdb involves deploying a PostgreSQL instance with the `pg_duckdb` extension enabled. 

This allows you to leverage DuckDB's analytics capabilities within PostgreSQL, enabling high-speed queries on both local tables and external data lakes without data export. 

The extension accelerates analytical workloads, supports modern data formats, and can integrate with cloud platforms like MotherDuck for scalable compute. 

---

## Common Use Cases

- **Analytical Queries:** Accelerate aggregations, window functions, and complex JOINs on PostgreSQL tables using DuckDB’s engine.
- **Data Lake Integration:** Query Parquet, CSV, JSON, Iceberg, and Delta Lake files directly from S3, GCS, Azure, or R2 without loading data into PostgreSQL.
- **Hybrid Workloads:** Combine OLTP (PostgreSQL) and OLAP (DuckDB) in a single environment for mixed workloads.
- **ETL Pipelines:** Transform and load data at scale by joining PostgreSQL tables with external data sources.

---

## Dependencies for pg_duckdb Hosting

- **PostgreSQL:** 18.

### Deployment Dependencies

- [pg_duckdb GitHub Repository](https://github.com/duckdb/pg_duckdb)

### Implementation Details

For cloud integration with MotherDuck:

```
MOTHERDUCK_TOKEN=
```

To force DuckDB execution for all queries:

```
SET duckdb.force_execution = true;
```

---

## Why Deploy pg_duckdb on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying pg_duckdb on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [Betterlytics](https://railway.com/deploy/betterlytics) — Betterlytics is a cookieless analytics platform GDPR-compliant.
- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.
- [Bugsink](https://railway.com/deploy/bugsink) — Self-hosted Error Tracking. Sentry-SDK compatible

Open this page in a browser: https://railway.com/deploy/pgduckdb-v111-postgres-18
