Guide
Host your own Flyconomy
Run the Flyconomy bot on a computer you control. Your server's data stays with you, there's no subscription to pay, and nobody can switch it off but you. You don't need to know how to code: you'll copy and paste a few commands.
What you'll need
- A Discord server you manage. You need permission to add bots to it.
- A computer to run the bot on. The bot only works while that computer is on, so for everyday use pick one that stays on: a spare PC or home server running Linux, or a small cloud server. To try it out first, your Windows PC is fine.
- Some free software. Git on either kind of computer. On Linux, Docker Engine 24 or later. On Windows, Python 3.13 or later.
Step 1: Create the bot in Discord
Every Discord bot starts as an "application" on Discord's developer site. This gives your copy of Flyconomy its own name, its own login and permission to join your server. You only do this once.
- Go to the Discord developer portal, sign in, and click New Application.
- Open the Bot tab, click Reset Token, and copy the token somewhere safe. Discord only shows it once.
- On the same tab, under Privileged Gateway Intents, turn on Message Content Intent and Server Members Intent, then click Save Changes.
- Open OAuth2 › URL Generator. Under Scopes, tick
botandapplications.commands. Under Bot Permissions, tick Send Messages, Embed Links and Read Message History. - Open the link it generates and invite the bot to your server.
Keep the token secret. It works like a password: anyone who has it controls your bot. If it ever leaks, click Reset Token again and the old one stops working.
Step 2: Start the bot on Linux
This is the setup for everyday use. The bot runs in Docker, which keeps it in its own sealed box and restarts it automatically if it crashes or the computer reboots. On Windows? Skip to the Windows steps.
-
Open a terminal on the Linux computer and download the bot:
git clone https://github.com/FlyxHub/Flyconomy-Bot.git cd Flyconomy-Bot -
Run the setup script. It adds Docker's Compose add-on if it's missing, creates a settings file called
.env, and makes it readable only by you../scripts/deploy.sh -
Open the settings file, paste your token after the
=sign, and save:nano .envFLYCONOMY_DISCORD_TOKEN=your-token-hereIn nano, press Ctrl+O then Enter to save, and Ctrl+X to close. Leave the other settings as they are.
-
Run the script again to start the bot with your token:
./scripts/deploy.sh -
Watch the log until it says
Connected as …, then press Ctrl+C. The bot keeps running.docker compose logs -f
Slash commands can take up to an hour to show up in Discord the first time. Prefix commands
like $balance work straight away.
Or: try it on Windows
Good for a test run. The bot stops when you close the window or turn the PC off.
-
Open PowerShell and download the bot:
git clone https://github.com/FlyxHub/Flyconomy-Bot.git cd Flyconomy-Bot -
Run the setup script. It installs what the bot needs into its own folder and creates the
.envsettings file..\scripts\setup.ps1 -
Open
.envin Notepad and paste your token after the=sign:FLYCONOMY_DISCORD_TOKEN=your-token-here -
So slash commands appear straight away, add your server's ID on the
FLYCONOMY_DEV_GUILD_IDline. To copy it, turn on Developer Mode in Discord under Settings › Advanced, then right-click your server and choose Copy Server ID. -
Start the bot. It's ready when it says
Connected as …. Press Ctrl+C to stop it..\scripts\run.ps1
Step 3: Check it works
In your Discord server, type /balance. If the bot replies with your balance,
you're running your own Flyconomy.
Keeping it running
On Linux, run these from the Flyconomy-Bot folder.
| To do this | Run |
|---|---|
| See what the bot is doing | docker compose logs -f |
| Restart it | docker compose restart |
| Stop it | docker compose down |
| Update to the latest version | git pull && ./scripts/deploy.sh |
Back up regularly. Everyone's balances live in one database file. This saves a dated copy of it in the current folder:
docker compose exec bot sh -c 'cat /data/bot.db' > "backup-$(date +%F).db"
Keep backups on a different computer or drive. The full guide explains how to restore one.
Optional: the web dashboard
Flyconomy can also serve a web page with live charts, leaderboards and a casino, where members sign in with Discord. It's off by default. The dashboard guide shows how to turn it on.
Keep it on your home network. The dashboard doesn't encrypt its traffic yet, so don't make it reachable from the internet unless you put HTTPS in front of it first.
If something goes wrong
Slash commands don't show up
The first sync can take up to an hour. If they still don't appear, invite the bot again
using a link with the applications.commands scope (step 1.4), then type
$sync in your server.
The bot stops with "Discord refused the privileged intents"
Turn on Message Content Intent and Server Members Intent on the Bot tab of the developer portal (step 1.3), then start the bot again.
The bot stops with "Configuration is invalid"
The message names the setting that's wrong. Usually the token in .env is
missing or was pasted with extra spaces.
$ commands are ignored but slash commands work
Message Content Intent is off. Turn it on in the developer portal.
PowerShell won't run the scripts
Windows blocks downloaded scripts by default. Allow them for this window only, then run the script again:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Anything else is covered in the full troubleshooting list.
Next steps
- Make it yours. The settings list covers the command prefix, timezone, bet limits, the lottery and more.
- Learn the commands. The command list explains everything members can do.
- Want something simpler? Flyxbot is a smaller moderation and games bot with its own setup guide.