Updated 30 October 2026
With a Discord bot hosting plan, your bot runs 24/7, even when your PC is off. This guide works for Node.js (discord.js) and Python (discord.py).
1. Store your token safely
Your bot token is a password. Never put it in a public GitHub repository. Create a .env file on the server containing:
DISCORD_TOKEN=your-token-here
Read it in your code with process.env.DISCORD_TOKEN (Node.js, using the dotenv package) or os.getenv("DISCORD_TOKEN") (Python, using python-dotenv).
2. Upload your code
- Upload files: in SparkPanel, go to Files and upload your files (or use SFTP).
- From Git: want your bot to pull its code from a (private) Git repository? Email us the link and we'll set it up. Then set Auto Update to 1 under Settings: every restart pulls the latest version automatically.
3. Set the startup file
Under Settings, check which file is started:
- Node.js:
index.jsby default. Packages frompackage.jsonare installed automatically on start. - Python:
app.pyby default. Packages fromrequirements.txtare installed automatically.
If your file has a different name, change it there.
4. Start
Click Start in SparkPanel. The console shows your bot's output, including any error messages.