Deploy on Hangar button

Add a button to your README that lets anyone deploy your repository on Hangar in one click.

Updated

The Deploy on Hangar button turns a public repository into a one-click deploy. Whoever clicks it lands on a page that names the repository, lets them pick a region and starts the deploy in their own account.

It suits open source projects, templates and example apps.

The button is a link to /deploy with the repository's address:

https://tryhangar.io/deploy?repo=https://github.com/owner/name
ParameterRequiredMeaning
repoYesThe public https URL of the repository
branchNoThe branch to deploy. Defaults to main

The repository must be public and reachable over plain https. Links that carry credentials, another protocol or a query string are refused.

Add it to a README

[![Deploy on Hangar](https://tryhangar.io/deploy-on-hangar.svg)](https://tryhangar.io/deploy?repo=https://github.com/owner/name)

Replace owner/name with your repository.

What happens on click

  1. The visitor sees the repository and signs in or creates an account. They come straight back to the deploy afterwards.
  2. They choose a name, a branch and a region.
  3. Hangar creates a project with one service, builds the repository with the automatic builder and deploys it.

The deploy runs in the visitor's account and counts against their plan, not yours.

Make your repository deploy cleanly

  • Keep the app at the root of the repository, or ship a Dockerfile.
  • Read configuration from environment variables and document the ones that are required.
  • Listen on 0.0.0.0.

Deploy your app on Hangar

Connect a repository and it is live in minutes.

Start deploying