Scripts for spinning up a local 3-node NiFi cluster plus a standalone instance from source. Useful for testing clustered features (replication, primary-node failover, load balancing) and standalone behavior side-by-side.
dev-nifi-up.sh builds NiFi from source, then creates and starts 4 NiFi instances:
| Instance | IP | URL |
|---|---|---|
| Cluster 1 | 127.0.0.1 | https://127.0.0.1:9443/nifi |
| Cluster 2 | 127.0.0.2 | https://127.0.0.2:9444/nifi |
| Cluster 3 | 127.0.0.3 | https://127.0.0.3:9445/nifi |
| Standalone | 127.0.0.4 | https://127.0.0.4:9446/nifi |
Login: admin / adminadminadmin
Each node binds to a distinct loopback IP (Linux routes the entire 127.0.0.0/8 block to lo). Self-signed TLS certs are generated per-node with a shared truststore. Embedded ZooKeeper runs on node 1.
- JDK 21+
- Maven (uses the
mvnwwrapper from the NiFi repo) - ~4 GB free RAM (4 NiFi JVMs)
- Linux (uses loopback IP aliases)
# Full build + start (takes a while on first run)
/opt/nifi-dev-cluster/dev-nifi-up.sh
# Reuse a previous build (skip Maven)
/opt/nifi-dev-cluster/dev-nifi-up.sh --skip-build
# Nuke Nx caches before building (fixes stale frontend)
/opt/nifi-dev-cluster/dev-nifi-up.sh --clean-nx
# Stop everything
/opt/nifi-dev-cluster/dev-nifi-down.sh
# Stop and remove all node dirs + certs
/opt/nifi-dev-cluster/dev-nifi-down.sh --cleanBy default the scripts look for the NiFi source checkout at $HOME/IdeaProjects/nifi. Override with:
export NIFI_REPO_ROOT=/path/to/nifiThe NiFi version is auto-detected from the root pom.xml.
- Builds
nifi-assemblyfrom source (produces the distributable zip) - Stops any previously running nodes and kills stale processes
- Unpacks 4 NiFi instances under
nodes/ - Generates per-node keystores + shared truststore via
keytool - Configures nodes 1-3 for clustering (unique IPs, ports, embedded ZK)
- Configures node 4 as standalone (no cluster settings)
- Sets single-user credentials
- Starts node 1, waits for ZooKeeper, then starts the rest