How to upload your own Node.js or Python bot

Move an existing bot to FreeBot: upload the code, set the start file and add your secrets.

Pick the right start

Create a bot from Empty Node.js bot or Empty Python bot. You get a starting file and a list of packages that you can replace with your own code.

Upload your code

  1. Pack your project into a .zip file, without node_modules, .venv or __pycache__.
  2. Open Files, click Upload and choose the zip.
  3. Click the zip and choose Extract. Delete the zip afterwards to save space.

You can also connect with an SFTP app such as FileZilla. The login is in the SFTP tab.

Tell FreeBot how to start it

  • Node.js: list your packages in package.json. The start file is index.js unless you set another one in Settings.
  • Python: list your packages in requirements.txt. The start file is main.py unless you set another one in Settings.
  • Packages install by themselves at every start.

Secrets

Put tokens and API keys into Settings, Variables, not into files. Your code reads them as environment variables.

If it does not start

  • Start file not found: set the correct file in Settings, for example src/bot.js or bot/main.py.
  • Module not found: add the package to package.json or requirements.txt and restart.
  • The bot stops after a while: look at the last lines of the logs. Memory limits show as a sudden stop; a larger plan helps.

Ready to build?

Run your bot for free. No card needed.

Create my free bot

More guides