dPanel dPanel
← All documentation
Deployment

edge-gateway.service: Public Rust HTTP/TLS Website Gateway

Aug 26, 2026 · 2 views

Overview

edge-gateway.service is a Rust‑based HTTP/TLS gateway that sits in front of your dPanel sites. It handles TLS termination, HTTP/2, and reverse‑proxying to the internal web server.

Systemd Unit

[Unit]
Description=Edge Gateway – Public HTTP/TLS Gateway
After=network.target

[Service]
ExecStart=/usr/bin/edge-gateway --config /etc/edge-gateway/config.toml
Restart=on-failure
Environment=EDGE_GATEWAY_LOG=info
WorkingDirectory=/var/lib/edge-gateway

[Install]
WantedBy=multi-user.target

Configuration

The gateway reads a TOML file (/etc/edge-gateway/config.toml). Key options:

  • listen_address: IP/port to bind (e.g., 0.0.0.0:443).
  • backend_url: URL of the internal web server (e.g., http://127.0.0.1:8080).
  • tls_cert_path / tls_key_path: Paths to the TLS certificate and key.
  • max_body_size: Maximum request body size in bytes.
  • allowed_hosts: List of hostnames that the gateway will serve.

Example:

listen_address = "0.0.0.0:443"
backend_url = "http://127.0.0.1:8080"
tls_cert_path = "/etc/ssl/certs/edge.crt"
tls_key_path = "/etc/ssl/private/edge.key"
max_body_size = 10485760
allowed_hosts = ["example.com", "www.example.com"]

TLS Setup

  1. Generate a certificate and key (or use Let's Encrypt).
  2. Place them in the paths defined above.
  3. Ensure the file permissions allow the edge-gateway user to read them.

Logging

The service writes logs to /var/log/edge-gateway/edge-gateway.log. Use journalctl -u edge-gateway.service for real‑time output.

Troubleshooting

  • Port already in use – check with ss -ltnp | grep 443.
  • TLS handshake failures – verify certificate chain and key match.
  • Backend unreachable – confirm backend_url and that the internal server is listening.

For more details, see the official dPanel documentation at https://dpanel.io/docs/edge-gateway.