How do I set environment variables for my bot?
Environment variables are the correct way to store secrets like your bot token, API keys, and database credentials. Never put them directly in your code files.
In the panel, open the Startup page for your server. The "Variables" section lists all configurable startup variables. Add your variable name (e.g. TOKEN) and its value. The panel injects these as environment variables when the server starts.
In your code, read them using process.env.TOKEN (Node.js) or os.environ["TOKEN"] (Python). The variable is available as soon as the process starts.
To add a new variable that is not listed, contact support, because some egg configurations allow arbitrary variables, others are fixed. If your egg supports it, a "Add variable" button will appear on the Startup page.
Want to try this on a real server?
Everything described here is available on the trial too, on the same hardware and the same panel as the paid plans. Try it free for 24-hour, no credit card required.
Didn't fix it? Ask in Discord.
Ask in our Discord - we help with hosting questions whether or not you host with us.