Umami
Umami is a simple, fast, privacy-focused web analytics tool that serves as a self-hosted alternative to Google Analytics. It collects only the metrics you care about and respects visitor privacy — no cookies, no tracking across sites, and full GDPR compliance by design. This stack deploys the Umami analytics server backed by PostgreSQL 16 for reliable data storage. Umami provides real-time dashboards showing pageviews, visitors, bounce rate, session duration, referrers, browser/OS/device breakdowns, and custom events. It supports multiple websites, team access with role-based permissions, API access for programmatic data retrieval, and custom event tracking for user interactions. The tracking script is lightweight (~2KB) and doesn't slow down your website. After deployment, access the web UI on port 3000 and log in with admin/umami. Change the password immediately, then add your first website to get the tracking code.
शामिल सर्विसेज़
umami
ghcr.io/umami-software/umami:postgresql-latest
एनवायरनमेंट वेरिएबल्स:
postgres
postgres:16-alpine
एनवायरनमेंट वेरिएबल्स:
जनरेटेड YAML
# Generated by ComposeHub (composehub.dev)
name: umami
services:
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
restart: always
ports:
- 3000:3000
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-umami}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-umami}
DATABASE_TYPE: postgresql
APP_SECRET: ${APP_SECRET:-changeme-generate-a-random-string}
DISABLE_TELEMETRY: ${DISABLE_TELEMETRY:-1}
TRACKER_SCRIPT_NAME: ${TRACKER_SCRIPT_NAME:-script.js}
networks:
- umami
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:3000/api/heartbeat || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
labels:
com.composehub.description: Umami privacy-focused web analytics server
postgres:
image: postgres:16-alpine
restart: always
volumes:
- umami_db:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${POSTGRES_DB:-umami}
POSTGRES_USER: ${POSTGRES_USER:-umami}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
networks:
- umami
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER:-umami} -d ${POSTGRES_DB:-umami}
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
labels:
com.composehub.description: PostgreSQL 16 database for Umami analytics
networks:
umami:
driver: bridge
volumes:
umami_db:
driver: local
त्वरित जानकारी
- सर्विसेज़
- 2
- नेटवर्क्स
- 1
- वॉल्यूम्स
- 1
कब उपयोग करें
यह टेम्पलेट एक umami एनवायरनमेंट सेटअप के लिए आदर्श है। सभी सर्विसेज़ healthchecks, रिसोर्स लिमिट्स और उचित डिफ़ॉल्ट सेटिंग्स के साथ पहले से कॉन्फ़िगर्ड हैं। प्रोडक्शन में डिप्लॉय करने से पहले एनवायरनमेंट वेरिएबल्स कस्टमाइज़ करें।
सुझाव
- डिप्लॉय करने से पहले सभी डिफ़ॉल्ट पासवर्ड बदलें
- अपने हार्डवेयर के अनुसार रिसोर्स लिमिट्स की समीक्षा करें
- प्रोडक्शन HTTPS के लिए रिवर्स प्रॉक्सी जोड़ें
- डेटा वॉल्यूम्स के लिए बैकअप रणनीतियाँ कॉन्फ़िगर करें