Setting up a Java based bot with our Discord Bot Hosting plan is incredibly simple, and we'll walk you through those steps in this guide!

Requirements
Our bot hosting service is incredibly flexible, however you'll need to be aware of the following in order to ensure your bot is able to run:

- Your bot must not require a version of Java higher than 11 - we support Java 8 and 11, and we'll walk you through how to switch that later in this guide.
- Your bot must be runnable via a java -jar YourBot.jar command (the name of the jar file can be anything you like of course), and must not require any extra arguments to be present.

Uploading your bot's files

For this part, you'll need to make sure you have all of the files that your bot requires. Most Java based bots will actually contain their necessary files in their jar file - however be sure to check your bot's documentation to see if any other files need to be uploaded.

To start uploading your files, head over to the File Manager link on the left sidebar of your panel. From there, you may see a few default files, which is fine.

You can either drag your bot's jar file (and any other extra files) directly from your computer to the File Manager, and it will begin uploading the files - or you can use the Upload -> File button at the top left hand corner of the File Manager.

Select the File Manager on the left sidebar to bring up your service's files
You can drag and drop any necessary bot files from your computer, straight to the File Manager!
Setting up the Java config

As our final steps for setting up your bot, you will want to click the pebble-java-config.json file in the File Manager - this is where you will specify your bot's file name, as well as set the Java version you'd like to use.

The pebble-java-config.json file
By default, you'll see "main":null" - we'll replace null with TestBot.jar or the actual name of your bot's file. While you're here, if you need to use Java 11 you can set the "java_version" to 11 (only Java 8 and 11 are supported at this time). Don't forget to save the file once you're done!

Starting your bot up

Now that we've done this, head back to the main page and click the Console link on the left sidebar. Then, press Start to launch your bot!

Press the Start button to give your bot a try!
Feel free to leave the console page once you're all set. If you run into any issues getting your bot started, please feel free to reach out to our support team so that we may provide assistance with this. You can reach our support team by either opening a ticket on our website or our Discord.
Was this article helpful?
Cancel
Thank you!