What I would recommend doing, just to make sure we get the correct setup, is running
The above stops ufw and then resets all rules. With a clean slate, we setup our default policies first.
ufw default deny incoming \ && ufw default allow outgoing
With those rules in place, we then add the rules we need to work for whatever our purposes are. To start, I recommend allowing SSH in first.
ufw allow 22/tcp
We can then allow application-specific ports, such as 80, 443, 8001, etc. I’ll start with those three.
ufw allow 80/tcp \ && ufw allow 443/tcp \ && ufw allow 8001/tcp