To host a Fluxer bot 24/7 you run it on a machine that stays on: a Linux server with a systemd service that starts it again when it stops, or a bot plan on PlayNHost (from US$1.99 a month), where the panel installs your packages, gives your code the token and starts the bot again if it crashes. In our test, a minimal fluxer.js 3.3.0 bot used 38 MB of memory on Node.js 22, against a test copy of Fluxer, so the smallest plan is enough for a small bot. A Fluxer bot only connects out to Fluxer's gateway: it needs no open port and no web address. The steps on PlayNHost:
- On Fluxer bot hosting, click Create Server on a plan. In the order window, answer What is your bot for? with Another platform and pick Node.js (or Python).
- In Fluxer, open User settings, then Applications under Developer. Create an application and copy the bot token from Secrets & tokens. Fluxer shows it once; if you lose it, regenerate it there.
- Still on the application, use the OAuth2 URL builder: choose the bot scope and the Bot permissions your bot needs, click Copy authorization URL, open the link and pick your community. You need Manage community in that community to add a bot.
- Open your server in the panel, then the Bot page, pane Environment. Under Add a variable, set Name to
FLUXER_BOT_TOKENand Value to your token, check that Keep this value secret is ticked (the panel ticks it for a name ending in TOKEN), and click Add variable. Your code reads it asprocess.env.FLUXER_BOT_TOKEN(oros.environ["FLUXER_BOT_TOKEN"]in Python). - Upload your
package.jsonandindex.jsin Files, withoutnode_modules, or connect a Git repository on the Bot page, pane Code. - On the Bot page, pane Code, check that Entry file is the file that starts your bot (
index.jsby default). - Press Start and open Console. npm installs fluxer.js on the first start, then you see
[PlayNHost] Starting your botand your bot's own line, such asLogged in as your-bot. Send!pingin a channel the bot can see.
No code yet? Make your first Fluxer bot with fluxer.js has a small bot to copy. If you ordered the plan for Discord, switch it on the Bot page, pane Discord, under What is this bot for?: choose Another platform. The Discord token field is for Discord tokens only.
What we measured
We ran a minimal bot (log in, answer !ping) with each library on our own bot runtimes, in a container with the STARTER plan's 512 MB of memory and one full CPU (STARTER has 75% of one), against a test copy of Fluxer's gateway and API on our node. That copy follows Fluxer's published gateway documentation; it is not the live Fluxer service, and we used no real account or token.
| fluxer.js 3.3.0 (Node.js 22) | fluxer.py 0.4.2 (Python 3.12) | |
|---|---|---|
| First start, packages included | 7 s | 8 s |
| Start after a stop | 1 s | 2 s |
| Memory after 60 s | 38 MB | 36 MB |
| Files on the server | 14 MB | 27 MB |
| Gateway drops the session | reconnects and answers again | reconnects and answers again |
| Wrong token | one try, then exits | one try, then exits |
The token never appeared in the console or in any file on the server: the bot reads it from its environment.
Requirements
- Node.js 22.13 or newer for fluxer.js (its
package.jsonsays so). Our Node.js runtime starts on Node.js 22 by default; Node.js 20 is too old. - Memory: 0.5 GB is plenty for a bot like the one above. Choose 1 GB or more for a large cache, images or files, or several bots in one process.
- Python: fluxer.py worked in our test, but it has had no release since 30 March 2026. For a new bot, fluxer.js is the maintained library.
When the bot does not answer
A wrong or reset token makes Fluxer close the connection with code 4004. fluxer.js then stops with:
_FluxerError: Gateway authentication failed (4004). Check the bot token.
and fluxer.py prints Fatal close code 4004 (AUTHENTICATION_FAILED), not reconnecting. Both stop after one try, which is what you want: Fluxer's documentation says repeated authentication failures can get an IP address banned. On PlayNHost a bot that stops by itself is started again once; if it stops again within a minute, it is left stopped, so a wrong token does not loop. Replace the value of FLUXER_BOT_TOKEN on the Environment pane (Replace), then start the bot again. Regenerating a token in Fluxer ends the sessions of the old one at once.
If the bot is online but silent, check that it can see the channel: Fluxer only sends a bot the messages of channels its roles let it view. Commands must be plain messages such as !ping: Fluxer has no slash commands for bots yet (planned for 2026).
On your own Linux server instead
Any machine with Node.js 22.13 or newer works. Keep the token in a file only your bot's user can read, and let systemd restart the bot:
[Unit]
Description=Fluxer bot
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=600
StartLimitBurst=5
[Service]
User=fluxerbot
WorkingDirectory=/opt/fluxer-bot
EnvironmentFile=/opt/fluxer-bot/.env
ExecStart=/usr/bin/node index.js
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Put FLUXER_BOT_TOKEN=your-token in /opt/fluxer-bot/.env, save the unit as /etc/systemd/system/fluxer-bot.service, then run sudo systemctl daemon-reload and sudo systemctl enable --now fluxer-bot. RestartSec=10 waits between restarts, and StartLimitBurst=5 with StartLimitIntervalSec=600 makes systemd give up after five failed starts in ten minutes, so a bot with a wrong token does not keep logging in. Fix the token, then run sudo systemctl reset-failed fluxer-bot and sudo systemctl restart fluxer-bot. What it costs in each case: Fluxer bot hosting options compared.
PlayNHost is not affiliated with Fluxer or Fluxer Platform AB.
