Back to Install Methods
🔒

Nginx Reverse Proxy & SSL

Secure your OpenDBS installation with Free SSL (Let's Encrypt) and a custom domain.

1. Install Nginx & Certbot

sudo apt update
sudo apt install nginx certbot python3-certbot-nginx

2. Configure Nginx

Create a config file at /etc/nginx/sites-available/opendbs.

nginx config
server {
    server_name db.yourdomain.com;

    location / {
        proxy_pass http://localhost:4402;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

3. Enable & Secure

# Link configuration
sudo ln -s /etc/nginx/sites-available/opendbs /etc/nginx/sites-enabled/

# Test and Restart
sudo nginx -t
sudo systemctl restart nginx

# Issue SSL Certificate
sudo certbot --nginx -d db.yourdomain.com
🎉 Your OpenDBS instance is now secure at https://db.yourdomain.com!