neondatabase /neon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.

★ 23,315⑂ 1,133👁 119● 589
RustCreated 2021-03-26neon.tech
23,315
stars
+22+23+132
1,133
forks
119
watchers
–
prs
589
issues
–
releases
–
discussions

README

Neon

Neon is an open-source serverless Postgres database platform. It separates storage and compute and substitutes the PostgreSQL storage layer by redistributing data across a cluster of nodes.

 Quick start
Try the Neon Free Tier to create a serverless Postgres instance. Then connect to it with your preferred Postgres client (psql, dbeaver, etc) or use the online SQL Editor. See Connect from any application for connection instructions.

Alternatively, compile and run the project locally.

 Architecture overview

A Neon installation consists of compute nodes and the Neon storage engine. Compute nodes are stateless PostgreSQL nodes backed by the Neon storage engine.

The Neon storage engine consists of two major components:
- Pageserver: Scalable storage backend for the compute nodes.
- Safekeepers: The safekeepers form a redundant WAL service that received WAL from the compute node, and stores it durably until it has been processed by the pageserver and uploaded to cloud storage.

See developer documentation in SUMMARY.md for more information.

 Running a local development environment

Neon can be run on a workstation for small experiments and to test code changes, by
following these instructions.

 Installing dependencies on Linux
1. Install build dependencies and other applicable packages

 On Ubuntu or Debian, this set of packages should be sufficient to build the code:
bash
apt install build-essential libtool libreadline-dev zlib1g-dev flex bison libseccomp-dev \
libssl-dev clang pkg-config libpq-dev cmake postgresql-client protobuf-compiler \
libprotobuf-dev libcurl4-openssl-dev openssl python3-poetry lsof libicu-dev

 On Fedora, these packages are needed:
bash
dnf install flex bison readline-devel zlib-devel openssl-devel \
  libseccomp-devel perl clang cmake postgresql postgresql-contrib protobuf-compiler \
  protobuf-devel libcurl-devel openssl poetry lsof libicu-devel libpq-devel python3-devel \
  libffi-devel

 On Arch based systems, these packages are needed:
bash
pacman -S base-devel readline zlib libseccomp openssl clang \
postgresql-libs cmake postgresql protobuf curl lsof


Building Neon requires 3.15+ version of protoc (protobuf-compiler). If your distribution provides an older version, you can install a newer version from here.

2. Install Rust

 recommended approach from https://www.rust-lang.org/tools/install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh


 Installing dependencies on macOS (12.3.1)
1. Install XCode and dependencies

xcode-select --install
brew install protobuf openssl flex bison icu4c pkg-config m4

 add openssl to PATH, required for ed25519 keys generation in neon_local
echo 'export PATH="$(brew --prefix openssl)/bin:$PATH"'  ~/.zshrc


If you get errors about missing m4 you may have to install it manually:

brew install m4
brew link --force m4


2. Install Rust

 recommended approach from https://www.rust-lang.org/tools/install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON