• Tutorials
    /
  • Blog

NullWard Is Free for Personal Use: Set Up Your Own WAF on a VPS

Published: November 24, 2026
NullWard per-service security settings: the WAF turned on in Block mode with the OWASP Core Rule Set, a custom rule set and WAF bypass paths

If you run anything on the internet yourself, such as a home lab dashboard, a self-hosted app or a personal website, it’s being probed by automated scanners right now. A web application firewall (WAF) sits in front of it and stops those attacks before they reach your code.

NullWard is free for personal use. You don’t need a license, an account or a credit card. The free version includes the OWASP Core Rule Set WAF, automatic TLS certificates, sign-in for any application, threat intelligence and auto-blocking, and unlimited domains and applications. It’s also free for commercial use.

This guide walks you through running NullWard on a small virtual private server (VPS) from OVHcloud or any cloud provider, and putting your first application behind it, step by step.

What you’ll build

By the end you’ll have:

  • NullWard running on your own VPS with Docker Compose
  • a test application behind it at https://app.example.com, with a free Let’s Encrypt certificate
  • the OWASP Core Rule Set inspecting every request
  • the admin dashboard reachable only through an SSH tunnel, never from the internet

What you need

  • A VPS or cloud virtual machine running Linux, such as an OVHcloud VPS, or a VM from AWS, Azure, Google Cloud or DigitalOcean. This guide uses Ubuntu Server 24.04 LTS. In our benchmarks NullWard handled about 250 requests per second per vCPU with every feature turned on, so a small 1 or 2 vCPU server is plenty for personal use.
  • A domain name you control, so you can point a hostname such as app.example.com at the server.
  • An SSH key for signing in to the server, and basic comfort with the command line.

Step 1: Create the server

In your provider’s control panel, create a VPS or virtual machine with Ubuntu Server 24.04 LTS and add your SSH public key. Note the server’s public IPv4 address once it’s running.

If your provider has a network firewall or security group in front of the server, allow only:

  • TCP 22 (SSH), ideally only from your own IP address
  • TCP 80 (HTTP), needed for Let’s Encrypt and HTTP-to-HTTPS redirects
  • TCP 443 (HTTPS)

Don’t open port 7052. That’s NullWard’s admin port, and you’ll reach it through SSH instead.

Step 2: Point your domain at the server

At your DNS provider, create an A record for the hostname you want to protect, for example app.example.com, pointing at the server’s IPv4 address. If your server has IPv6, add an AAAA record too.

DNS changes can take a few minutes to spread. Let’s Encrypt needs the record in place before it can issue your certificate in step 7.

Step 3: Install Docker

Sign in to the server:

ssh ubuntu@203.0.113.10

Replace ubuntu with your server’s user name and 203.0.113.10 with its IP address. Then install Docker Engine and the Compose plugin with Docker’s install script, and check that they work:

curl -fsSL https://get.docker.com | sudo sh
sudo docker compose version

A note on firewalls: host firewalls such as ufw don’t protect ports that Docker publishes, because Docker writes its own firewall rules. That’s why this guide binds the admin port to 127.0.0.1 below, and why your provider’s network firewall is the right place to limit SSH.

Step 4: Create the configuration

Create a folder for NullWard:

sudo mkdir -p /opt/nullward && cd /opt/nullward

Generate two random secrets, one for signing admin sessions and one for encrypting the secrets NullWard stores:

openssl rand -base64 32
openssl rand -base64 32

Create the file /opt/nullward/.env (for example with sudo nano .env) and paste in the two values, plus a strong admin password and database password of your own:

NULLWARD_JWT_SECRET=<first generated value>
NULLWARD_ENCRYPTION_KEY=<second generated value>
NULLWARD_ADMIN_PASSWORD=<a strong password for the admin account>
NULLWARD_ADMIN_USERNAME=admin
NULLWARD_DB_USERNAME=root
NULLWARD_DB_PASSWORD=<a strong database password>
NULLWARD_LOG_LEVEL=info

Then lock it down so only root can read it:

sudo chmod 600 .env

Keep a copy of this file somewhere safe, such as your password manager. The encryption key is needed to read the secrets NullWard stores, and the admin password is reset to the value in this file every time NullWard starts, so change it here rather than in the dashboard.

Step 5: Create the Docker Compose file

Create /opt/nullward/docker-compose.yml. It runs NullWard with its database (SurrealDB) and cache (Valkey), plus a tiny test application, whoami, that simply echoes back each request so you can see NullWard working:

services:
  nullward:
    image: harbor.sageisg.com/nullward/waf:latest
    restart: unless-stopped
    env_file: .env
    environment:
      NULLWARD_DB_HOST: surrealdb
      NULLWARD_DB_PORT: "8000"
      NULLWARD_KEYDB_HOST: valkey
      NULLWARD_KEYDB_PORT: "6379"
    ports:
      - "80:7050"                # public HTTP
      - "443:7443"               # public HTTPS
      - "127.0.0.1:7052:7052"    # admin dashboard: this server only
    stop_grace_period: 50s
    depends_on:
      surrealdb:
        condition: service_healthy
      valkey:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "wget", "-q", "--spider", "http://localhost:7052/health"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 15s

  surrealdb:
    image: surrealdb/surrealdb:v2
    restart: unless-stopped
    user: root
    command: start --user ${NULLWARD_DB_USERNAME:-root} --pass ${NULLWARD_DB_PASSWORD:-root} --bind 0.0.0.0:8000 rocksdb:/data/nullward.db
    volumes:
      - surrealdb_data:/data
    healthcheck:
      test: ["CMD", "/surreal", "isready"]
      interval: 5s
      timeout: 5s
      retries: 10
      start_period: 5s

  valkey:
    image: valkey/valkey:8-alpine
    restart: unless-stopped
    command: valkey-server --appendonly yes
    volumes:
      - valkey_data:/data
    healthcheck:
      test: ["CMD", "valkey-cli", "ping"]
      interval: 5s
      timeout: 5s
      retries: 10

  whoami:
    image: traefik/whoami
    restart: unless-stopped

volumes:
  surrealdb_data:
  valkey_data:

The database, cache and test app publish no ports of their own. Only NullWard talks to them, over the private Docker network.

Step 6: Start NullWard and sign in

Start the stack and check that every container becomes healthy:

sudo docker compose pull
sudo docker compose up -d
sudo docker compose ps

The admin dashboard only listens on the server itself, so reach it through an SSH tunnel. On your own computer, run:

ssh -N -L 7052:127.0.0.1:7052 ubuntu@203.0.113.10

Leave that running, open http://localhost:7052 in your browser, and sign in with the admin user name and password from your .env file. On Windows, the built-in OpenSSH client accepts the same command.

Once you’re in, go to Settings > Authentication and set Admin External URL to http://localhost:7052, the address you’re using to reach the dashboard.

Step 7: Protect your first application

  1. Go to Services > Services and click Add Service.
  2. Fill in the form:
    • Name: Test app
    • Host Pattern: app.example.com (your hostname from step 2)
    • Upstream Type: Direct HTTP/HTTPS
    • Upstream URL: http://whoami:80
  3. Turn on WAF Enabled and TLS Enabled, then click Create Service.
  4. Open the service, go to the TLS tab and, under TLS Configuration, make sure Inbound TLS Enabled is on, choose ACME (Let’s Encrypt) as the Certificate Mode, and enter your email address for the certificate. Turn on Enforce HTTPS to redirect HTTP visitors to HTTPS.
  5. Click Save Changes.

NullWard requests a certificate from Let’s Encrypt and renews it automatically. You can follow progress under Security Events > ACME Events. Then open https://app.example.com: you should see the whoami page, served over HTTPS through NullWard.

Step 8: See the WAF in action

With the WAF in Block mode, send a harmless request that looks like an attack:

curl -i "https://app.example.com/?q=<script>alert(1)</script>"

NullWard answers with 403 and its block page instead of passing the request to your application. Every block is recorded under Security Events > WAF Events, with the rule that matched.

The NullWard block page a visitor sees when a rule stops a request, with the status, rule, reason, path and a reference number

Step 9: Put your own application behind it

Now replace the test app with your own:

  • If your app runs in Docker on the same server, add it to the same docker-compose.yml (or the same Docker network) and use its service name as the upstream, for example http://myapp:3000. Don’t publish its port to the internet: NullWard is the only way in.
  • If it runs elsewhere, use its address as the upstream, for example http://10.0.1.20:8080.

When you protect a real application, start the WAF in Audit mode on the service’s WAF tab. NullWard then records what it would have blocked without blocking anything. Check Security Events > WAF Events (filter by Audit only) for a few days, add exclusions for anything that’s legitimate traffic for your app, then switch to Block.

Want to keep an app private, like an admin panel or a home dashboard? On the service’s Access tab you can put a sign-in page in front of it, with single sign-on through Google or Microsoft or one-time email codes, even if the app has no login of its own.

Step 10: Keep it updated and backed up

To update NullWard:

cd /opt/nullward
sudo docker compose pull nullward
sudo docker compose up -d nullward

Read the release notes before you update. For a set-and-forget setup, pin a version tag in your Compose file, for example harbor.sageisg.com/nullward/waf:v0.6.112-beta, so updates only happen when you choose.

Back up three things: the .env file, the surrealdb_data volume (all your configuration), and the valkey_data volume. For a consistent copy, stop the stack with sudo docker compose stop, copy the volumes, and start it again, or snapshot the server’s disk from your provider’s control panel.

Free for personal use, and what a license adds

Everything in this guide is part of NullWard’s free version. Use it for your own projects for as long as you like. Without a license, NullWard doesn’t even check in with a license server.

If you want more, the Personal plan (CA$20 a month) unlocks every paid feature for your own use:

  • the machine learning WAF, which learns your traffic
  • application tunnels, to publish apps in your home lab or a private network without opening any ports
  • the virtual waiting room and high availability clustering
  • HTTP/3

You can try them all free for 30 days, with no card needed. When the trial ends, NullWard simply falls back to the free version.

Learn more


Share this post: