Your Python app runs on our hosting panel (Pterodactyl). It suits Discord bots, scripts and small web apps.
-
Upload your project
Open the Files tab and upload your project: your
.pyfiles and arequirements.txtlisting the libraries it needs. -
Set the main file
Open the Startup tab and set the main file to the one that starts your app, for example
main.py. -
Add your secrets
Put tokens and keys in a
.envfile or in the environment variables offered in Startup. Never write them into your code. -
Start the app
Press Start. Libraries from
requirements.txtare installed on start, so the first start takes longer. Watch the Console for errors.
Web apps and APIs
If your app listens for HTTP, use the port assigned to your server (shown in the panel). Pterodactyl also exposes it as the SERVER_PORT environment variable:
import os
port = int(os.environ.get("SERVER_PORT", 8000))Updating
Upload the changed files, then press Restart. If you added libraries, add them to requirements.txt so they install on the next start.