Privacy-first web analytics with blockchain backup powered by Arkiv DB storage.
- π Privacy First: No cookies, no cross-site tracking, GDPR compliant
- β‘ Lightweight: 2KB tracking script that won't slow down your website
- βοΈ Blockchain Backup: Automatic data sync to Arkiv DB for decentralized storage
- π Multi-Website: Track multiple websites from one dashboard
- π Real-time Analytics: Live dashboard with essential metrics
- π Self-hosted: Full control over your data
- Frontend: Next.js 15, React 18, Tailwind CSS
- Backend: Node.js, PostgreSQL 15, Prisma ORM
- Blockchain: Arkiv DB (Kaolin testnet)
- Infrastructure: Docker Compose, Traefik reverse proxy
- Analytics: Real-time tracking with session management
- Docker & Docker Compose
- Traefik reverse proxy (for SSL)
-
Clone the repository
git clone https://github.com/m00npl/umamidb.git cd umamidb -
Configure environment
cp .env.example .env # Edit .env with your settings -
Start services
docker compose up -d
-
Access dashboard
- Open: https://umami.usecases.arkiv.network
- Login:
admin - Password:
[check UMAMI_ADMIN_PASSWORD in .env]
Create .env file with:
# Umami Configuration
DATABASE_URL=postgresql://umami_user:YOUR_DB_PASSWORD@db:5432/umami
APP_SECRET=YOUR_APP_SECRET
# Umami API Access
UMAMI_URL=https://umami.usecases.arkiv.network
UMAMI_USERNAME=admin
UMAMI_PASSWORD=YOUR_PASSWORD
# PostgreSQL
POSTGRES_DB=umami
POSTGRES_USER=umami_user
POSTGRES_PASSWORD=YOUR_DB_PASSWORD
# Arkiv Configuration
ARKIV_PRIVATE_KEY=0xYOUR_PRIVATE_KEY
ARKIV_CHAIN_ID=60138453025
ARKIV_RPC_URL=https://kaolin.hoodi.arkiv.network/rpc
ARKIV_WS_URL=wss://kaolin.hoodi.arkiv.network/rpc/wsUse the automated setup script:
node setup-all-projects.jsOr manually through the dashboard at https://umami.usecases.arkiv.network/dashboard
Add this script to your website's <head> section:
<script
async
src="https://umami.usecases.arkiv.network/script.js"
data-website-id="YOUR_WEBSITE_ID"
></script>Add to your service in docker-compose.yml:
networks:
default:
external: true
name: traefik-networkThen add Traefik labels for script proxying:
labels:
- "traefik.http.routers.myapp-script.rule=Host(\`myapp.com\`) && Path(\`/script.js\`)"
- "traefik.http.routers.myapp-script.service=umami-app@docker"Data is automatically synced to Arkiv DB blockchain in real-time using a sophisticated queue system:
- π Instant Sync: Data synced immediately after being recorded in Umami
- π¦ Batch Processing: Queue batches up to 10 items or 5-second timeout
- π Retry Logic: Exponential backoff with 3 retry attempts (1s β 2s β 4s)
- πΎ Database Triggers: PostgreSQL triggers for instant notifications
- β‘ Performance: Optimized for high throughput with minimal latency
- Pageviews: URL, referrer, timestamp, hostname
- Events: Custom events with metadata and event names
- Sessions: User sessions, device info, geolocation
- Websites: Site metadata and domain information
- Database: Indefinite PostgreSQL storage
- Blockchain: 30 days retention (BTL: ~1,296,000 blocks)
- Annotations: Smart tagging with type, source, website_id, timestamp
- Querying: Efficient blockchain queries using annotation filters
# Runs automatically with main services
docker compose up -d# One-time sync for historical data
docker compose --profile sync up arkiv-sync# View real-time sync logs
docker compose logs arkiv-realtime-sync -f
# Check sync service status
docker compose ps arkiv-realtime-sync| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/login |
Authenticate user |
| GET | /api/websites |
List websites |
| POST | /api/websites |
Create website |
| GET | /api/websites/:id/stats |
Get analytics |
| POST | /api/send |
Receive tracking data |
| GET | /script.js |
Tracking script |
The following websites are pre-configured:
- CopyPal (copypal.online)
- DrawioDB (drawiodb.online)
- FileDB (filedb.online)
- ImageDB (imagedb.online)
- WebDB (webdb.site)
- No Tracking Cookies: Fully cookieless tracking
- IP Hashing: Anonymized visitor identification
- GDPR Compliant: No consent banners required
- Encrypted Backup: Secure blockchain storage
- Environment Secrets: All credentials in
.env
# Install dependencies
bun install
# Run real-time sync
node real-time-sync.js
# Run legacy manual sync
node golem-sync.js sync
# Query blockchain data
node golem-sync.js querydocker compose exec db psql -U umami_user -d umamiβββ docker-compose.yml # Main services configuration
βββ real-time-sync.js # Real-time blockchain sync with queue
βββ golem-sync.js # Legacy manual sync script
βββ setup-all-projects.js # Automated website setup
βββ public/
β βββ index.html # Landing page
βββ .env # Environment configuration
βββ README.md # This file
- Fork the repository
- Create feature branch
- Make changes
- Test thoroughly
- Submit pull request
MIT License - see LICENSE file for details
- Live Demo: https://umami.usecases.arkiv.network
- Dashboard: https://umami.usecases.arkiv.network/dashboard
- Umami Official: https://umami.is
- Arkiv Network: https://arkiv.network
Built with β€οΈ for the decentralized web