Discord bot for GL.iNet community operations under the public GL.iNet UnOfficial Discord Bot name, with invite/code role access, moderation tools, search helpers, firmware/YouTube/LinkedIn/beta-program monitoring, member-activity analytics, utility commands, and a secured multi-guild web admin GUI.
- Install / invite link: Add GL.iNet UnOfficial Discord Bot to your server
Detailed feature behavior, deployment options, environment variables, proxy variations, and security guidance are maintained in the wiki.
- Wiki home:
wiki/Home.md - GitHub wiki page: https://github.com/wickedyoda/Glinet_discord_bot/wiki
- Public repo landing redirect target: http://discord.glinet.wickedyoda.com/
- Public wiki redirect target: http://discord.glinet.wickedyoda.com/wiki
- GitHub wiki export helper:
scripts/export_github_wiki.sh
- Copy env template:
cp .env.example .env- Set required values in
.env:
DISCORD_TOKENGUILD_IDWEB_ADMIN_DEFAULT_PASSWORD(required when no web users exist yet)
- Start:
docker compose up -d --build- Open web admin:
http://localhost:8080
https://localhost:8081
If no certificate is present, the bot generates a default self-signed certificate in ${DATA_DIR}/ssl/. Replace the generated files with your own certificate and key if you want a browser-trusted deployment.
- Native local builds (
docker compose up -d --build) run on the host architecture (Apple Siliconarm64or Intel/AMDamd64). - Published GHCR images are built as a multi-arch manifest for:
linux/amd64linux/arm64
- Optional multi-arch publish command:
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/<owner>/discord_invite_bot:multiarch-test \
--push \
.- Optional host-native local test image command:
docker compose build- Role access via invite links and 6-digit access codes
- Bulk CSV role assignment
- Guild-scoped tag responses (
!tag+/tagselector) - Source-specific search commands for GL.iNet forums, OpenWrt forums, Reddit, GL.iNet docs, and AstroWarp docs
- Utility commands for
ping, uptime/status, URL shortening/expansion, quick image/greeting helpers, and fun commands like coin flip, 8-ball, meme, and dad joke - Country nickname suffix commands
- Extended moderation commands and event logging
- Moderator-only random member selection command that excludes staff roles and enforces a 7-day per-guild cooldown before the same member can be picked again
- Firmware monitor (baseline + delta notifications)
- YouTube subscription monitor with channel-to-Discord posting
- LinkedIn public profile monitor with channel-to-Discord posting
- GL.iNet beta program page monitor with add/remove notifications into Discord
- Web-managed Reddit feed posting for new subreddit submissions
- Member activity tracking with private
/statsoutput, web top-20 views for rolling 90/30/7/1-day windows, and ZIP export from the web GUI - Guild-scoped welcome automation with optional channel post, optional DM, and optional uploaded image attachment with validated file type, byte-size limit, and dimension metadata
- Web admin GUI with server selection, guild-scoped management pages, action history, member activity, YouTube subscriptions, LinkedIn profile subscriptions, GL.iNet beta-program monitoring, per-guild channel/tag settings, and role-access invite/code management
- Optional guild allowlist mode for multi-guild deployments and public invites
- Guild-scoped data quarantine on bot removal with 14-day restore window on same-ID rejoin before permanent purge
- SQLite persistence with legacy merge import on startup
- Local verification tooling for lint, tests, security checks, and Docker builds
- Full command list and role restrictions:
wiki/Command-Reference.md - Web admin pages and workflows:
wiki/Web-Admin-Interface.md - Environment variables (complete):
wiki/Environment-Variables.md - Docker and Portainer deployment variants:
wiki/Docker-and-Portainer-Deploy.md - Reverse proxy setups (Nginx, Caddy, Traefik, Apache, HAProxy):
wiki/Reverse-Proxy-Web-GUI.md - Developer verification workflow:
scripts/verify.sh - Security controls and hardening checklist:
wiki/Security-Hardening.md - Data and log file layout:
wiki/Data-Files.md
- Primary DB:
${DATA_DIR}/bot_data.db - App log:
${LOG_DIR}/bot.log - Bot channel mirror log:
${LOG_DIR}/bot_log.log - Error log used by
/logs:${LOG_DIR}/container_errors.log - Web GUI interaction audit log:
${LOG_DIR}/web_gui_audit.log
Defaults:
DATA_DIR=dataLOG_DIR=/logsLOG_HARDEN_FILE_PERMISSIONS=true(enforces0700on log dir and0600on log files when possible)LOG_RETENTION_DAYS=90LOG_ROTATION_INTERVAL_DAYS=1
To backfill member activity history once at startup, set:
MEMBER_ACTIVITY_BACKFILL_ENABLED=trueMEMBER_ACTIVITY_BACKFILL_GUILD_ID=<target guild id>or leave blank to useGUILD_IDMEMBER_ACTIVITY_BACKFILL_SINCE=2026-02-01
Behavior:
- Scans readable channel history from the selected guild starting at the given UTC date
- Reuses completed backfill coverage so reruns only scan missing time ranges instead of rereading already indexed periods
- Uses a one-time state record so the same completed backfill range does not rerun every restart
- Only keeps the last 90 days of activity data
- Feeds the same
/statscommand and/admin/member-activityweb views used for live collection
- No public web signup; web users are admin-created.
- Password policy and 90-day password rotation are enforced.
- CSRF and session hardening are enabled by default.
- Member-activity identity fields are encrypted at rest. Set
MEMBER_ACTIVITY_ENCRYPTION_KEYfor external key management, or let the bot generate${DATA_DIR}/member_activity.key. - Deployment hardening guidance:
wiki/Security-Hardening.md - Project Terms of Service and Privacy Policy: https://wickedyoda.com/?p=3460
- Discord developer terms: https://support-dev.discord.com/hc/en-us/articles/8562894815383-Discord-Developer-Terms-of-Service
Use complete commit and PR descriptions for all changes.
- Contributor guide:
CONTRIBUTING.md
- License text:
LICENSE - Additional rights/policy summary:
LICENSE.md
Created and maintained by WickedYoda
Support Discord: https://discord.gg/m6UjX6UhKe

