Skip to main content
Lumos Gate Docs

Detected Sites

Automatically discover and import your existing HAProxy-managed domains into Lumos Gate. Migrate without manual reconfiguration or downtime.

Detected Sites

If your shield VPS was already running HAProxy before you installed the Lumos Agent, the agent detects the existing configuration and makes it available for import through the dashboard. This allows you to bring your existing sites under Lumos management without any manual reconfiguration -- no need to re-enter domains, origins, or ports one by one.

This feature is especially useful when migrating an existing HAProxy setup to Lumos Gate. Instead of starting from scratch, you can review what the agent found and selectively import the sites you want to manage.

How Detection Works

During installation, the agent backs up the existing HAProxy configuration file (/etc/haproxy/haproxy.cfg) to /etc/haproxy/haproxy.cfg.lumos-backup. This backup is sent to the Lumos WebSocket server, which stores it in the database alongside the server record. When you open the Detected Sites tab in the dashboard, the configuration is parsed on the fly to extract domain-to-origin mappings.

The parser understands two common HAProxy configuration patterns:

  • HTTP mode (Layer 7) -- Sites configured with ACL-based routing using hdr(host) for domain matching, paired with use_backend directives that map to backend blocks containing server directives. This is the most common HAProxy setup for web traffic.
  • TCP passthrough (Layer 4) -- Sites using SNI-based routing with req_ssl_sni for pass-through SSL/TLS proxying. In this mode, the proxy forwards encrypted traffic without terminating SSL, which is used when you want the origin to handle its own certificates.

What the Parser Extracts

For each detected site, the parser extracts:

  • The domain name from the ACL rule (hdr(host) -i example.com or req_ssl_sni -i example.com)
  • The origin server(s) (IP and port) from the corresponding backend server directives
  • The mode (HTTP or TCP) from the backend block's mode setting
  • Whether SSL is handled upstream (TCP passthrough implies the origin manages SSL)

If multiple ACLs point to the same domain, the parser merges the origins into a single entry, avoiding duplicates.

Viewing Detected Sites

To see the detected sites for a server:

  1. Navigate to Dashboard -> Servers
  2. Click on the server that had an existing HAProxy configuration
  3. Select the Detected Sites tab

If the server had no existing HAProxy configuration at install time (it was a fresh server), the tab will show an empty state with hasConfig: false.

Each detected site shows the following information:

ColumnDescription
DomainThe domain name extracted from the HAProxy ACL rules
OriginThe origin server IP and port (or multiple origins if the backend had several server lines)
ModeHTTP (Layer 7, hdr(host) routing) or TCP Passthrough (Layer 4, req_ssl_sni routing)
Status"Already Managed" badge if the domain already exists in Lumos, or a checkbox for import

Note: The detected sites list is generated from the HAProxy configuration backup taken at installation time. If you modified HAProxy manually after installing the agent, those changes will not be reflected here. The detection is a one-time snapshot, not a live sync.

Importing Sites

To import detected sites into Lumos:

  1. Select the sites you want to import using the checkboxes (sites marked "Already Managed" cannot be selected)
  2. Click Import Selected
  3. Review the import summary showing how many domains will be created
  4. Confirm the import

Batch Limit

You can import up to 50 domains in a single batch. If you have more than 50 detected sites, import them in multiple batches.

What Happens During Import

For each imported site, Lumos:

  1. Creates a domain record with the detected domain name, origin IP(s), and port(s)
  2. Assigns the domain to the current shield server
  3. Verifies the import against your plan limits (the check runs inside a database transaction to prevent race conditions)
  4. Pushes the new configuration to the agent via the real-time config pipeline (Dashboard -> WebSocket Server -> Agent)
  5. The agent regenerates the HAProxy configuration with the imported domains included
  6. HAProxy reloads with the updated configuration

The import processes domains sequentially. Each domain is validated individually, and the results summary shows which domains succeeded and which failed.

Import Results

After import, you receive a detailed results summary:

FieldDescription
importedNumber of domains successfully imported
totalTotal number of domains you attempted to import
resultsPer-domain breakdown with success/failure status and error messages

Possible per-domain errors:

  • Validation error -- The domain or origin format is invalid. Check the domain name and origin IP/port.
  • Domain already exists -- The domain is already in your Lumos account (added manually or imported previously).
  • Unexpected error -- A database or system error occurred. Try again or contact support.

After Import

Once sites are imported, they behave exactly like domains added through the dashboard:

Important: After importing, you still need to update your DNS records if they do not already point to the shield VPS. The import only creates the domain configuration inside Lumos -- it does not modify DNS.

Plan Limits

All plans include unlimited domains, so there is no domain cap during import. However, the imported sites are assigned to the current shield server, and your plan limits the total number of servers you can have. If you need to assign imported sites to multiple servers, you will need the Pro plan or higher for multi-server support.

Already Managed Sites

If a detected domain is already managed by Lumos (you added it through the Domains page previously or imported it in an earlier batch), it is marked with an Already Managed badge and its checkbox is disabled. This comparison is case-insensitive, so Example.com and example.com are treated as the same domain. This prevents duplicate domain entries in your account.

Sites Not Detected

The parser handles standard HAProxy configuration patterns but may not detect all sites in complex or non-standard configurations. Sites may be missed if they use:

  • Map files for domain routing (use_backend %[req.hdr(host),lower,map(/etc/haproxy/maps/domains.map)]) instead of inline ACL + use_backend pairs
  • Lua-based routing logic where domain matching is handled in Lua scripts rather than ACL directives
  • Non-standard ACL patterns that do not match the common hdr(host) -i or req_ssl_sni -i formats
  • Listen blocks with embedded routing (the parser focuses on frontend + backend block pairs)
  • Configurations generated by other management tools (e.g., Certbot, Ansible templates) with unusual formatting or comments that break pattern matching

If a site is not detected automatically, you can add it manually through Dashboard -> Domains -> Add Domain. See the Domain Management guide for instructions. You will need the domain name, origin IP, and origin port -- all of which you can find in your original HAProxy configuration file.

Tip: You can view the original HAProxy backup on the server at /etc/haproxy/haproxy.cfg.lumos-backup to manually extract any missed configurations:

cat /etc/haproxy/haproxy.cfg.lumos-backup

Backup Preservation

The original HAProxy backup is preserved at /etc/haproxy/haproxy.cfg.lumos-backup on the VPS for as long as the agent is installed. This backup serves two purposes:

  1. Detected sites source -- The dashboard reads from this stored backup to populate the Detected Sites tab
  2. Rollback safety net -- If you ever need to revert to the pre-Lumos configuration, the uninstall process will validate this backup with haproxy -c -f before restoring it, ensuring you do not restore a broken configuration

Warning: Do not delete or modify the backup file at /etc/haproxy/haproxy.cfg.lumos-backup. It is needed for both the detected sites feature and for safe uninstallation.

Frozen Accounts

If your account is frozen due to insufficient balance, you cannot import detected sites. The import endpoint requires an active account. Deposit credits to unfreeze your account before importing. However, you can still view detected sites on a frozen account -- only the import action is blocked.

Next Steps

  • Domain Management -- Learn how to configure and manage imported domains
  • SSL/TLS -- Enable automatic HTTPS on your imported sites
  • DNS Setup -- Point your domain DNS records to the shield VPS
  • WAF -- Protect imported sites with firewall rules
  • Agent Installation -- Details on the install process and backup handling
  • Plans -- Compare plan features and server limits
  • Multiple Servers -- Assign imported domains to additional shield servers