[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81238":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":13,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":14,"starSnapshotCount":14,"syncStatus":12,"lastSyncTime":24,"discoverSource":25},81238,"tdns-stats","Hemsby\u002Ftdns-stats","Hemsby","Realtime Dashboard for Technitium",null,"JavaScript",27,2,1,0,3,5,42.43,false,"master",[],"2026-06-12 04:01:32","# tdns-stats\n\nA self-hosted statistics dashboard for [Technitium DNS Server](https:\u002F\u002Ftechnitium.com\u002Fdns\u002F) v15 and later.\n\nDisplays live query feeds, per-server and cluster stats, top domains\u002Fclients, performance metrics (RTT, cache hit rate), and a real-time chart — all pushed to the browser via Server-Sent Events with no page refreshes required.\n\nSee the [CHANGELOG](CHANGELOG.md) for a full history of changes.\n\n## Screenshots\n\n### Dark mode\n\n![Cluster overview — dark](docs\u002Fdark-cluster.png)\n\n![Live feed — dark](docs\u002Fdark-feed.png)\n\n### Light mode\n\n![Cluster overview — light](docs\u002Flight-cluster.png)\n\n![Live feed — light](docs\u002Flight-feed.png)\n\n## Requirements\n\n- Node.js 18 or later\n- Technitium DNS Server v15 or later\n- A query log app installed on each DNS server (e.g. Query Logs SQLite, MySQL, PostgreSQL) if you want the live feed and RTT metrics\n\n## Installation\n\n### 1. Clone the repository\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FHemsby\u002Ftdns-stats.git\ncd tdns-stats\n```\n\n### 2. Install dependencies\n\n```bash\ncd backend\nnpm install\ncd ..\n```\n\n### 3. Configure\n\n```bash\ncp config.example.yml config.yml\n```\n\nEdit `config.yml` and fill in your server details. At minimum you need the `name`, `url`, and `token` for each server. See `config.example.yml` for all available options with descriptions.\n\nTo get your API token: open the Technitium web UI, go to **Administration > Sessions**, and create a token with at least read access.\n\n### 4. Run\n\n```bash\nnode backend\u002Fsrc\u002Fserver.js\n```\n\nThen open `http:\u002F\u002Fyour-host:3000` in a browser.\n\n## Running with Docker\n\n```bash\ncp config.example.yml config.yml\n# edit config.yml with your server details\ndocker compose up -d\n```\n\nThe `config.yml` is mounted read-only into the container at `\u002Fetc\u002Ftdns-stats\u002Fconfig.yml`. To apply config changes, edit the file and run `docker compose restart`.\n\nTo build and run without Compose:\n\n```bash\ndocker build -t tdns-stats .\ndocker run -d \\\n  -p 3000:3000 \\\n  -v $(pwd)\u002Fconfig.yml:\u002Fetc\u002Ftdns-stats\u002Fconfig.yml:ro \\\n  --restart unless-stopped \\\n  tdns-stats\n```\n\n## Running as a systemd service\n\nCreate `\u002Fetc\u002Fsystemd\u002Fsystem\u002Ftdns-stats.service`:\n\n```ini\n[Unit]\nDescription=Technitium DNS Statistics Dashboard\nAfter=network.target\n\n[Service]\nType=simple\nWorkingDirectory=\u002Fopt\u002Ftdns-stats\nExecStart=\u002Fusr\u002Fbin\u002Fnode \u002Fopt\u002Ftdns-stats\u002Fbackend\u002Fsrc\u002Fserver.js\nRestart=always\nRestartSec=5\n\n[Install]\nWantedBy=multi-user.target\n```\n\n**Important:** Use `Restart=always` (not `on-failure`) to enable the auto-update feature. When updates are triggered, the service exits gracefully and systemd automatically restarts it with the latest code.\n\nThen enable and start it:\n\n```bash\nsystemctl daemon-reload\nsystemctl enable tdns-stats\nsystemctl start tdns-stats\n```\n\n## Auto-Update\n\nThe dashboard includes a built-in update checker that works with GitHub releases.\n\n**In the UI:**\n- Version number appears in the top-right corner\n- Click **Check for updates** to fetch the latest release from GitHub\n- If a newer version is available, click **Update** to trigger the update\n- The service automatically detects when it comes back online and refreshes the page\n\n**How it works by deployment method:**\n- **Git clone:** `git fetch` + `git reset --hard origin\u002Fmaster`, then restarts\n- **Docker:** `docker-compose pull` + `docker-compose up -d`\n- **Systemd:** Same as git clone, then `systemctl restart tdns-stats`\n\n**Requirements:**\n- For systemd: `Restart=always` in the service file (see above)\n- For Docker: Restart policy configured (e.g. `--restart unless-stopped`)\n- GitHub releases must be published with version tags (e.g. `v1.1.0`)\n\n## Configuration reference\n\nAll configuration lives in `config.yml` (see `config.example.yml` for a fully annotated example).\n\n| Key | Default | Description |\n|-----|---------|-------------|\n| `port` | `3000` | Port the web interface listens on |\n| `servers[].name` | required | Display name for the server |\n| `servers[].url` | required | Technitium API base URL (e.g. `http:\u002F\u002Fns1.example.com:5380`) |\n| `servers[].token` | required | API token |\n| `servers[].ignoreSsl` | `false` | Skip TLS certificate verification |\n| `servers[].queryLogsApp` | auto-detect | Name of the query log app on this server |\n| `servers[].color` | auto-assigned | Colour for this server in the UI |\n| `poll.statsInterval` | `10` | Seconds between stats refreshes |\n| `poll.feedInterval` | `3` | Seconds between live feed polls |\n| `poll.topInterval` | `30` | Seconds between top-list refreshes |\n| `poll.perfInterval` | `30` | Seconds between RTT\u002Fcache samples |\n| `feed.pageSize` | `20` | Log entries fetched per poll cycle |\n| `feed.maxEntries` | `200` | Maximum entries kept in the browser feed |\n| `top.limit` | `20` | Number of items in top domains\u002Fclients lists |\n| `rtt.sampleSize` | `500` | Log entries scanned per RTT sample |\n\n### Server colours\n\nAvailable values for `servers[].color`: `blue`, `green`, `ora`, `teal`, `pur`, `yel`, `red`.\n\nIf `color` is omitted, servers are auto-assigned colours by their position in the list.\n\nThe colour is used to identify each server in the live feed when **All Servers** is selected, where entries from multiple servers are shown together. Each server name in the feed is highlighted in its assigned colour so you can tell at a glance which server handled each query.\n\n### HTTPS\n\nTo serve over HTTPS without a reverse proxy, add an `https` block to `config.yml`:\n\n```yaml\nhttps:\n  cert: \u002Fetc\u002Fssl\u002Fcerts\u002Ftdns-stats.crt\n  key:  \u002Fetc\u002Fssl\u002Fprivate\u002Ftdns-stats.key\n```\n\nOr using a single combined PEM file (certificate and private key in one file):\n\n```yaml\nhttps:\n  pem: \u002Fetc\u002Fssl\u002Fprivate\u002Ftdns-stats-combined.pem\n```\n\n### Cluster support\n\nIf your Technitium servers are configured as a cluster, the dashboard automatically detects this and adds a **Cluster** tab showing aggregate stats across all nodes alongside the per-node view.\n\n## Live feed\n\nThe live feed requires a query log app to be installed on each DNS server. Supported apps include:\n\n- Query Logs (SQLite)\n- Query Logs (MySQL)\n- Query Logs (PostgreSQL)\n- Query Logs (SQL Server)\n\nIf you have more than one query log app installed, specify which one to use with `servers[].queryLogsApp`. Otherwise the first one found is used automatically.\n\n## Themes\n\nThe dashboard supports light, dark, and system themes. The preference is stored in the browser and applied on next load with no flash of unstyled content.\n","tdns-stats 是一个为 Technitium DNS 服务器 v15 及以上版本设计的自托管统计信息仪表板。该项目使用 JavaScript 编写，通过 Server-Sent Events 技术实现实时更新查询流、每台服务器和集群的状态、热门域名\u002F客户端、性能指标（如往返时间、缓存命中率）以及实时图表，无需刷新页面即可获取最新数据。适用于需要对 DNS 服务进行监控和分析的企业或个人用户，特别是那些已经部署了 Technitium DNS 并希望获得更深入洞察的场景。此外，项目支持 Docker 和 systemd 服务方式部署，方便集成到现有系统中。","2026-06-11 04:04:01","CREATED_QUERY"]