Install Nextflow with Conda for Reproducible Pipelines (Apple Silicon)
Install Nextflow 26.04.6 in an isolated conda env on Apple Silicon macOS with bioconda channels, a native arm64 JDK, and a working hello-world smoke test.
Nextflow is a workflow manager for building and running reproducible, data-driven pipelines. If you have ever run an nf-core workflow for RNA-seq, variant calling, or single-cell analysis, Nextflow was the engine underneath. It is a JVM application driven by a Groovy-based DSL, so the same pipeline runs the same way on Linux and macOS.
Because Nextflow needs a Java runtime, the usual beginner trap is fighting with whatever Java your Mac happens to have (or does not have). We sidestep all of that by installing Nextflow into its own isolated conda environment. Conda pulls a compatible Java for us, pins it inside the env, and keeps it separate from your system. The exact runtime your pipelines need lives in the env — that is the whole point of this series.
Prerequisites
You need a working conda first. If you have not set that up yet, follow the companion guide: Install Miniconda on Apple Silicon. Everything below was run on an Apple Silicon Mac (arm64), macOS 26.5.2, with conda 25.5.1 and the libmamba solver.
TL;DR copy-paste install
If you just want the commands, here they are. The rest of the article explains each line.
conda create -n bu-nextflow --override-channels -c conda-forge -c bioconda nextflow=26.04.6
conda activate bu-nextflow
nextflow -versionStep by step
1. Create one isolated env for Nextflow
We make a fresh environment named bu-nextflow that contains nothing but Nextflow and its dependencies.
conda create -n bu-nextflow --override-channels -c conda-forge -c bioconda nextflow=26.04.6Two flags are doing important work here:
--override-channels -c conda-forge -c biocondatells conda to use only the conda-forge and bioconda channels. This deliberately avoids the Anacondadefaultschannel, which is now behind a Terms-of-Service gate that can stop the solve with an error. Skippingdefaultsavoids that entirely.nextflow=26.04.6pins the exact version, so this env is reproducible. bioconda sometimes lags behind Nextflow's own releases, so pinning keeps your builds predictable.
Here is the real solve and install from the test machine, trimmed:
Channels:
- conda-forge
- bioconda
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done
The following packages will be downloaded:
package | build
---------------------------|-----------------
coreutils-9.5 | h93a5062_0 1.4 MB conda-forge
nextflow-26.04.6 | h2a3209d_0 36.1 MB bioconda
openjdk-23.0.2 | hfb9339a_2 174.9 MB conda-forge
------------------------------------------------------------
Total: 212.4 MB
The following NEW packages will be INSTALLED:
# ... (c-ares and other transitive deps omitted)
ca-certificates conda-forge/noarch::ca-certificates-2026.6.17-hbd8a1cb_0
coreutils conda-forge/osx-arm64::coreutils-9.5-h93a5062_0
curl conda-forge/osx-arm64::curl-8.21.0-h1359186_2
# ... (icu, krb5, libcurl, libcxx, ncurses, and other shared libs omitted)
nextflow bioconda/noarch::nextflow-26.04.6-h2a3209d_0
openjdk conda-forge/osx-arm64::openjdk-23.0.2-hfb9339a_2
openssl conda-forge/osx-arm64::openssl-3.6.3-hd24854e_0
# ... (zstd omitted)
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
real 30.70
Notice what conda did for you: you asked for nextflow, and it also pulled openjdk-23.0.2, curl, and ca-certificates. The openjdk is the Java runtime Nextflow runs on, and the ca-certificates let Nextflow pull pipelines over HTTPS later. The whole solve finished in about 31 seconds and downloaded 212.4 MB. Once unpacked, the environment measures about 477 MB on disk (measured with du -sh; because conda hardlinks shared packages, the incremental cost of an extra env is usually less) — the JDK is the heavy part.
2. Activate the env
conda activate bu-nextflowFrom now on, nextflow and its bundled java are on your PATH only while this env is active. That isolation is exactly what makes the install reproducible.
Apple Silicon note
Good news for M1–M5 users: this is a fully native arm64 install, no Rosetta required. Nextflow is distributed on bioconda as a noarch package — it is a pure JVM launcher with no compiled, architecture-specific binary, so the same build runs natively on osx-arm64. Its one heavy dependency, openjdk, has a native osx-arm64 build on conda-forge (notice openjdk-23.0.2 came from conda-forge/osx-arm64 above). So unlike some bioinformatics tools, Nextflow needs no CONDA_SUBDIR=osx-64 fallback.
One caveat for later: Nextflow itself is native ARM, but individual pipeline tools a workflow calls (some bioconda packages) may lack osx-arm64 builds. For those you would run the pipeline with Docker containers or an x86 env — but that is a per-pipeline concern, separate from installing Nextflow.
Verify the install
First, confirm the version. This is the real output from the machine:
nextflow -version version 26.04.6 build 12646
http://nextflow.io
You can also confirm the bundled Java is 17 or newer, which is what Nextflow needs:
java -versionSince we installed openjdk-23.0.2 into the env, that is the Java on PATH while bu-nextflow is active — no system Java involved.
Smoke test: run a tiny pipeline
The canonical smoke test is nextflow run hello, which downloads a small pipeline from GitHub, so it needs internet the first time. Here we use a fully offline one-file pipeline instead, which fits the env-isolation spirit and needs no network. Create a main.nf that pushes one value through a channel and views it:
cat > main.nf <<'NF'
workflow {
Channel.of('hello BioUnfold') | view
}
NF
nextflow run main.nfOn the test machine this produced:
[PIPELINE] main.nf | profile=standard
[WORKDIR] .../blogs/work
hello BioUnfold
[SUCCESS] completed=0 failed=0 cached=0
The bracketed [PIPELINE] / [WORKDIR] / [SUCCESS] lines above come from our test runner that wraps the pipeline; a plain nextflow run main.nf in your terminal prints the Nextflow banner and then the hello BioUnfold line. The point is that the channel emitted our value and the run completed cleanly.
If you see hello BioUnfold, your Nextflow install works end to end: the JVM launched, the DSL parsed, and a channel ran to completion.
Common errors and fixes
| Error | Fix |
|---|---|
CondaToSNonInteractiveError — Terms of Service not accepted for the defaults channels | Do not use defaults. Pass --override-channels -c conda-forge -c bioconda (as above) so conda never touches the ToS-gated channels. |
PackagesNotFoundError ... nextflow | The bioconda channel was not enabled or the channel order is wrong. Nextflow is noarch, so it is available for Apple Silicon — just add both channels: -c conda-forge -c bioconda. No Rosetta workaround needed. |
java: command not found / Cannot find any JVM | You are outside the env or mixing system Java. Run conda activate bu-nextflow so the bundled openjdk is on PATH. Confirm with java -version showing 17+. |
| Solver hangs or conflicts for minutes | Do not install into base. Use an isolated env and, if you like, conda config --set channel_priority strict. The mamba solver is faster still. |
nextflow run hello fails with a TLS or connection error | That test downloads from GitHub and needs internet plus working CA certs. Behind a proxy or offline, run the local main.nf smoke test above instead. |
| conda-installed Nextflow is older than the latest release | bioconda can lag upstream. Pin the version (nextflow=26.04.6) for reproducibility, and check anaconda.org/bioconda/nextflow for newer builds. |
Managing the env
Update Nextflow later (within what bioconda offers):
conda activate bu-nextflow
conda update -c conda-forge -c bioconda nextflowSave an exact, shareable recipe of the env so a collaborator can rebuild it:
conda env export -n bu-nextflow > bu-nextflow.ymlAnd when you are done, remove the whole env cleanly — this is why isolation is so tidy, nothing leaks into your system:
conda remove -n bu-nextflow --allNext steps
With Nextflow installed, a natural next move is to install the tools your pipelines will actually call, each in its own env. Start with the alignment and variant workhorses in Install SAMtools and BCFtools, or automate multi-step analyses with Install Snakemake. If channels and env management still feel fuzzy, the conda environments and bioconda channels guide ties it all together.