GUN

What GUN is
GUN is a free, open-source, decentralized graph database and data protocol for developers building decentralized applications. It synchronizes data between peers in real time and can retain subscribed data after refresh, including while offline. Its graph model represents SQL-like tables, JSON-like documents, files, livestreaming video, relational data, and hypergraphs. Browser peers use localStorage by default, with IndexedDB available through RAD; the same browser code can run in Node.js. Peers communicate through WebRTC, WebSockets, or other transports, with relay peers passing messages. SEA supplies key pairs, signing, encryption, verification, and certificates for authorizing writes. Storage options include browser storage, Node.js filesystem, AWS S3, IPFS, Level, MongoDB, MySQL, Cassandra, Elasticsearch, and LMDB. GUN can be installed with npm and run as a local Node.js peer, and developers can use plain HTML and JavaScript, React, or Vue. It supports web, API, self-hosted, Linux, macOS, Windows, Android, and iOS deployments.
Who it suits
GUN suits developers building decentralized apps who need peer synchronization, flexible graph data, and self-hosted deployment. It is aimed at teams seeking an open-source Firebase alternative.
What it does well
- Free and open source
- Synchronizes peers in real time
- Supports many graph data models
- Offers multiple storage adapters
- Provides cryptographic write controls
What to know first
- Public data is editable by default
- Credential exposure remains possible through attacks
- Password recovery is cautioned against for banking apps
- Requires developers to manage deployment and security
Limits
Public-space data can be edited by anyone by default; the User system is needed to restrict edits. The documentation cautions against using 3-Friend Account recovery for banking apps.
Getting started
- Install GUN with npm
- Run a local Node.js peer
- Choose browser localStorage or an IndexedDB adapter through RAD
- Connect peers with WebRTC, WebSockets, or another transport
- Add storage adapters such as Node.js filesystem, AWS S3, or IPFS
- Build with plain HTML and JavaScript, React, or Vue
Verdict
GUN offers decentralized synchronization, broad data models, and many storage and transport choices at no listed cost. Developers must configure access controls and protect credentials because public data and client-side secrets have documented risks.
Questions
What is GUN?
GUN is a free, open-source, decentralized graph database and data protocol for developers building decentralized applications.
Where can GUN run?
The listed platforms are Android, API, iOS, Linux, macOS, self-hosted, web, and Windows. Deployment is self-hosted.
Which storage systems can GUN use?
Options include browser localStorage and IndexedDB, Node.js filesystem, AWS S3, IPFS, Level, MongoDB, MySQL, Cassandra, Elasticsearch, and LMDB.
How does GUN protect writes?
SEA provides key pairs, signing, encryption, verification, and certificates for authorizing writes. Public-space data remains editable by anyone by default unless the User system restricts edits.
How do developers install GUN?
The tutorial demonstrates installing GUN with npm and running a local Node.js peer.
Does GUN support offline data?
It can keep subscribed data available after refresh while a peer is offline.
Facts from GUN's own pages
- Account recovery
- The documentation describes serverless password recovery using 3-Friend Account recovery, but cautions against using it for banking apps. · gun.eco, 9 Oct 2026
- Credential risk
- The tutorial warns that passwords or private keys in JavaScript can be exposed through XSS or other attacks and recommends a browser extension such as Party. · gun.eco, 9 Oct 2026
- Data models
- GUN supports graph data, SQL-like tables, JSON-like documents, files, livestreaming video, and relational and hypergraph data. · gun.eco, 9 Oct 2026
- Data sync
- GUN synchronizes data between peers in real time and can keep data available after refresh while offline. · gun.eco, 9 Oct 2026
- Data types
- GUN supports graph data including SQL-like tables, JSON-like documents, files, livestreaming video, relational data, and hypergraphs. · gun.eco, 9 Oct 2026
- Developer integrations
- The documentation shows GUN used with plain HTML and JavaScript and says developers can also use React or Vue. · gun.eco, 9 Oct 2026
- Development
- The tutorial demonstrates installing GUN with npm and running a local Node.js peer. · gun.eco, 9 Oct 2026
- Founded
- 2014 · gun.eco, 28 Sept 2026
- Integrations
- The docs list storage options and adapters including localStorage, IndexedDB, Node.js filesystem, AWS S3, IPFS, Level, MongoDB, MySQL, Cassandra, Elasticsearch, and LMDB. · gun.eco, 9 Oct 2026
- Local first storage
- Browser peers use localStorage or IndexedDB for subscribed data, and the documentation says the same browser code runs in Node.js. · gun.eco, 9 Oct 2026
- Networking
- Peers can sync using WebRTC, WebSockets, or other transports, and GUN describes relay peers that pass messages between peers. · gun.eco, 9 Oct 2026
- Product
- GUN describes itself as an open source, decentralized graph database and data protocol for developers. · gun.eco, 9 Oct 2026
- Public data limit
- The documentation warns that anyone can edit data in public space by default and says the User system is needed to restrict edits. · gun.eco, 9 Oct 2026
- Security
- SEA provides cryptographic features including key pairs, signing, encryption, verification, and certificates for authorizing writes. · gun.eco, 9 Oct 2026
- Security limitation
- The documentation warns that public-space data can be edited by anyone by default. · gun.eco, 9 Oct 2026
- Server storage
- In Node.js, RAD can store data on disk with fs, and plugins for AWS S3 and other storage systems are available. · gun.eco, 9 Oct 2026
- Storage
- Browser peers use localStorage by default, with an IndexedDB adapter also available through RAD. · gun.eco, 9 Oct 2026
- Support
- The tutorial directs users to the GUN chatroom for help, Stack Overflow for API questions, and GitHub Issues for bug reports. · gun.eco, 9 Oct 2026
- Target users
- GUN presents itself as a tool for developers building decentralized apps and calls itself an open source Firebase alternative. · gun.eco, 9 Oct 2026
Where GUN stands on Freedom251
- Graph Databases#13 of 39
- Mobile Databases#14 of 26