There are two ways to get files onto a server: the file manager in your bot dashboard, or any SFTP client. Both write to the same folder the template starts from.
The file manager
- Open the server in your bot dashboard and go to its files.
- Upload your files. For a project with many files, zip it on your own computer, upload the zip, and unzip it in the file manager. The panel checks the unzipped size against your plan before it writes.
- Put the entry file where Main file points (Jar file on JDA).
- Restart from your bot dashboard so the new code runs.
Leave out node_modules, virtualenv folders, and build caches. Dependencies install on start.
SFTP
Any SFTP client works, for example FileZilla, WinSCP, or the sftp command. Use the SFTP address, port, and username the Files tab shows for your server.
# use the address, port, and username from your bot dashboard
$ sftp -P PORT USERNAME@ADDRESS
$ put -r my-bot
$ get -r my-botThe SFTP password is not the bot token. Never paste the token into an SFTP client.
SFTP is the easiest way to pull a full copy of the server down before you change plans, or before a free server's deadline.
Backups
> **Keep a separate copy of important data**
> A deleted free server can't be restored. Keep your code in git or a local folder. If the bot writes data files, such as a SQLite database, download them now and then.
Backups are available: manual on Free, daily and manual on paid plans. When available, plan limits are Free 1 manual slot; paid daily and manual slots: Starter 1, Pro 2, and Plus 3. Storage is separate from your bot disk allowance.
Git deploy
The first restart with Auto update enabled sets up the repository. To switch an existing server to git, set the repository and branch variables and restart. The first deploy preserves colliding files in a pre-git-backup folder. Keep a separate copy of important data.
With Auto update set to 1, every start resets tracked files to the repository's branch, so make code changes in the repository, not on the server. Files git doesn't track are left alone. For the first deploy, follow getting started.
Still stuck? Contact support