GUN Database
A realtime, decentralized, offline-first graph data synchronization engine. Build collaborative apps that work everywhere with end-to-end encryption.
Quick start
Get up and running with GUN in minutes.
Install GUN
Install GUN via npm, yarn, or use the CDN link directly in your HTML.Or include via CDN:
Store and retrieve data
Use GUN’s graph API to put and get data with realtime updates.
Changes propagate in realtime to all connected peers automatically.
Key features
Everything you need to build decentralized applications.
Realtime sync
Automatic P2P state synchronization with conflict-free updates across all peers
Graph database
Flexible graph structure supporting key/value, documents, tables, and relations
Offline-first
Works fully offline and syncs automatically when connectivity returns
Decentralized
No single point of failure with peer-to-peer mesh networking
End-to-end encryption
Built-in security with SEA for authentication, encryption, and signatures
High performance
20M+ API operations per second in just 9KB gzipped
Explore documentation
Learn core concepts, explore the API, and integrate GUN into your stack.
Core concepts
Understand graph databases, CRDTs, and decentralized architectures
API reference
Complete API documentation for all GUN methods and options
Security (SEA)
User authentication, encryption, and cryptographic operations
Integration guides
Use GUN with React, Vue, Angular, Node.js, and more
Ready to build decentralized apps?
Join thousands of developers using GUN to build collaborative, offline-first applications.
Start Building