Installing Nuclei
Nuclei is two installs, not one: the engine (a single program) and the template collection (the fourteen thousand checks). The engine is useless without checks to run, and the collection is inert text without the engine. Fortunately the engine fetches the collection itself the first time it runs, so the whole installation is: get the program, run it once, let it stock the shelves.
The engine
The way verified for this guide is the release
archive from the project's GitHub releases
page. Nuclei is written in Go and ships as one
static binary per platform — Linux (amd64 and
arm64), macOS, and Windows archives are all
published with each release. Download the
archive for your platform, unpack it, and put
the nuclei binary somewhere on your path.
The lab used the Linux amd64 archive of
v3.11.1 (about 46 MB zipped).
Check: the binary introduces itself and names its two working directories:
$ nuclei -version
[INF] Nuclei Engine Version: v3.11.1
[INF] Nuclei Config Directory: ~/.config/nuclei
[INF] Nuclei Cache Directory: ~/.cache/nuclei
(Your paths will spell out your own home directory; the shape is what matters.)
Two other routes exist and are documented
here rather than verified — the build machine
has no Go toolchain and no Docker, so neither
was run for this guide. With Go installed,
go install
github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
builds the same binary from source. A Docker
image (projectdiscovery/nuclei) wraps it for
people who would rather not install anything.
Whichever route you take, nuclei -version
above is the test that it worked.
The template collection
Run any scan — even the trivial one in the next chapter — and a first run notices the collection is missing and installs it before doing anything else. The lab watched it happen; the run reported, in order, that the templates were not installed and were installing, and then:
[INF] Current nuclei version: v3.11.1 (latest)
[INF] Current nuclei-templates version: v10.5.1 (latest)
[INF] New templates added in latest release: 68
The collection lands in ~/nuclei-templates
— a plain folder of YAML files in your home
directory, organised by what the templates
speak: http/ (the overwhelming majority,
11,718 of the 14,104 files when the lab
counted), then dns/, network/, ssl/,
headless/, workflows/, and several younger
families (cloud/, code/, file/, dast/,
javascript/). It is worth knowing it is just
a folder: you can browse it, grep it, and read
any template in it with ordinary tools, which
is exactly what chapter 4 does. Nothing about
it is a database or a service.
Check: ask the engine what collection it sees:
$ nuclei -tv
[INF] Public nuclei-templates version: v10.5.1 (~/nuclei-templates)
Three honest footnotes to the install, all observed in the lab:
- The first run needs the network. The
collection is a download from GitHub, and
until it lands, scans print an error about a
missing
.nuclei-ignorefile (a small exclusion list the install creates; chapter 6 explains what it excludes). The error is cosmetic and disappears once the collection is installed. -ducis this guide's quieting flag. Left alone, nuclei checks for newer engine and template versions when it runs. The lab added-duc(disable update check) to its scans so that output was reproducible, and the chapters quote output gathered that way; version lines then say(unknown)where a normal run would say(latest). Chapter 10 covers updating deliberately.- Your own templates can live elsewhere.
The engine warns, harmlessly, when you point
it at templates outside
~/nuclei-templates, and runs them anyway. The lab kept its own templates in a separate folder throughout — which is also the right shape for a reader: the collection is the vendor's shelf, and your templates are yours.
Platform differences, briefly: the engine and collection are identical in behaviour on Linux, macOS, and Windows; what differs is where the config and cache directories sit (under the usual per-user locations for each system) and how you fetched the binary. Every command in this guide was run on Linux.