Skip to content

Guide · Open source

How to use nuclei: install, run scans and write templates

Updated · written with AI from the project's own documentation and checked against our catalogue data

Nuclei is an open-source command-line vulnerability scanner that runs checks written as YAML templates against websites, APIs, servers, DNS and cloud configurations. This guide shows you how to install it, find the flags you need, run scans against systems you are authorized to test, and start thinking about custom templates. It assumes you are comfortable with basic security concepts and the terminal.

Nucleiprojectdiscovery/nuclei · ★ 32.5k · MIT

Quick start

  1. 1Check prerequisites. Confirm you have Go 1.27.3 or newer installed on your machine.
  2. 2Install nuclei. Run the go install command from the README to install the nuclei CLI.
  3. 3Show the help. Run nuclei -h to see every available flag and its purpose.
  4. 4Pick a target you are authorized to test. Choose a system you own or have permission to assess.
  5. 5Run a scan. Pass the target with -u for one host, or -l for a file of targets.
  6. 6Review findings and refine. Read the results, check them against the target, and adjust your scope or templates.

What nuclei is and who it is for

Nuclei looks for security weaknesses by running small YAML templates that the community shares and maintains. Because the checks are templates rather than compiled code, new known vulnerabilities can be checked quickly once a template exists.

It is primarily built as a standalone CLI tool. It suits security engineers running community checks against their own systems, teams adding scanning to CI/CD pipelines for regression testing, penetration testers who want a scriptable scanner, and developers who want to write their own checks for internal issues.

  • Not a point-and-click application: it is driven from the command line.
  • Not meant to run as an always-on service, because the README warns that doing so may pose security risks.
  • Reading findings and writing templates assumes familiarity with vulnerabilities.

Install nuclei with Go

Nuclei requires Go 1.27.3 or newer to install. Run the install command from the project README to fetch and build the tool. The README points to the official installation guide for other install options.

After installation, confirm the tool runs by displaying its help output.

go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest nuclei -h

Understand the main command line flags

Running nuclei -h lists every flag, grouped by category. The target group controls what gets scanned: -u sets target URLs or hosts, and -l reads a file with one target per line. The exclude option -eh removes hosts from the input list.

Target-format flags such as -im set the input mode, which can be list, burp, jsonl, yaml, openapi, swagger or http. Check the full flag list for template selection and output options before building a scan.

  • -u: target URLs or hosts to scan
  • -l: path to a file containing targets, one per line
  • -eh: hosts to exclude from the input list (IP, CIDR or hostname)
  • -im: mode of the input file (default list)
  • -sa: scan all IPs associated with a DNS record
nuclei -h

Run your first scan on a single target

Start with one system you own or are authorized to test. Pass its address with -u. Nuclei then runs the templates it has against that target and reports what it finds.

For several systems, put one target per line in a file and pass it with -l. Only scan targets you have permission to test.

  • Use -u for one target and -l for a list.
  • Keep the target list to systems you are authorized to assess.
nuclei -u https://example.com nuclei -l targets.txt

Scan with your own custom template

Templates are YAML files, so you can write checks for internal issues and run them the same way as community templates. The nuclei documentation and the project's foundational YouTube series cover how to write a first template.

Custom templates are useful when a check is specific to your own applications. Test any new template against a system you control before relying on it.

  • Templates describe the request, the matching conditions and the result in YAML.
  • The README lists support for protocols including TCP, DNS, HTTP, SSL, WHOIS, JavaScript and Code.

Use nuclei in CI/CD pipelines

Teams add nuclei to CI/CD pipelines to catch known issues on each build and to run regression tests. Running it in a pipeline means the same checks run automatically instead of relying on someone remembering to scan.

Because nuclei is a command-line tool, it can be called from any pipeline step that runs a shell command. Keep the pipeline running against test or staging systems you control.

What people use it for

  • Checking your own web applications and APIs for known vulnerabilities.
  • Adding vulnerability scanning and regression tests to a CI/CD pipeline.
  • Scripting repeat scans as part of a penetration test.
  • Writing YAML checks for issues specific to your internal systems.
  • Scanning DNS and cloud configuration for weaknesses in systems you manage.

Frequently asked questions

Is nuclei free to use?

Nuclei is open source and released under the MIT licence, according to the project README. The README also mentions a separate Pro and Enterprise cloud service, which is a commercial offering built on top of the open-source tool.

What do I need to install nuclei?

You need Go 1.27.3 or newer. The README gives go install as the install method, and the official installation guide has further details.

How do I run nuclei against a single site?

Use the -u flag followed by the target URL or host. For example, nuclei -u https://example.com. Only scan systems you own or are authorized to test.

Can I run nuclei as a service?

The README warns that running nuclei as a service may pose security risks and recommends caution and additional security measures. It is primarily designed as a standalone CLI tool.

What are good alternatives to nuclei?

The project's comparison list names OWASP ZAP, Nikto and Nmap. These tools cover overlapping areas, so the right choice depends on whether you want a template-based scanner, a web application scanner or a network scanner.

Do I need security experience to use nuclei?

Yes, it helps. Reading findings and writing templates assumes familiarity with vulnerabilities, so people without a security background may find it hard to interpret results.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Nuclei suits security engineers, penetration testers and developers who are comfortable with the command line and want scriptable, community-maintained vulnerability checks. It is a poor fit for anyone who needs a graphical interface, an always-on scanning service, or who has no security background to interpret results.

Install options & downloads