Default Port Configuration
When you create an instance, the firewall (UFW — Uncomplicated Firewall) is pre-configured with:| Port | Status | Protocol | Purpose |
|---|---|---|---|
| 22 | Open | TCP | SSH access |
| All others | Closed | — | Blocked by default for security |
If you created your instance with a template that includes a WebUI (Stable Diffusion, ComfyUI, or Linux Desktop), the WebUI is accessible through the portal when you click Connect on your instance — you do not need to open ports for it. See the Connecting guide for details.
Opening Ports
Connect to your instance via SSH first, then useufw commands to manage ports.
Open a Single Port
Open a Range of Ports
Verify Your Rules
Common Port Configurations
Here are the ports you’ll most commonly need to open, depending on your workload:Machine Learning & Data Science
| Service | Port | Command |
|---|---|---|
| Jupyter Notebook / Lab | 8888 | sudo ufw allow 8888/tcp |
| TensorBoard | 6006 | sudo ufw allow 6006/tcp |
| MLflow | 5000 | sudo ufw allow 5000/tcp |
| Weights & Biases (local) | 8080 | sudo ufw allow 8080/tcp |
| Ray Dashboard | 8265 | sudo ufw allow 8265/tcp |
AI Image Generation
| Service | Port | Command |
|---|---|---|
| Stable Diffusion (A1111) | 7860 | sudo ufw allow 7860/tcp |
| ComfyUI | 8188 | sudo ufw allow 8188/tcp |
| Fooocus | 7865 | sudo ufw allow 7865/tcp |
| InvokeAI | 9090 | sudo ufw allow 9090/tcp |
Web & API Development
| Service | Port | Command |
|---|---|---|
| HTTP | 80 | sudo ufw allow 80/tcp |
| HTTPS | 443 | sudo ufw allow 443/tcp |
| FastAPI / Uvicorn | 8000 | sudo ufw allow 8000/tcp |
| Flask | 5000 | sudo ufw allow 5000/tcp |
| Node.js / Express | 3000 | sudo ufw allow 3000/tcp |
| Gradio | 7860 | sudo ufw allow 7860/tcp |
LLM Inference
| Service | Port | Command |
|---|---|---|
| vLLM | 8000 | sudo ufw allow 8000/tcp |
| Text Generation Inference (TGI) | 8080 | sudo ufw allow 8080/tcp |
| Ollama | 11434 | sudo ufw allow 11434/tcp |
| LocalAI | 8080 | sudo ufw allow 8080/tcp |
| Open WebUI | 3000 | sudo ufw allow 3000/tcp |
Restricting Access by IP
For production services, you may want to restrict port access to specific IP addresses rather than opening them to the entire internet.Allow Only Your IP
Allow a Subnet
Closing Ports
Remove a Specific Rule
View and Delete by Rule Number
Example: Running Jupyter Notebook
Here’s a complete example of setting up Jupyter Notebook accessible from your browser:Example: Serving a Model with vLLM
Security Best Practices
- Only open ports you need. Every open port is a potential attack surface.
- Use IP restrictions for sensitive services. Don’t expose database ports (3306, 5432, 6379) to the entire internet.
- Use authentication. Always configure services with authentication tokens or passwords (e.g., Jupyter’s token, API keys).
- Bind to
0.0.0.0only when needed. Services bound to127.0.0.1are only accessible from the instance itself (via SSH tunneling), which is more secure. - Consider SSH tunneling as an alternative to opening ports. See below.
Alternative: SSH Tunneling
Instead of opening ports in the firewall, you can use SSH tunneling to securely access services through your SSH connection. This is more secure because the service never needs to be exposed to the internet.http://localhost:8888 in your browser. The traffic is encrypted through your SSH connection.
Tunnel Multiple Ports
Troubleshooting
I opened a port but can't connect
I opened a port but can't connect
Check these in order:
- Is the service running? SSH into the instance and verify:
ss -tlnp | grep <port> - Is the service bound to the right address? It must be bound to
0.0.0.0, not127.0.0.1. Start your service with--host 0.0.0.0or--bind 0.0.0.0. - Is the port open in UFW? Check with:
sudo ufw status | grep <port> - Is the instance running? Verify in the console dashboard.
UFW command not found
UFW command not found
UFW should be pre-installed on all Nova Cloud instances. If it’s missing:
Locked myself out (can't SSH in)
Locked myself out (can't SSH in)
If you accidentally blocked port 22, you cannot SSH in. Use the console to Stop and then Destroy the instance, and create a new one. Always ensure port 22 is allowed before modifying UFW rules.
Service works locally but not remotely
Service works locally but not remotely
The service is probably bound to Most frameworks have a
127.0.0.1 (localhost only). Change the bind address to 0.0.0.0:--host or --bind flag for this.What’s Next?
Connecting to an Instance
Learn about SSH access and the WebUI portal.
Choosing a GPU
Pick the right GPU and configuration for your workload.

