Quickstart

Deploy your first app on Hangar, from a Git repository to a public URL with HTTPS, in a few minutes.

Updated

Hangar is a deployment platform: you connect a repository, Hangar builds it into a container, runs it in the region you pick and gives it a public address with HTTPS. There are no servers to set up and nothing to install.

This page takes you from an empty account to a running app.

What you need

  • A Hangar account. Create one if you have not yet.
  • An app in a Git repository on GitHub, GitLab, Bitbucket or Gitea, or a prebuilt Docker image.

1. Create a project

A project groups everything one product needs: its services, its databases and its environments. Create one from the dashboard and give it a name.

Every project starts with a production environment. You can add others, such as staging, later; each keeps its own services and variables.

2. Add a service from your repository

Inside the project, add a service and choose where the code comes from:

  • GitHub, GitLab, Bitbucket or Gitea, by connecting your account once and picking the repository and branch.
  • Any public Git URL, with nothing to connect.
  • A Docker image, if you already build one elsewhere.

Pick the region the service runs in. Choose the one closest to your users.

3. Deploy

Start the first deploy. Hangar clones the repository and builds it. With the default Automatic builder the language and framework are detected for you; if your repository has a Dockerfile you can tell Hangar to build that instead. See Builds for the details.

You can follow the build log live. When it finishes, the service is running.

4. Give it an address

Open the service's Settings → Networking and add a domain:

  • Generate a regional domain to get a working address right away, or
  • Enter your own hostname and point your DNS at Hangar.

Set the container port to the port your app listens on, and turn HTTPS on to have the certificate issued and renewed for you. Domains and HTTPS covers both paths.

5. Push to deploy again

From here on, every push to the branch you connected triggers a new deploy. Each deploy is listed with its log, and you can roll back to an earlier one if a release goes wrong.

Next steps

Deploy your app on Hangar

Connect a repository and it is live in minutes.

Start deploying