Here are lots of ways to install hledger - choose one that suits your needs. Binary packages install quickly; building from source is slower but ensures the latest release.

You might need some C libraries or a UTF-8 locale. To finish, check your PATH and test your installation. And please report any trouble so we can make this process smoother.

The current hledger release is 1.23. (Release notes)

Binary packages


Linux, Mac, Windows
docker pull dastapov/hledger
Linux, Mac, WSL
brew install hledger
Linux, Mac
nix-env -f -iA hledger_1_22_2 hledger-ui_1_22_2 hledger-web_1_22_2
Binaries may not yet be fully cached for your platform, try with --dry-run to estimate how much building will be required. On Linux, note #1030, #1033.
Linux, Mac, *BSD, ...
Install Wine and use the Windows binary below


choco install hledger -y
CI binaries


CI binaries


CI binaries
CI binaries
sudo layman -a haskell && sudo emerge hledger hledger-ui hledger-web
pacman -Sy hledger hledger-ui hledger-web
Void Linux x86_64
xbps-install -S hledger hledger-ui hledger-web
sudo dnf install hledger
sudo apt install hledger hledger-ui hledger-web
sudo apt install hledger hledger-ui hledger-web


freebsd ports
pkg install hs-hledger hs-hledger-ui hs-hledger-web


pkg_add hledger

Raspberry Pi

CI binaries
Contributed binaries
Contributed third party binaries, not audited



C libraries

On some unix platforms, certain C library packages (like terminfo) must be installed to prevent errors (like "cannot find -ltinfo") when building hledger.

So before building hledger on one of the following platforms, please run the command shown (and send improvements for this list):

Debian, Ubuntu:
sudo apt install libtinfo-dev libtinfo5
Fedora, RHEL:
sudo dnf install gmp-devel ncurses-devel

UTF-8 locale

On unix systems, when building or running hledger (and GHC haskell programs in general), the LANG environment variable must be set to a UTF-8-aware locale, or you'll see errors (eg: "invalid byte sequence" or "mkTextEncoding: invalid argument") when processing non-ascii text. Check that LANG's value mentions UTF-8, and if not, change it:

$ echo $LANG
$ export LANG=C.UTF-8    # or en_US.UTF-8, fr_FR.utf8, etc.
$ echo $LANG

In some cases the locale may need to be installed with your system package manager first. See hledger: Troubleshooting for more help.

Building from source

Release source

The hledger-install script requires only bash (and sometimes make, and gcc, and ...?). It builds the current release of the hledger tools and some add-ons, in a relatively reliable way:

curl -sO
less # <- good practice: inspect downloaded scripts before running

This uses the stack or cabal build tools (installing stack in ~/.local/bin if needed), and installs the hledger tools in ~/.local/bin or ~/.cabal/bin.

Or, if you prefer to run stack yourself:

stack update
stack install --resolver=lts-18 hledger-lib-1.23 hledger-1.23 hledger-ui-1.23 hledger-web-1.23 --silent

This installs the main hledger tools in ~/.local/bin. Your stack --version should be not too ancient; use a recent release (2.5.1+) for best results. You can usually upgrade stack quickly with stack upgrade. Windows users: the 64-bit version of stack is preferable; and you should omit hledger-ui from this command, unless you are in WSL.

Or, if you prefer to run cabal yourself:

cabal update
cabal install alex happy
cabal install hledger-1.23 hledger-ui-1.23 hledger-web-1.23

This installs the main hledger tools in ~/.cabal/bin. Your cabal --version should be not too ancient; use a recent release (eg 3.2+) for best results. Windows users: omit hledger-ui from this command, unless you are in WSL.

Or, nix users can use nix-env to build hledger from source (but we try to provide a nix command that installs already-cached binaries.)

Build tips

Building the development version

Latest source

If you want the very latest improvements, our master branch on github is suitable for daily use. Get the source with git:

git clone
cd hledger

and build and install executables to ~/.local/bin with stack:

stack update
stack install

or to ~/.cabal/bin with cabal:

cabal update
cabal install alex happy
cabal install all:exes

hledger development builds show a ".99" suffix in their --version output, so eg "1.17.99" means the in-development version of 1.18.

Building the development version with Docker

You can also build the development version in a Docker container which will take care of pulling all the necessary tools and dependencies:

git clone
cd hledger/docker

This will build the image tagged hledger with just the latest binaries inside. If you want to keep all the build artifacts and use the resulting image for hledger development, run ./ instead.

Check your PATH

After building/installing, you may see a message about where the executables were installed. Eg:

  • with stack: $HOME/.local/bin (on Windows, %APPDATA%\local\bin)
  • with cabal: $HOME/.cabal/bin (on Windows, %APPDATA%\cabal\bin)
  • with nix: $HOME/.nix-profile/bin

Make sure that this install directory is included in your shell's $PATH (preferably near the start, to preempt any old hledger binaries you might have lying around), so that you can run the hledger tools easily. How to configure this depends on your platform and shell. If you are using bash, this will show it:

echo $PATH

and here's a way to add the stack and cabal install dirs permanently:

echo "export PATH=~/.local/bin:~/.cabal/bin:$PATH" >> ~/.bashrc
source ~/.bashrc

Here's how to set environment variables on Windows.

Test your installation

After a successful installation, you should be able to run the hledger tools and see the expected versions (the ones you just installed, and not any older versions that may exist somewhere else in your PATH). Eg:

$ hledger --version
hledger 1.23-0-g47b5b6be0, mac-x86_64
$ hledger-ui --version
hledger-ui 1.23-0-g47b5b6be0, mac-x86_64
$ hledger web --version
hledger-web 1.23-0-g47b5b6be0, mac-x86_64

And you could see the unit tests pass (just for fun):

$ hledger test
All 221 tests passed (0.05s)

Or if you have checked out the hledger source, also the functional tests:

$ make functest
Total 793 ...
functest PASSED

Nicely done! Now check the Quick Start for next steps, or come to the #hledger chat where we'll gladly share tips or receive your feedback.