Set up NGINX
Your EML AdminTool instance can be accessed directly via its IP address and port (by default, port 8080). However, it is recommended to set up a reverse proxy using NGINX to enable HTTPS and improve security. It also allows you to access EML AdminTool using a custom domain name and standard ports (80 for HTTP and 443 for HTTPS).
We assume you have already installed EML AdminTool by following the installation guide, and that you have a domaine name pointing to your server’s public IP address.
The following tutorial uses NGINX as reverse proxy under Linux. If you prefer to use another web server (such as Apache or Caddy), or if you are using a different operating system, please refer to its documentation for setting up a reverse proxy.
Installation
First, install NGINX on your server.
Update your package list and install NGINX using apt:
sudo apt update
sudo apt install -y nginxInstall NGINX using dnf (or yum on older versions), then enable and start the service:
sudo dnf install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginxConfiguration
We need to create a configuration file that tells NGINX how to forward traffic to your AdminTool.
Create a new file in /etc/nginx/sites-available/:
sudo nano /etc/nginx/sites-available/eml-admintoolCreate a new file in /etc/nginx/conf.d/:
sudo nano /etc/nginx/conf.d/eml-admintool.confPaste the following configuration into the file.
Important
Multi-domain / IP Configuration: You must adapt the server_name directive to match all the ways you access your server (e.g., your public domain, your local IP, etc.).
This should roughly match the entries you defined during the installation script. Separate them with spaces.
server {
listen 80;
# REPLACE THIS LINE with your actual domains and IPs
# Example: server_name panel.myserver.com 192.168.1.50 127.0.0.1;
server_name YOUR_DOMAIN_OR_IP;
location / {
# Forward traffic to the Docker container on port 8080
proxy_pass http://localhost:8080;
# Allow large file uploads (up to 1GB; adjust as needed)
client_max_body_size 1G;
# Timeout settings: uploading large files may take time
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
# Standard headers for proxying
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 (Required for SvelteKit/Vite HMR in some cases)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
} Enable and Test
Now, enable the site (for Debian/Ubuntu) and reload NGINX.
Create a symbolic link to enable the site:
sudo ln -s /etc/nginx/sites-available/eml-admintool /etc/nginx/sites-enabled/ Test the configuration for syntax errors:
sudo nginx -t If the test is successful, reload NGINX:
sudo systemctl reload nginxTest the configuration for syntax errors:
sudo nginx -t If the test is successful, reload NGINX:
sudo systemctl reload nginxYour AdminTool should now be accessible via http://YOUR_DOMAIN_OR_IP (without the :8080 port).