ZentexNodeZentexNode
Tutorial

How to host your Node.js or Python bot on ZentexGame

Upload your Discord bot (or any Node.js or Python app) over SFTP or from GitHub: the Startup variables, your token and what to do if it won't start.

By Tech Team··4 min read
How to host your Node.js or Python bot on ZentexGame

🤖 What you need

To keep your bot online 24/7 you need a server on the Node.js / Python plan: when you order it you choose Node.js or Python, and you manage it from ZentexGame, the same panel as our game servers. It works for Discord bots, APIs, scrapers or any app that has to stay running. You will also need:
  • Your bot's code, with its main file: index.js in Node.js or app.py in Python (or whatever name you use).
  • Its list of dependencies: package.json in Node.js or requirements.txt in Python. The server installs them on every start.
  • Your bot token, from the Discord developer portal. Treat it like a password: don't leave it in the code or in a public repository (step 4).
A brand-new server doesn't have your code yet. If you start it before uploading anything, it stops right away with an error like Cannot find module '/home/container/index.js' in Node.js or can't open file '/home/container/app.py' in Python. That's normal: as soon as you upload your files, it starts.

⚙️ 1. The Startup variables

Open your server in ZentexGame and go to Startup. These are the ones that matter:
VariableWhat it does
Main file (Node.js)The file your bot starts from; index.js by default. If it ends in .ts, it runs as TypeScript.
Main .py file (Python)app.py by default.
Requirements file (Python)requirements.txt by default. It is installed on every start.
Additional Node packages / Additional Python packagesExtra packages installed on start, separated by spaces. Not needed if they are already in package.json or requirements.txt.
Git repository address and Git branchTo install the bot from GitHub (step 3).
Git username and Git access tokenOnly for private repositories.
Update on startupIf the bot came from GitHub, it pulls the latest changes from the repository on every start.
On the same tab, Docker Image shows the version and lets you change it: Node.js 22, 24 or 26, or Python 3.7 to 3.12.

📤 2. Option A: upload your code

This is the most direct way:
  • Over SFTP, with FileZilla or WinSCP: the easiest if there are many files. Here is how to connect over SFTP.
  • Or from Files in the panel, uploading them from your browser.
Upload the contents of your project folder to the server's main folder, the one that opens when you go to Files. The main file has to sit right there, not inside another folder. Don't upload node_modules or your Python virtual environment: dependencies are installed automatically on start. Then press Start.

🔗 3. Option B: install it from GitHub

If your bot lives in a repository:
  • In Startup, enter the URL in Git repository address (for example, https://github.com/user/my-bot) and, if you don't use the default branch, its name in Git branch.
  • Go to Settings and press Reinstall Server. The repository is only downloaded when you reinstall: saving the variable isn't enough.
  • The download needs an empty folder. If you had already uploaded files by hand, delete them before reinstalling; otherwise the installation leaves them as they are and downloads nothing.
  • With Update on startup turned on, every start pulls the latest changes from the repository. It only works if the bot came from GitHub (if there is a .git folder).
Private repository: put your GitHub username in Git username and, in Git access token, a personal access token with read-only access to that repository's contents (on GitHub: Settings → Developer settings → Personal access tokens). Don't use your password. Note: anyone with access to Startup can see that token, as we explain in our subusers guide.

🔑 4. Keep the token out of your code

Store the token in a .env file (or a config.json) that you do not push to the repository (add it to .gitignore), and upload it separately over SFTP or from Files. Your bot reads it on start, for example with the dotenv package in Node.js or python-dotenv in Python. If you install from GitHub, upload the .env after reinstalling, because the download needs an empty folder.

▶️ 5. Start it and check

  • Press Start and watch the Console: you'll see the dependencies being installed and your bot's messages.
  • The panel marks the server as Running when the console shows a line containing Estoy listo! (in Node.js, ready works too). If your bot doesn't print it, it still works, but the panel keeps showing it as Starting.
  • If it stops, the last error in the console tells you why: a main file with a different name, a missing dependency or an invalid token.
  • After changing the code or the variables, press Restart.
If you get stuck, open a ticket on our Discord and we'll go through it with you.
Node.js / Python

Looking for somewhere to host your bot?

Node.js and Python hosting for Discord bots, APIs and scrapers, online 24/7, with automatic setup, our own control panel and no contract.

See plans from €1.00/mo →