Set up NGINX
By default, EML AdminTool listens on port 8080. Setting up NGINX as a reverse proxy allows you to:
- access EML AdminTool via a domain name on standard ports (
80/443); - terminate HTTPS at the proxy level;
- avoid exposing Docker ports directly to the internet.
This guide assumes EML AdminTool is already installed and running. If you prefer Apache or Caddy, the NGINX configuration below can serve as a reference — consult their respective documentation for syntax differences.
Install NGINX
sudo apt update
sudo apt install -y nginxsudo dnf install -y nginx
sudo systemctl enable --now nginxConfigure the virtual host
Create a new configuration file:
sudo nano /etc/nginx/sites-available/eml-admintoolCreate a new configuration file:
sudo nano /etc/nginx/conf.d/eml-admintool.confPaste the following configuration, replacing YOUR_DOMAIN_OR_IP with all the addresses used to reach your server (domain name, public IP, local IP — separated by spaces):
server {
listen 80;
server_name YOUR_DOMAIN_OR_IP;
location / {
proxy_pass http://localhost:8080;
# Allow large file uploads as EML AdminTool sends 5MB chunks
client_max_body_size 8M;
# Extended timeouts for large uploads
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
} Important
The server_name directive must match the entries you provided during the EML AdminTool installation script, and the values in ALLOWED_ORIGINS in your .env file. A mismatch will cause login to fail.
Enable and reload
Enable the site by creating a symbolic link, then test and reload NGINX:
sudo ln -s /etc/nginx/sites-available/eml-admintool /etc/nginx/sites-enabled/eml-admintool
sudo nginx -t
sudo systemctl reload nginxTest and reload NGINX:
sudo nginx -t
sudo systemctl reload nginxEML AdminTool is now accessible at http://YOUR_DOMAIN_OR_IP without the :8080 port suffix.