Installing Nextflow
Nextflow is the workflow management system that runs all nf-core pipelines. This page will walk you through installing and configuring Nextflow on your system.
You will need the following to get started:
- Bash version 3.2 or later
- Java version 17 or later (up to Java 25)
Install Nextflow
Nextflow is distributed as an easy to use self-installing package. It is also distributed via Conda and as a standalone distribution.
The self-installing package is recommended as it ensures you always get the latest version and handles dependencies automatically.
Self-installing package
To install Nextflow with the self-installing package:
-
Download and install Nextflow:
curl -s https://get.nextflow.io | bash -
Make the binary executable:
chmod +x nextflow -
Move Nextflow to a directory in your
$PATH:mkdir -p $HOME/.local/bin/ mv nextflow $HOME/.local/bin/NoteCommon directories for executables include
$HOME/.local/bin/,/usr/local/bin/, or$HOME/bin/. Make sure the directory you choose is in your$PATHenvironment variable. -
Verify the installation:
nextflow info
Conda installation
To install Nextflow with Conda:
-
Create an environment with Nextflow:
conda create --name nf-env bioconda::nextflow -
Activate the environment:
source activate nf-env -
Confirm Nextflow is installed correctly:
nextflow infoactivate nf-env
The Conda installation method is not recommended as it may install outdated versions and cause dependency conflicts. Use the self-installing package method when possible.
Standalone distribution
For offline or restricted environments, you can download a pre-built executable from the Nextflow GitHub releases.
To use the standalone distribution:
-
Download the standalone distribution from Assets section of the GitHub releases page.
-
Grant execution permissions to the downloaded file. For example:
chmod +x nextflow-25.10.0-dist -
Use it as a drop-in replacement for nextflow command. For example:
./nextflow-25.10.0-dist run info
Replace 25.10.0 with your desired version number.
Install Java
The easiest way to install it is using SDKMAN:
To install Java with SDKMAN:
-
Install SDKMAN:
curl -s https://get.sdkman.io | bash -
Open a new terminal.
-
Install Java:
sdk install java 17.0.10-tem -
Confirm that Java is installed correctly:
java -version
Update Nextflow
To use the latest Nextflow features or run specific versions of pipelines, you may need to update or pin your version of Nextflow.
Update to the latest stable version
To update Nextflow to the latest stable release, run:
nextflow self-updateUpdate to the latest edge version
To update to the latest edge release, run:
NXF_EDGE=1 nextflow self-updateTo update to the latest stable release, run:
NXF_EDGE=0 nextflow self-updatePin a specific version
To pin a specific Nextflow version:
-
For a single command, prefix the Nextflow command with the
NXF_VERvariable:NXF_VER=23.10.0 nextflow run nf-core/rnaseq -
For your current terminal session, export the
NXF_VERvariable:export NXF_VER=23.10.0 -
For persistent usage, add the export
NXF_VERvariable command to~/.bashrcor~/.zshrc:export NXF_VER=23.10.0
Pinning a specific Nextflow version can help ensure reproducibility across different runs and environments.
Troubleshooting
Java version issues
Problem: Error about incompatible Java version
Solution: Ensure you have Java 17 or later installed. Check your version with java -version and install a compatible version using SDKMAN (see Install Java).
Permission denied errors
Problem: Cannot execute Nextflow after installation
Solution: Make sure the Nextflow executable has execution permissions:
chmod +x /path/to/nextflowUpdate failures
Problem: nextflow self-update fails
Solution: The update can fail if Nextflow is installed in a directory with restricted permissions. Either:
- Request elevated permissions to update in the current location
- Reinstall Nextflow in a directory where you have write permissions
Command not found
Problem: nextflow: command not found
Solution: Ensure Nextflow is in a directory included in your $PATH. Add the directory to your PATH by adding this line to ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"Then reload your shell configuration:
source ~/.bashrc # or source ~/.zshrcConda installation issues
Problem: Outdated Nextflow version or dependency conflicts with Conda
Solution: Uninstall the Conda version and use the self-installing package method instead:
conda deactivate
conda remove --name nf-env --all
curl -s https://get.nextflow.io | bashChecking for migration requirements
Problem: Pipeline fails after updating Nextflow
Solution: When updating across major stable releases, consult the Nextflow migration guides and changelog for breaking changes that may affect your pipelines.
Additional resources
For more information about installing Nextflow, see: