Introduction: The Easy Way to SSL
Running apps like n8n or Portainer on http://ip:5678 is dangerous. You need HTTPS. But setting up Nginx config files manually is a headache.
Meet Nginx Proxy Manager (NPM). It gives you a simple graphical interface to handle all your domains and SSL certificates automatically.
Prerequisite: You must have a Domain Name (e.g., ai.yourdomain.com) pointed to your Server IP.
Step 1: Install NPM (Docker)
Create a folder and a docker-compose.yml file.
mkdir nginx-proxy && cd nginx-proxy
nano docker-compose.yml
Paste this code to set up the proxy server:
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80' # Public Web Port
- '81:81' # Admin Panel Port
- '443:443' # SSL Port
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
Run it:
Step 2: Login to Dashboard
Open your browser and go to: http://your-server-ip:81
Login and immediately change your email and password.
Step 3: Add SSL to Your App
Now let's secure your app (e.g., n8n running on port 5678).
- Click "Proxy Hosts" ->"Add Proxy Host".
- Domain Names: Enter your domain (e.g.,
n8n.mysite.com). - Forward Hostname / IP: Enter your server's local IP (e.g.,
172.17.0.1 for Docker gateway or your public IP). - Forward Port: Enter the app port (e.g.,
5678). - Go to the "SSL" tab.
- Under "SSL Certificate", select "Request a new SSL Certificate".
- Toggle on "Force SSL" and "HTTP/2 Support".
- Enter your email and click Save.
Success! You can now visit https://n8n.mysite.com. Your connection is secure, and the lock icon is visible.
Conclusion: Secure & Professional
No more "Not Secure" warnings. You can repeat Step 3 for unlimited domains and apps.
Need a Public IP?
Every ServerMO Dedicated Server comes with a dedicated static IPv4, making SSL setup instant and easy.