deploy spring boot jar fie


I am considering opting $5 plan with digitalOcean.

I would like to know the following.

  • I have a spring boot generated jar file (jdk 1.7). How easy is it to deploy this jar in the host space?
  • my app uses mysql. How can I create a mysql db in digitalOcean and set my app to connect to this db?

thanks Balaji


DigitalOcean offer a VPS, so it’s essentially like your own server, where you can install one of the allowed operating systems (CentOS, Ubuntu, FreeBSD, among other). You have to setup everything yourself, that being Java runtime, MySQL server and whatever else you wish to use. And you have to maintain and update everything.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can definitely host a Java app on a DigitalOcean. Make sure you follow the initial server setup tutorial after creating your Droplet.

See this tutorial on how to install MySQL. Once you’ve done that, you will want to create a MySQL user for your app. The hostname for the MySQL server will be localhost as it is running on the same server.

To run your app, install Java. You can transfer your .jar file using FileZilla or any other SFTP client. The login details will be the ones you created in the initial server setup tutorial. Run the jar using this command: java -jar file_name.jar.

To keep your app running after closing the SSH session, one option would be using the program screen.