Documentation
Startup and console
Change the startup command manually in Pterodactyl and use the console to start and troubleshoot the bot.
Change it in Pterodactyl
Startup is changed in the Pterodactyl server. The documentation page does not change it for you.
Change the startup command
- 1Open the server in Pterodactyl.
- 2Open the Startup tab.
- 3Find the main-file value or startup-command field provided by the server egg.
- 4Set it to the command or file used by your project.
- 5Save the value when the panel shows a save action.
- 6Open Console and press Restart.
- 7Read the first console lines and confirm that the correct file starts.
Common commands
| Project | Example |
|---|---|
| Node.js main file | node index.js |
| Node.js package script | npm start |
| Python main file | python3 main.py |
| Python alternative | python app.py |
Good to know
Use the command that matches the files in your project. Do not copy an example when your main file has a different name.
Install packages
| Runtime | Files and command |
|---|---|
| Node.js | Keep package.json in the server root. Use npm install when dependencies were not installed automatically. |
| Python | Keep requirements.txt in the server root. Use pip install -r requirements.txt when needed. |
Read the console
| Console text | What to check |
|---|---|
| Cannot find module / package | The dependency is missing or package files are in the wrong folder. |
| No such file or directory | The startup file name or folder is wrong. |
| Invalid token / unauthorized | The Discord token is wrong, expired, or was reset. |
| Process exited with code 1 | Read the error lines above it for the actual code problem. |
| Out of memory / killed | The bot may need a RAM upgrade or lower memory use. |
| Server stays online but bot is offline | Check the token, intents, event code, and that the correct process started. |
After a change
- Restart after changing code, dependencies, startup values, or environment values.
- Use Stop before replacing many files.
- Use Kill only when the process will not stop normally.
- Keep the console open during the first start after an update.