You don’t just build an app for yourself—you build them so people can use them. Whether it’s an open-source tool, a side project, or just something fun, the whole point of putting it out there is so others can try it, play with it, and maybe even improve on it.
But here’s the problem: a lot of good projects never get used because setting them up is too much work.
People land on your GitHub repo, think, “Oh, this looks cool,” but then they see a list of setup steps—clone this, install that, configure this—and they move on.
Adding a one-click deploy button fixes that. It lets people go from zero to one instantly—from reading about your app to actually running it in minutes. And it’s not just about making your life easier; it’s about making sure what you’ve built gets used.
One of the easiest ways to do this is DigitalOcean’s One-Click Deploy button, which works for any app that can be deployed in the cloud—whether it’s a Flask API, a Next.js web app, a Ruby on Rails project, a Go service, a Node.js backend, or even a static site built with Hugo, Gatsby, or Jekyll. If your app runs on a server or a CDN, you can make it deployable in one click.
> Want to see it in action? Here’s a Flask app repo with the One-Click Deploy button embedded in the README. You can hit the button to immediately deploy the app to your DigitalOcean account. 👉 GitHub Repo: do-one-click-deploy-flask
Turning any GitHub repository into a One-Click Deployable App on DigitalOcean is surprisingly simple. You just need three things:
Let’s go through a real example using a Flask app to show exactly how this works.
To make this guide a bit more real and fun, let’s take a simple Flask app that fetches a joke from a public API (like the Chuck Norris API) and returns it as JSON.
Here’s our simple app.py
:
What this app does:
/
, it calls the Chuck Norris joke API.Now, let’s say you want to make it super easy for others to deploy and test this app.
Instead of making people clone, install dependencies, and set up Python locally, you want them to click a button and instantly deploy it to DigitalOcean.
Here’s how you do it.
Create a new file called wsgi.py
in your project directory:
This helps DigitalOcean know how to start your app when deploying.
requirements.txt
FileYou need to list all dependencies so DigitalOcean knows what to install.
Create a requirements.txt
file:
This ensures your Flask app and requests
library are installed in the deployment environment.
Now, we create a deployment template that tells DigitalOcean how to build and run the app.
.do
DirectoryRun this command in your terminal:
deploy.template.yaml
FileInside .do
, create a file called deploy.template.yaml
and add:
Note: 👉 Just make sure to replace your-username
and your-repo-name
with your actual GitHub repo details.
This file tells DigitalOcean:
pip install -r requirements.txt
)gunicorn wsgi:app
)8080
)/
)apps-s-1vcpu-0.5gb
, which is the $5/month plan). You can see all available instance sizes and their pricing in DigitalOcean’s App Platform pricing guide.1
)Note: This file might look a little unfamiliar if you haven’t seen one before, but it’s really just a version of DigitalOcean’s regular app spec file. The main difference is that for the One-Click Deploy button to work, everything needs to go under a top-level spec:
key in deploy.template.yaml
file. If you’re curious about what else you can include—like databases, static sites, alerts, or environment variables, check out DigitalOcean’s Reference for App Specification.
Now for the best part—the deploy button!
Adding this to your README.md lets anyone visiting your GitHub repo instantly launch your app on DigitalOcean:
Note: Replace your-username
and your-repo-name
with your actual GitHub repo details.
Commit and push your changes:
And that’s it! 🎉
Want to earn DigitalOcean credits when people deploy your app? You can add your referral code to your deploy link!
refcode=your-code
).Note: Replace your-username
and your-repo-name
with your actual GitHub repo details.
Now, whenever someone deploys your app using your button, they sign up through your referral link, and you earn credits toward your DigitalOcean usage.
Easy for them, free hosting for you. Win-win!
Most people won’t set something up if it takes too much effort. Not because they don’t care, but because they have other things to do.
That’s where DigitalOcean’s One-Click Deploy button comes in. Instead of making people follow a bunch of setup steps, they can just click a button and try your app right away.
If your project runs in the cloud—whether it’s Flask, Node.js, Rails, Django, Go, or even a static site—you can make it deployable in one click.
So save everyone some time, including yourself. Add a One-Click Deploy button, and make it easy for people to try your app.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
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!