Report this

What is the reason for this report?

Can I deploy a Go Application + MySQL database into a single droplet ?

Posted on April 24, 2020
Dicky Wijaya

By Dicky Wijaya

Hello, I'm Brown

Hi guys.

I’m new to deployment of a server and digital ocean. I want to create an API Server that use go language and also want to create a database server using MySQL.

My question is :

  1. Can I deploy a Go Application + MySQL database into a single droplet ? Or must I use DigitalOcean Managed MySQL Database for the database ?
  2. What did I need to deploy a go API to digital ocean ? Is I only need to upload my binary go file to deploy it ? Or also need docker or something else like that ?

Thankyou.



This textbox defaults to using Markdown to format your 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.

Hello @dickywijayaa,

You can follow the steps here on how to deploy a Go Web application with Nginx:

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-go-web-application-using-nginx-on-ubuntu-18-04

By using Nginx, you will then be able to secure your web application by adding an SSL certificate, you can take a look at this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04

Regarding your MySQL question, you can install MySQL directly on your Droplet, I would recommend enabling backups for your Droplet so that if anything goes wrong, you would be able to restore to an older backup.

Hope that this helps! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.