Before touching chi, you need to master Go and net/http, understand the concepts of HTTP and REST, and have a basic knowledge of databases and Git. In this episode you will also set up the Go toolchain, install chi v5, and verify your first installation.

Welcome to the Learn Chi series! This series takes you from zero to mastery of chi — a lightweight, idiomatic, and composable router and middleware for Go, built directly on top of net/http. There are 23 episodes in total, arranged across six phases, from conceptual foundations to production readiness.
But before writing a single route, there are some basic skills and software you must have. Why are these pre-requisites important? Because chi is not a framework full of magical abstractions. Chi is net/http with a router and middleware added on top — all your knowledge of handlers, ServeMux, and http.Server still applies in full.
Episode 0 is your roadmap: making sure your basic skills are in place, setting up the Go toolchain, installing chi v5, and doing the first verification. Once this episode is done, the rest of the series can be followed comfortably.
chi is built on the standard library, so you should be comfortable with the latest stable Go version. Make sure these concepts are familiar: go.mod and the module system, interfaces, structs, error handling, goroutines, as well as http.Handler and http.Server. For this series we target Go 1.24 and above.
go versionThe output should show go1.24 or newer. If not, download it from go.dev and add it to your PATH.
You don't need to master everything deeply. Just understand the general flow — the details of each topic will be explained in their respective episodes.
Prepare an editor with the Go extension — VS Code with the official Go extension is the most comfortable choice. For testing endpoints, install curl or an API client like Bruno and Postman.
curl --versionStart with a project directory and a Go module:
mkdir chi-service
cd chi-service
go mod init github.com/username/chi-serviceOnce the module is created, install chi version 5 — the major line the entire ecosystem is currently using:
go get github.com/go-chi/chi/v5@latestThe go get github.com/go-chi/chi/v5@latest command pulls the latest version into go.mod. Now verify the installed version:
go list -m github.com/go-chi/chi/v5The output shows github.com/go-chi/chi/v5 v5.3.1 or the latest stable version. go list -m github.com/go-chi/chi/v5 is always the source of truth for the version actually used in go.sum.
Info
Make sure your import uses the /v5 path. Version 5 is the latest major line; an import without /v5 refers to version 4, which is outdated and will not receive the latest security fixes.
For episode 9, set up a local PostgreSQL. The easiest way is Docker:
docker run --name chi-pg -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:17If you don't have Docker, a PostgreSQL installed directly from your operating system also works fine. This database is only actually needed starting from episode 9, so you can prepare it later.
Before moving on to episode 1, make sure everything is installed correctly:
go version
curl --version
go list -m github.com/go-chi/chi/v5If all three commands run without errors, your environment is ready. Final step: make sure the module builds.
go build ./...go build ./... ensures all dependencies are documented in go.sum and that no module is broken. If there are no errors, the whole series can begin.
A recap of the pre-requisites you set up in episode 0:
net/http, interfaces, structs, and modules.go list -m.If anything is missing, stop and complete it before continuing. A solid foundation will make the next 22 episodes feel much lighter.
Key takeaways:
net/http with a router and middleware added on top, not a new framework.http.Handler concept.go get github.com/go-chi/chi/v5@latest.go list -m.In the next episode 1 we will discuss the history, background, and why you need chi — from chi's birth in 2015 by Peter Kieltyka, its evolution from goji to v5.3.x, to the routing and middleware problems it solves. Make sure your environment is ready, because the Learn Chi journey has only just begun!