Skip to main content

🔐 .env File Reference

All sensitive values live in .env. This file is listed in .gitignore and should never be committed to version control.

Creating the file

Copy the example and fill in your values:

cp .env.example .env

Or let the setup wizard generate it for you:

npm run setup

Required variables

FLUXER_BOT_TOKEN

Your bot's authentication token.

FLUXER_BOT_TOKEN=your.bot.token.here

How to get it:

  1. Go to Fluxer → User Settings → Applications
  2. Select your bot application
  3. Go to the Bot tab → Reset Token → Copy
Keep this secret

Anyone with your bot token has full control of your bot. Never share it, log it, or commit it to git.


GUILD_ID

The ID of the Fluxer server (guild) the bot will operate in.

GUILD_ID=123456789012345678

How to get it: Enable Developer Mode, then right-click your server name → Copy ID.


PANEL_CHANNEL_ID

The ID of the channel where the ticket selection panel will be posted.

PANEL_CHANNEL_ID=987654321098765432

How to get it: Right-click the panel channel → Copy ID.

tip

This should be a channel like #open-a-ticket that regular members can read but not write to.


Optional variables

ARCHIVE_LOG_USER_ID

A user ID that receives a DM copy of every ticket transcript when a ticket is closed.

ARCHIVE_LOG_USER_ID=111222333444555666

Leave blank (or remove the line) to disable this feature.


NODE_ENV

NODE_ENV=production  # or: development

Setting this to development enables extra debug logging and prints configuration details at startup.


LOG_LEVEL

LOG_LEVEL=info  # options: error | warn | info | debug

Controls how verbose the console output is. debug is very noisy but useful when diagnosing issues.


TICKET_COOLDOWN_SECONDS

TICKET_COOLDOWN_SECONDS=60

How many seconds a user must wait between opening tickets. Default is 60.


FLUXER_API_BASE_URL

FLUXER_API_BASE_URL=https://api.fluxer.app/v1

Only change this if you are running against a custom Fluxer API instance.


ERROR_WEBHOOK_URL

ERROR_WEBHOOK_URL=https://...

An optional webhook URL to send error notifications to. Leave blank to disable.


ENABLE_HEALTH_CHECK

ENABLE_HEALTH_CHECK=true
HEALTH_CHECK_PORT=3000

Starts a simple HTTP server on the given port that returns 200 OK. Useful for uptime monitoring.


Complete example

# Required
FLUXER_BOT_TOKEN=your.bot.token.here
GUILD_ID=123456789012345678
PANEL_CHANNEL_ID=987654321098765432

# Optional
ARCHIVE_LOG_USER_ID=111222333444555666
NODE_ENV=production
LOG_LEVEL=info
TICKET_COOLDOWN_SECONDS=60