Skip to content

/errors/ufw/could-not-find-a-profile-matching

ufw: ERROR: Could not find a profile matching 'Nginx Full'

The commands on this page have not been executed by our verification runner yet.updated
tool
ufw
exit code
1
versions
ufw 0.36
os
linux

ERROR: Could not find a profile matching 'Nginx Full' means ufw has no application profile with that name. Profiles are small files in /etc/ufw/applications.d/ installed by packages such as Ubuntu's nginx, apache2 and openssh-server; if the package is not installed, or nginx came from another source, the profile does not exist. Run sudo ufw app list and use a listed name in quotes, or open the ports directly: sudo ufw allow 80,443/tcp.

Check which profiles exist

bash
sudo ufw app list
ls /etc/ufw/applications.d/
sudo ufw app info 'Nginx Full'

On Ubuntu with the distribution's nginx package, the list contains Nginx Full (80 and 443), Nginx HTTP (80), Nginx HTTPS (443) and OpenSSH. Names are case-sensitive and must be quoted when they contain a space:

bash
sudo ufw allow 'Nginx Full'      # correct
sudo ufw allow Nginx Full        # wrong: two arguments

Fix without a profile

bash
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 443/udp           # only if you serve HTTP/3 (QUIC)

Write your own profile

text
# /etc/ufw/applications.d/myapp
[MyApp]
title=My application
description=HTTP API and metrics
ports=8080/tcp|9100/tcp
bash
sudo ufw app update MyApp
sudo ufw allow MyApp

ports takes port/proto entries separated by |, and ranges such as 60000:61000/udp. After editing a profile, ufw app update refreshes the rules that use it.

The same message appears for OpenSSH on a system without openssh-server, and in that case sudo ufw allow 22/tcp (or sudo ufw allow ssh, which uses /etc/services) is the equivalent rule.

Sources