Open Startup in the panel. Changes save by themselves a moment after you stop typing, and apply the next time the bot starts.
What happens when the bot starts
The startup command at the top of the page is snow-run. It does these things in order, and prints a line starting with [SnowServers] for each one:
- Git. If Git repository is set, clone it into an empty server, or pull new commits. Git deploy.
- Starter bot. If the server is empty and no repository is set, add a small starter bot (Python and JavaScript; Java has none).
- Packages. Install from
requirements.txtorpackage.json, only when that file (or the language version) changed since the last start. - Run. Work out which file starts your bot and run it.
- If it stops by itself, print a hint for the usual errors, and send a crash alert if you set one up.
Bot token
Paste your token here, not into your code. Your program receives it as an environment variable called BOT_TOKEN:
# Python
import os
TOKEN = os.environ["BOT_TOKEN"]
// JavaScript
const token = process.env.BOT_TOKEN;
Reset the token in the Discord Developer Portal? Paste the new one here and restart.
Bot file
Leave it empty and the file is found for you. The console's Starting: line says what it picked.
- Python:
bot.py,main.py,app.py,run.py,index.py,src/main.py,src/bot.py,__main__.py, in that order. If none of those exist and there is exactly one.pyfile in the top folder that is not a helper such asconfig.pyorsetup.py, that one. - JavaScript: the
startscript inpackage.json, then itsmainfile, thenindex.js,bot.js,main.js,app.js,src/index.jsand a few more. - Java: the only
.jarin the top folder, or else inbuild/libs(Gradle) ortarget(Maven), preferring one ending in-all,-with-dependencies,-shadedor-fat.
Set it yourself when that guess is wrong. It accepts:
- a file, in the top folder or a subfolder:
main.py,src/bot.py,dist/index.js,build/libs/bot-all.jar, - a Python package run as a module:
-m mybot, - a script from
package.json:npm startornpm run prod.
Language and version
The Docker Image box picks both: Python 3.10 to 3.14, Node.js 20, 22 or 24, or Java 17, 21 or 25. New servers start on whatever you chose at checkout (Python 3.12, Node.js 22 or Java 21 unless you changed it).
You can switch language here too. Restart after switching. The first start on a new version reinstalls your packages, so it takes a little longer.
Git repository, branch and updates
- Git repository: a link to your repository on GitHub, GitLab, Codeberg or Bitbucket.
- Git branch: leave empty for the repository's default branch.
- Update from Git on start: on by default. Every start pulls your newest commits.
- Git access token: only for private repositories.
The details, including what happens to files you edited here: Git deploy.
Crash alert webhook
A Discord webhook link. If your bot stops on its own, a message goes there with the reason and its last output. Setting it up.
Other secrets
There is one box on this page for the bot token. For anything else (an OpenAI key, a database password), use a .env file:
- Create a file called
.envin the top folder with New File:OPENAI_API_KEY=sk-... DATABASE_URL=postgresql://... - Load it when your bot starts. Python: add
python-dotenvtorequirements.txt, thenfrom dotenv import load_dotenv; load_dotenv(). JavaScript: adddotenvtopackage.json, thenrequire("dotenv").config().
A .env file is never overwritten by Git deploy. Two cautions: files are included in backups, so a .env is in every backup you download, and it must never be committed to a public repository.
Environment variables you get for free
SERVER_MEMORY: your plan's memory in MB, for example1024.TZ: the server clock's time zone,Europe/Berlin. If your bot schedules things, work in UTC in your code.HOME:/home/container, the top folder.
Something here wrong or out of date? Tell us and it gets fixed.