- TypeScript 99.4%
- Shell 0.2%
- JavaScript 0.2%
| .forgejo | ||
| .github | ||
| dashboard | ||
| docker | ||
| docs | ||
| k8s | ||
| logs | ||
| packages/fluxerjs-ws | ||
| scripts | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .env.docker.example | ||
| .env.example | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| CODE_OF_CONDUCT.md | ||
| COMMERCIAL.md | ||
| CONTRIBUTING.md | ||
| crowdin.yml | ||
| deploy.sh | ||
| docker-compose.yml | ||
| Dockerfile | ||
| ecosystem.config.js | ||
| eslint.config.js | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| renovate.json | ||
| SECURITY.md | ||
| server-icon.png | ||
| tsconfig.json | ||
Fluxy
Fluxy is a Fluxer moderation and server-management bot written in TypeScript.
Moderation - ban, kick, warn, timeout, and the usual suspects
Automod - anti-link, anti-spam, anti-raid, ghost ping detection
Admin & utility - tickets, reaction roles, verification, logging, lockdown
Optional - REST API + dashboard backend
Just want the bot?
Use the hosted version. You get updates and infrastructure without doing anything at all!
→ Invite Fluxy to your server
→ Community & support: fluxer.gg/fluxy
The rest of this README is for self-hosters and contributors etc.
Self-hosting
Requirements
- Node.js
>=22 - pnpm
- MongoDB
Quick start
# 1. Install
pnpm install
# 2. Copy and fill in the env file
cp .env.example .env
# 3. Dev
pnpm run dev
# 4. Or build + run prod
pnpm run build && pnpm start
The two env vars you actually need to set are TOKEN and MONGO_URI. Everything else has a default or is optional.
Environment variables
Full list is in .env.example. The ones you'll actually touch:
| Variable | Required | Default | Description |
|---|---|---|---|
TOKEN |
✅ | - | Bot token |
MONGO_URI |
✅ | - | MongoDB connection string |
PREFIX |
! |
Default command prefix | |
OWNER_ID |
- | Your user ID for owner-only commands | |
API_ENABLED |
false |
Enable the API/dashboard backend | |
API_PORT |
4000 |
Port for the API | |
API_ADMIN_TOKEN |
- | Privileged API access token - make it strong | |
FLUXER_OAUTH_CLIENT_ID |
- | OAuth client ID | |
FLUXER_OAUTH_CLIENT_SECRET |
- | OAuth client secret | |
FLUXER_OAUTH_REDIRECT_URI |
- | OAuth redirect URI | |
DASHBOARD_URL |
- | Dashboard origin for CORS | |
BOT_INTERNAL_BIND |
127.0.0.1 |
Internal API bind (0.0.0.0 in k8s) |
|
GATEWAY_SESSION_PATH |
cwd | Gateway session file | |
GLITCHTIP_DSN |
- | Optional error reporting |
Scripts
| Command | What it does |
|---|---|
pnpm run dev |
Watch mode |
pnpm run build |
Compile TS → build/ |
pnpm start |
Run compiled bot |
pnpm test |
Run tests |
pnpm run test:watch |
Watch tests |
pnpm run test:coverage |
Coverage report |
pnpm run lint |
ESLint |
pnpm run i18n:check |
Validate locale JSON files (keys + placeholders vs en.json) |
Localization
Strings live under src/locales/: en.json is the source; other files are named by locale (for example de.json, zh-CN.json). The bot loads every *.json in that folder at runtime; pnpm run build copies them into build/locales/ for production.
Crowdin: Fluxy on Crowdin — translations are synced from this repo via crowdin.yml (source src/locales/en.json, translations src/locales/%locale%.json).
Deployment
Fluxy runs fine standalone or under PM2. There are pm2:* scripts in package.json for that. Don't commit your .env, and if you're enabling the API, set a strong API_ADMIN_TOKEN.
Uptime alerts: the dashboard only shows status when you open it. docs/MONITORING.md.
Docker Compose
cp .env.docker.example .env
docker compose up -d --build
Bot + web + mongo. Port 4000. docker-compose.yml.
Kubernetes
k8s/base/ — mongo, bot, web, ingress.
cp k8s/base/secret.example.yaml k8s/base/secret.yaml
kubectl apply -f k8s/base/secret.yaml
kubectl apply -k k8s/base/
Image: git.fluxy.gay/dog/fluxy:latest. docs/K8S.md, docs/FLUXERHOST.md.
k8s/docker: BOT_INTERNAL_BIND=0.0.0.0, GATEWAY_SESSION_PATH=/data/.gateway-session.json.
Contributing
PRs and issues are welcome. See CONTRIBUTING.md.
License
Licensed under AGPL-3.0 — see LICENSE.
Self-host and modify freely. If you run a modified version as a network service, you need to offer users the corresponding source. Need different terms? See COMMERCIAL.md.