Using modules
New in version 26.04.0.
The Nextflow module system allows you to discover, install, and manage reusable modules from centralized registries. This page describes how to use registry modules in your pipelines. For information about modules syntax, see Modules.
Discovering modules
Search for available modules using the module search command:
$ nextflow module search alignment
$ nextflow module search "quality control" -limit 10
Results include module names and descriptions.
Use -output json for machine-readable output.
See search [options] [query] for the full command reference.
Installing modules
Use the module install command to download modules from a registry into your project:
$ nextflow module install nf-core/fastqc
$ nextflow module install nf-core/fastqc -version 0.0.0-0c7146d
Note
Modules mirrored from nf-core do not follow standard semantic versioning.
Instead, they use the format 0.0.0-<hash>, where the suffix is a short portion of the nf-core module’s commit hash.
Nextflow stores installed modules in the modules/ directory and creates a .module-info file alongside the module to record installation metadata such as the module checksum and registry URL.
Once installed, include a module by name rather than a relative path:
include { FASTQC } from 'nf-core/fastqc'
workflow {
reads = Channel.fromFilePairs('data/*_{1,2}.fastq.gz')
FASTQC(reads)
}
Tip
Commit the modules/ directory to your Git repository to ensure reproducibility.
See install [options] [namespace/name] for the full command reference.
Listing installed modules
View all modules installed in your project with the module list command:
$ nextflow module list
The output shows each module’s name, installed version, and whether it has been modified locally.
Use -output json for machine-readable output.
See list [options] for the full command reference.
Viewing module information
Use the module info command to view metadata and a usage template for a module:
$ nextflow module info nf-core/fastqc
$ nextflow module info nf-core/fastqc -version 0.0.0-0c7146d
The output includes the module’s version, URL, description, authors, maintainers, keywords, tools, input/output channels, and a generated usage template.
Use -output json for machine-readable output.
See info [options] [namespace/name] for the full command reference.
Running modules directly
For ad-hoc tasks or testing, run a module directly without creating a wrapper workflow:
$ nextflow module run nf-core/fastqc --meta.id=test_sample --reads sample1_R1.fastq.gz
Tip
Run nextflow module info to see the available inputs for a module.
The command automatically downloads the module if it is not already installed.
It accepts all standard Nextflow run options (-profile, -resume, etc.):
$ nextflow module run nf-core/fastqc \
--meta.id=test_sample \
--reads sample1_R1.fastq.gz \
-profile docker \
-resume
See run [options] [namespace/name] [--<input_name> <input-value>] for the full command reference.
Updating modules
To update a module to a newer version, reinstall it with the desired version:
$ nextflow module install nf-core/fastqc -version 0.0.0-c9h0bv4
If you have local modifications, Nextflow warns you and prevents the update.
Use the -force flag to override:
$ nextflow module install nf-core/fastqc -version 0.0.0-c9h0bv4 -force
Checksum verification
Nextflow automatically verifies module integrity using checksums stored in the .module-info file.
When you modify a module locally, Nextflow detects the change and prevents accidental overwrites during reinstallation.
Module integrity ensures that modules remain consistent with their registry versions unless you explicitly choose to override them.
Removing modules
Use the module remove command to uninstall a module from your project:
$ nextflow module remove nf-core/fastqc
By default, Nextflow removes both the module files and the .module-info file.
Use flags to control this behavior:
-keep-files: Remove the.module-infofile but keep the module files in themodules/directory.-force: Force removal even if the module has no.module-infofile or has local modifications.
See remove [options] [namespace/name] for the full command reference.