Documentation
Files and SFTP
Upload a Discord bot project with the Pterodactyl file manager or an SFTP client.
Upload with the file manager
- 1Open the server in Pterodactyl.
- 2Open Files.
- 3Upload the project files into the server root unless the project requires another folder.
- 4For a large project, upload a ZIP archive, open its menu, and extract it.
- 5Make sure the main file is in the expected location.
- 6Remove extra outer folders created by ZIP tools. The server root should contain files such as package.json or requirements.txt when the project needs them.
Important project files
| Runtime | Common files |
|---|---|
| Node.js | package.json, package-lock.json, index.js or bot.js, source folders, .env when used |
| Python | requirements.txt, main.py or bot.py, package folders, .env when used |
| Static website | index.html, CSS, JavaScript, images |
| PHP website | PHP files and the public folder when the startup command uses it |
Use SFTP for many or large files
- 1Open the Pterodactyl server.
- 2Open the Settings page and find the SFTP connection details.
- 3Install an SFTP client such as FileZilla or WinSCP.
- 4Enter the shown server address and port.
- 5Use your Pterodactyl username and password.
- 6Connect and upload the files to the server directory.
- 7Return to the panel file manager and check that the files arrived.
Keep secrets private
Use SFTP, not plain FTP. Never send your panel password, bot token, client secret, or SFTP password to another person.
Environment values and tokens
- Store the Discord bot token in an environment variable or protected .env file when your project supports it.
- Do not upload a token to a public repository.
- If a token appears in logs, screenshots, or shared files, reset it in the Discord Developer Portal.
- After editing environment values, restart the server.