Connect any app to a free, always-on GunDB relay. No relay server to run, no backend to deploy — realtime P2P sync, offline-first storage, and SEA end-to-end encryption, powered by Cloudflare Workers + Durable Objects.
Open this page in two tabs — messages appear in both in realtime through gunx.pages.dev.
<script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gun/sea.js"></script>
<script src="https://cdn.jsdelivr.net/gh/OpenCodeWEB/GunX@main/public/gunx.js"></script>
<script>
const gunx = GunX({ appKey: 'my-app' });
gunx.get('todos').map().on((v, k) =>
console.log('todo:', k, v));
gunx.put('todos', { learn: 'GunX' });
</script>
const Gun = require('gun');
const GunX = require('./sdk/gunx.js'); // or your bundled copy
const gunx = GunX({ appKey: 'my-app' });
gunx.on('status', ({ status }) =>
console.log('relay:', status));
gunx.get('todos').once(console.log);
gunx.put('todos', { hello: 'world' });
The relay runs on Cloudflare Workers + Durable Objects (SQLite). Zero infrastructure to own, zero cost to start.
Every project gets an isolated appKey namespace — no key collisions on the shared relay.
The SDK re-asks the relay for subscribed souls, fixing GunDB's IndexedDB re-ask gap automatically.
IndexedDB/radisk persistence keeps your app fully functional offline; changes sync when you reconnect.
End-to-end encryption with the Security-Encryption-Authorization module; SDK includes pair persistence helpers.
Token-bucket rate limiting and 1 MB frame caps keep the shared relay fair for everyone. Live stats at /api/stats.