🤖 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).
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:| Variable | What 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 packages | Extra packages installed on start, separated by spaces. Not needed if they are already in package.json or requirements.txt. |
| Git repository address and Git branch | To install the bot from GitHub (step 3). |
| Git username and Git access token | Only for private repositories. |
| Update on startup | If the bot came from GitHub, it pulls the latest changes from the repository on every start. |
📤 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.
🔗 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
.gitfolder).
🔑 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,readyworks 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.