Apache NiFi
Overview
Apache NiFi is the open-source platform for automating the flow of data between systems. Ingest, route, transform, enrich and deliver data with a visual, drag-and-drop processor canvas, full data provenance and back-pressure-aware queuing.
This SecureAnyCloud image installs Apache NiFi 2.9.0 on OpenJDK 21 and fronts its mandatory HTTPS listener with an nginx reverse proxy on port 80. It persists all flow configuration and repositories on a dedicated Azure data disk, and it generates a unique single-user login on the first boot of every VM.
What you get:
- Apache NiFi 2.9.0 running on OpenJDK 21, installed at
/opt/nifi. - The NiFi web UI canvas served over HTTPS, fronted by an nginx reverse proxy on port 80 (NiFi binds loopback
127.0.0.1:8443). - Mandatory single-user authentication with a per-VM username
nifiand a unique password generated at first boot, in a root-only file. - A dedicated Azure data disk at
/var/lib/nifiholding the flow configuration and the flowfile, content, provenance and database repositories. It is separate from the OS disk and re-provisioned with every VM. nifi.serviceandnginx.serviceas systemd units, enabled and active.- 24/7 SecureAnyCloud support.
Prerequisites
Before you deploy this image, make sure you have:
- An active Azure subscription.
- An SSH key pair.
- A VNet and subnet in the target region.
- A VM size of Standard_B2ms (2 vCPU / 8 GiB RAM) or larger. This is the recommended minimum, because NiFi is a JVM application and needs headroom. Scale up for heavier dataflows.
- NSG inbound rules that allow
22/tcpfrom your management network and80/tcpfrom the networks that need the NiFi UI. For public exposure, front the proxy with TLS (see Enabling a trusted certificate).
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Apache NiFi by SecureAnyCloud, and select Create.
On Basics, pick your subscription, resource group, region and size (Standard_B2ms or larger). Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).
Review the dedicated data disk on the Disks tab, then choose Review + create and Create.
Step 2 - Deploy from the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:apache-nifi-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name nifi \
--image sac1647283583153:apache-nifi-ubuntu-24-04:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name nifi --port 80 --priority 1010Step 3 - Connect to your VM
ssh azureuser@<vm-public-ip>Step 4 - Confirm the services are running
NiFi takes one to three minutes to fully start on first boot. Once it is up, both services report active and the proxied UI answers. Run:
systemctl is-active nifi.service nginx.service curl -sk -o /dev/null -w '%{http_code}\n' http://127.0.0.1/nifi/Both services report active, and the proxied NiFi UI returns 200.
Step 5 - Retrieve your login
The single-user username is nifi. The password is generated uniquely on the first boot of your VM and written to a root-only file. Print it with:
sudo cat /root/nifi-credentials.txtThe username is nifi. The password is the NIFI_ADMIN_PASSWORD value, and NIFI_URL is the HTTPS address to open in your browser.
Step 6 - Sign in to the NiFi canvas
Browse to https://<vm-public-ip>/nifi and sign in with nifi and the password from Step 5. The image ships with a self-signed certificate, so your browser warns on first connection. Accept the warning, or install a trusted certificate as described below. After you sign in, you land on the NiFi flow canvas.
You can confirm authentication from the shell with the NiFi access-token REST API. A wrong password is rejected, and the per-VM password returns a JWT bearer token:
PASS=$(sudo grep '^NIFI_ADMIN_PASSWORD=' /root/nifi-credentials.txt | cut -d= -f2-)
echo "wrong password -> $(curl -sk -o /dev/null -w '%{http_code}' -d 'username=nifi' --data-urlencode 'password=wrong' https://127.0.0.1:8443/nifi-api/access/token)"
TOKEN=$(curl -sk -d 'username=nifi' --data-urlencode "password=$PASS" https://127.0.0.1:8443/nifi-api/access/token)
echo "token length: ${#TOKEN}"The wrong password returns a non-201 status. The real password returns a JWT, which is a long dotted token.
Step 7 - Build a dataflow
From the canvas, drag a Processor onto the grid and choose one, for example GenerateFlowFile. Connect it to a downstream processor to build a flow.
Use the global menu to open Controller Settings, Parameter Contexts and the Provenance view. Provenance records every event as data moves through your flow.
Step 8 - Confirm persistence on the data disk
The NiFi flow configuration and all repositories live on the dedicated Azure data disk at /var/lib/nifi. Your flows and queued data survive reboots and ride into any image you capture. Run:
findmnt /var/lib/nifi ls /var/lib/nififindmnt shows /var/lib/nifi mounted from the data disk. The directory holds the flow, flowfile_repository, content_repository, provenance_repository and database_repository subdirectories.
Enabling a trusted certificate
The image ships with a self-signed certificate. For production, terminate TLS at the nginx proxy with a real domain pointed at the VM's public IP.
Install certbot and request a certificate, replacing the domain with yours. certbot configures nginx to serve HTTPS on port 443:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.comWhen certbot completes, NiFi is reachable at https://your-domain.example.com/nifi with a browser-trusted certificate.
Backup and maintenance
Your NiFi flow definition and repositories live on the data disk at /var/lib/nifi. Snapshot that disk to back up your flows. The NiFi binaries and configuration are at /opt/nifi/current/conf.
Keep the OS patched with sudo apt update && sudo apt upgrade. The service restarts cleanly with sudo systemctl restart nifi, and NiFi takes one to three minutes to come back up. The image already applies all available Ubuntu security updates at build time.
Support
This image is backed by 24/7 SecureAnyCloud support. Contact us by email or chat for help with processors, controller services, parameter contexts, clustering, scaling and TLS.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on Azure
Launch Apache NiFi on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
Apache NiFi is the open source dataflow automation platform. This image runs it as a single node deployment. NiFi gives you a web-based, drag-and-drop canvas on which you build flows out of processors, connect them together, and route, transform and mediate data between systems in real time or in batches.
NiFi tracks every piece of data it handles through its built-in data provenance, so you can see exactly where a record came from and what happened to it.
What you get:
- Java 21, which NiFi 2.x requires, installed from the Ubuntu 24.04 archive. NiFi itself is installed from the official Apache binary distribution under
/opt/nifi. It runs as a dedicated unprivilegednifiservice user and is supervised by systemd. - The NiFi web console served over HTTPS on the loopback interface on port 8443. An nginx reverse proxy terminates HTTPS on port 443 with a self-signed certificate and forwards requests to the NiFi listener. Plain HTTP on port 80 redirects to HTTPS.
- HTTPS at the edge, which is required because NiFi issues its login token in a secure cookie that a plain HTTP browser cannot use. You can replace the self-signed certificate with your own CA-signed certificate, as described later in this guide.
- The single user login provider enabled, so the console always requires a username and password. The password is generated fresh on the first boot of every deployed instance, so two instances launched from the same Amazon Machine Image never share a password.
- A first boot service that also rotates the flow sensitive properties key, which NiFi uses to encrypt sensitive processor properties such as credentials inside your flow. It also adds the instance address to NiFi's proxy host allow list so that reverse proxied requests are accepted.
- The generated login password written to
/root/apache-nifi-credentials.txtwith mode 0600, so that only the root user can read it. - NiFi's repositories, which hold in-flight data, content, provenance and the flow definition itself, kept on a dedicated EBS data volume mounted at
/var/lib/nifi. The volume is separate from the operating system disk, so you can resize the data tier independently of the root volume.
Prerequisites
Before you deploy this image, make sure you have:
- An Amazon Web Services account where you can launch EC2 instances.
- IAM permissions to launch instances, create security groups, and subscribe to AWS Marketplace products.
- An EC2 key pair in the target Region for SSH access to the instance.
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network and inbound port 443 (and optionally port 80, which redirects to 443) from the trusted networks that will reach the NiFi console.
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line.
Launch the Instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and choose Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for Apache NiFi. Select the SecureAnyCloud listing and choose Select, then Continue on the subscription summary.
Pick an instance type of m5.large or larger. NiFi is a Java application and benefits from memory, and the data volume gives it room to spool content. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Create or select a security group that allows inbound port 22 from your management network and inbound port 443 from the trusted networks that will reach the console (port 80 redirects to 443). Do not open these ports to the public internet unless you intend the console to be publicly reachable. Leave the root volume at the default size or larger.
Choose Launch instance. First boot initialisation takes approximately one to two minutes after the instance state becomes Running and the status checks pass, while NiFi generates the login password and starts up.
Launch the Instance from the AWS CLI
The following command launches an instance from the SecureAnyCloud Apache NiFi Marketplace AMI into an existing subnet and security group. Replace <ami-id> with the AMI ID shown on the Marketplace listing. Replace <key-name> with your EC2 key pair name and <subnet-id> with your subnet ID. Replace <security-group-id> with a security group that opens ports 22 and 443 (and optionally 80) as described above.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":20,"VolumeType":"gp3"}}]' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=nifi-01}]'The command prints a JSON document on success. Note the instance ID. Once the instance is running, retrieve its public address with aws ec2 describe-instances --instance-ids <instance-id> --query "Reservations[].Instances[].PublicIpAddress" --output text.
Connect and Retrieve the Login Password
Connect over SSH with the key pair you selected and the public IP address from Step 2. The SSH login user depends on the operating system of the AMI variant you launched:
AMI variant SSH login user
Apache NiFi on Ubuntu 24.04 ubuntu
The first boot service runs before the SSH daemon becomes ready, so the credentials file is always in place when you log in for the first time. Print it with:
ssh <login-user>@<public-ip>
sudo cat /root/apache-nifi-credentials.txtThe file is plain text and contains the NiFi URL, the administrator username (admin) and the generated login password. Copy these values somewhere secure, such as a password manager or an encrypted vault. Do not commit them to source control.
The credentials file is owned by root and readable only by root. Confirm this with:
sudo ls -l /root/apache-nifi-credentials.txt-rw------- 1 root root 482 Jun 17 10:36 /root/apache-nifi-credentials.txtVerify the Server is Healthy
NiFi, the nginx reverse proxy and the first boot service should all report active:
for u in nifi nginx nifi-firstboot; do printf "%s: " "$u"; systemctl is-active "$u"; donenifi: active nginx: active nifi-firstboot: activeThe deployed Java runtime is OpenJDK 21, which NiFi 2.x requires:
java -versionopenjdk version "21.0.11" 2026-04-21 OpenJDK Runtime Environment (build 21.0.11+10-1-24.04.2-Ubuntu) OpenJDK 64-Bit Server VM (build 21.0.11+10-1-24.04.2-Ubuntu, mixed mode, sharing)nginx listens on port 443 (TLS) and port 80 (which redirects to 443). It forwards to the NiFi HTTPS console bound to the loopback address on port 8443:
sudo ss -tlnp | grep -E ':80 |:443 |:8443'LISTEN 0 511 0.0.0.0:80 0.0.0.0:* LISTEN 0 511 0.0.0.0:443 0.0.0.0:* LISTEN 0 50 127.0.0.1:8443 *:*Open the NiFi Web Console
Browse to https://<public-ip>/ from a machine on a network the security group allows. The edge certificate is self-signed, so your browser warns about the connection the first time. Accept the warning to proceed, or install your own certificate as described in Step 11.
The root path redirects to the NiFi user interface at /nifi/. Sign in as the admin user with the password from the credentials file.
After you sign in, NiFi presents the flow canvas, the empty workspace where you build your dataflow. The toolbar across the top carries the components you drag onto the canvas: the Processor, the Input Port, the Output Port, the Process Group and the Funnel.
The nginx HTTPS listener encrypts the connection with a self-signed certificate, which is why the browser warns on first use. Step 11 shows how to install your own CA-signed certificate so the warning disappears.
Build Your First Dataflow
A NiFi flow is a set of processors connected by relationships. The simplest useful flow generates some data and writes it to disk.
On the canvas, drag the Processor icon from the toolbar onto the canvas. In the Add Processor dialog, filter for GenerateFlowFile, select it, and choose Add. Drag a second processor onto the canvas and add a PutFile processor.
Double-click the GenerateFlowFile processor to open its configuration. On the Scheduling tab, set the run schedule to a few seconds so it does not flood the flow. On the Properties tab, set a small file size such as 10 B. Apply the change.
Double-click the PutFile processor. On the Properties tab, set Directory to a writable path such as /var/lib/nifi/out. Apply the change.
Hover over the GenerateFlowFile processor until the connection arrow appears, then drag it onto the PutFile processor to create a connection. In the Create Connection dialog, select the success relationship and add it. On the PutFile processor, auto-terminate the success and failure relationships so the flow has somewhere to send completed work.
Select both processors, right-click and choose Start. NiFi begins generating flow files and writing them to the directory. The numbers on each processor update live to show throughput. To inspect the data in flight, right-click a connection and choose List queue.
Use the REST API
Everything the canvas does is also available through NiFi's REST API. Request a token with the login credentials, then call the API with that token as a bearer credential. Run these commands on the instance, where the loopback HTTPS listener is reachable:
PASS="$(sudo awk -F= '/^nifi.admin.pass=/ {print $2}' /root/apache-nifi-credentials.txt)" TOKEN="$(curl -sk -X POST https://127.0.0.1:8443/nifi-api/access/token \
--data-urlencode 'username=admin' --data-urlencode "password=${PASS}")" curl -sk https://127.0.0.1:8443/nifi-api/flow/current-user \
-H "Authorization: Bearer ${TOKEN}" | head -c 400The first call returns a signed JSON Web Token. The second call returns the identity of the authenticated user, which confirms that the API round trip works end to end.
Filesystem and Service Layout
The NiFi install lives under /opt/nifi, and its working data lives on the dedicated volume mounted at /var/lib/nifi:
ls -d /opt/nifi/nifi-2.9.0 findmnt /var/lib/nifi -o TARGET,SOURCE,FSTYPE
ls /var/lib/nifi/opt/nifi/nifi-2.9.0 TARGET SOURCE FSTYPE /var/lib/nifi /dev/nvme1n1 ext4 content_repository database_repository flow flowfile_repository provenance_repository stateThe content_repository holds the bytes of the data NiFi is processing. The flowfile_repository tracks the metadata of every flow file, the provenance_repository records the lineage of every event, and flow holds your saved dataflow definition.
Keeping all of these on the data volume means you can grow the disk independently, and your flow and its data survive a root volume replacement.
Start, Stop, and Check Status
NiFi runs under systemd as nifi.service and the reverse proxy as nginx.service:
sudo systemctl status nifi --no-pager sudo systemctl restart nifi
sudo journalctl -u nifi -n 50 --no-pagerAfter a start, NiFi takes up to a minute to fully initialise while it loads its flow and warms the JVM. Allow that time before the console responds.
Rotate the Login Password
To change the single-user login password, use the bundled nifi.sh helper as the nifi service user, then restart NiFi:
sudo systemctl stop nifi
sudo -u nifi JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 \
/opt/nifi/nifi-2.9.0/bin/nifi.sh set-single-user-credentials admin '<new-password>'
sudo systemctl start nifiThe password must be at least 12 characters. Update your stored copy of the credentials after you rotate it, because the file under /root still holds the value generated on first boot.
Install Your Own TLS Certificate
The nginx reverse proxy ships configured for HTTPS on port 443 using a self-signed certificate at /etc/nginx/ssl/nifi-selfsigned.crt. To remove the browser warning, replace it with a certificate issued for your DNS name by a trusted certificate authority such as Let's Encrypt or your own internal CA.
Copy your certificate and private key onto the instance. Point nginx at them by editing the ssl_certificate and ssl_certificate_key lines in /etc/nginx/sites-available/nifi. Reload nginx with sudo nginx -t && sudo systemctl reload nginx.
Then add your DNS name to NiFi's proxy host allow list. Edit nifi.web.proxy.host in /opt/nifi/nifi-2.9.0/conf/nifi.properties and restart NiFi.
Backups and Maintenance
Your dataflow definition and the in-flight data all live under /var/lib/nifi. The simplest backup is an EBS snapshot of the data volume taken while NiFi is briefly stopped. This captures a consistent copy of the repositories and the flow:
sudo systemctl stop nifi aws ec2 create-snapshot --volume-id <data-volume-id> --description "nifi data $(date +%F)"
sudo systemctl start nifiTo export only the flow definition, copy /var/lib/nifi/flow/flow.json.gz to a safe location.
Keep the operating system patched with sudo apt-get update && sudo apt-get -y upgrade. Review the NiFi release notes before you upgrade the NiFi binary itself.
Security Recommendations
- Keep ports 443 and 80 closed to the public internet. Expose the console only to the networks that operate it, or front it with a load balancer or VPN and the certificate from Step 11.
- Rotate the login password after first launch and store it in a secrets manager.
- NiFi enforces authentication on every request, including the REST API. Never disable the single-user login provider or enable anonymous authentication on an internet-reachable instance.
- Take regular EBS snapshots of the data volume so your flows and their provenance survive an instance failure.
- Apply operating system security updates promptly.
Screenshots
The Apache NiFi web sign-in page, served on first boot with no manual setup.
The Apache NiFi flow canvas where data routing and transformation flows are designed.
Adding a processor to the canvas to build a dataflow.
Support
SecureAnyCloud provides 24/7/365 expert technical support for this image, with a guaranteed response within 24 hours and a one-hour average for critical issues. Contact sales@secureanycloud.com.
For general Apache NiFi questions, processor reference and flow design, see the official documentation at https://nifi.apache.org/docs.html and the Apache NiFi community at https://nifi.apache.org.
Deploy on AWS
Launch Apache NiFi on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com