Skip to main content
Version: v1.9

Installation Guide

You can run Hangar by using the Hangar Docker Image inside the container or install Hangar binary into your system.

Hangar Docker Image

  • Run Hangar with docker:

    # Docker
    docker pull cnrancher/hangar:latest

    docker run -it -v $(pwd):/hangar cnrancher/hangar:latest
  • Run Hangar with podman:

    # Podman
    podman pull docker.io/cnrancher/hangar:latest

    podman run -it -v $(pwd):/hangar cnrancher/hangar:latest

For more information about Hangar Docker Image, see Hangar Docker Image page.

Install to system

Download the compiled binary

Starting from v1.8.7,you can download the compiled binary file from Hangar GitHub Release page.

wget https://github.com/cnrancher/hangar/releases/download/v1.9.0/hangar_Linux_x86_64.tar.gz
tar zxvf ./hangar_Linux_x86_64.tar.gz
cp hangar_Linux_x86_64/hangar /usr/local/bin/

Arch Linux

You can obtain the PKGBUILD to build and install the latest Hangar binary file from the Arch Linux AUR repository.

  • Install hangar by using the yay AUR helper:

    # Build and install from the latest stable release tag.
    yay hangar

    # Build and install from the latest upstream main git branch.
    yay hangar-git
  • Or you can add the Open Build Service repository to install prebuilt hangar package.

    1. Add custom repository in /etc/pacman.conf:
      /etc/pacman.conf
      [home_StarryWang_Arch]
      SigLevel = Never
      Server = https://download.opensuse.org/repositories/home:/StarryWang/Arch/$arch
    2. Install hangar:
      sudo pacman -Sy
      sudo pacman -S hangar

openSUSE

Hangar is available on Open Build Service.

# openSUSE Tumbleweed
sudo zypper ar https://download.opensuse.org/repositories/home:StarryWang/openSUSE_Tumbleweed/home:StarryWang.repo
sudo zypper ref
sudo zypper in hangar

Building from Source

See Build Hangar to build and install Hangar on your system manually.