Skip to main content

Installing IHP

IHP uses the Nix package manager to manage all dependencies of your application. This guide will walk you through installing Nix, IHP, and setting up your development environment.
The first time you set up IHP, installation might take 10-15 minutes. Subsequent projects will be much faster as packages are cached.

Prerequisites

1

Install Nix Package Manager

IHP uses the Nix package manager to manage dependencies like PostgreSQL and the Haskell compiler.We recommend using the Determinate Nix Installer:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
Determinate Nix comes with Flakes and lazy-trees enabled by default, so no additional configuration is needed.
Nix is the equivalent of npm for JavaScript, but for Haskell and much more. It manages all your application dependencies in development and production.
2

Install IHP

Once Nix is installed, you can install IHP:
nix profile install nixpkgs#ihp-new
This installs the ihp-new command which you’ll use to create new IHP projects.
3

Install direnv

IHP uses direnv to automatically load environment variables from .env files:
nix profile install nixpkgs#direnv
Next, enable direnv in your shell by following the instructions from the direnv website.
If you’re using VS Code, make sure to install the direnv extension. Without it, your editor won’t have access to the development environment.
4

Set Up Your Editor

Configure your editor for the best IHP development experience:
Required Extensions:
  • direnv extension (essential for environment loading)
  • Haskell extension (for syntax highlighting and language support)
See VS Code setup guide

What Is Nix?

While the installation is running, take a look at “What Is Nix” by Shopify to understand how Nix works. Nix ensures that:
  • All dependencies are available in development and production
  • Your development environment is reproducible
  • Team members have identical setups
  • PostgreSQL and other services are automatically managed

Troubleshooting

If you encounter any errors during installation: If you don’t already use cachix, you may be prompted to install it during your first project setup. While not required, cachix is highly recommended as it dramatically reduces build times by providing pre-built binaries. Learn more about cachix at cachix.org.

Next Steps

Quick Start

Create your first IHP application

Your First Project

Follow the complete tutorial to build a blog

Build docs developers (and LLMs) love