Skip to main content

Overview

Wings supports HTTPS for its API server through two methods:
  1. Automatic TLS with Let’s Encrypt - Automatic certificate generation and renewal
  2. Manual TLS - Use your own SSL certificates

Automatic TLS with Let’s Encrypt

Wings can automatically obtain and renew SSL certificates from Let’s Encrypt using the ACME protocol.

Requirements

  • Valid domain name pointing to your Wings server
  • Port 80 (HTTP) accessible for ACME challenges
  • Port 443 (HTTPS) available for Wings API

Configuration

Auto-TLS is configured via command-line flags, not the configuration file:
Flags:
  • --auto-tls - Enable automatic TLS
  • --tls-hostname - FQDN for the SSL certificate (required with --auto-tls)

How It Works

  1. Wings starts and listens on port 443 for HTTPS
  2. An HTTP server starts on port 80 for ACME challenges
  3. Let’s Encrypt validates domain ownership via HTTP-01 challenge
  4. Certificate is automatically generated and stored
  5. Certificates are automatically renewed before expiration

Certificate Storage

Certificates are cached in:
This directory is created automatically within the configured root directory.

Systemd Service Configuration

To use auto-TLS with systemd, modify your Wings service file:
Reload and restart:

Firewall Configuration

Ensure ports 80 and 443 are accessible: UFW:
FirewallD:
iptables:

Manual TLS Configuration

If you prefer to manage your own SSL certificates, configure manual TLS in the configuration file.

Configuration

Options:
  • enabled - Set to true to enable SSL
  • cert - Path to certificate file (PEM format)
  • key - Path to private key file (PEM format)

Certificate Requirements

  • Format: PEM encoded
  • Certificate: Full certificate chain (including intermediates)
  • Private Key: Unencrypted private key
  • Permissions: Readable by the Wings process (typically root)

Using Let’s Encrypt Certificates Manually

If you have Let’s Encrypt certificates from another source:

Using Custom Certificates

For certificates from a commercial CA or internal CA:

Certificate Renewal

With manual TLS, you’re responsible for certificate renewal:
  1. Renew your certificate through your CA or certbot
  2. Replace the certificate files
  3. Restart Wings:

TLS Configuration Details

Wings uses secure TLS defaults regardless of automatic or manual configuration:

Supported Protocols

  • Minimum: TLS 1.2
  • Maximum: TLS 1.3

Cipher Suites

Curve Preferences

  • X25519
  • P-256

HTTP/2 Support

Wings supports HTTP/2 when TLS is enabled:

Running Without SSL

For development or when using a reverse proxy, you can run Wings without SSL:
Running without SSL in production is not recommended. Use a reverse proxy like Nginx or Caddy if Wings itself won’t handle SSL.

Reverse Proxy Configuration

If using a reverse proxy for SSL termination, Wings should run without SSL:

Wings Configuration

Nginx Example

Caddy Example

Caddy automatically handles SSL certificate generation and renewal.

Troubleshooting

Auto-TLS Issues

Port 80 Already in Use

Solution: Another service is using port 80. Stop it or use manual TLS.

Domain Validation Fails

Causes:
  • Domain doesn’t point to your server
  • Port 80 blocked by firewall
  • DNS propagation not complete
Solution:
  1. Verify DNS: dig wings.example.com
  2. Check firewall rules
  3. Wait for DNS propagation (up to 48 hours)

Manual TLS Issues

Certificate Not Found

Solution: Verify certificate paths and file permissions.

Permission Denied

Solution: Ensure Wings (running as root) can read the certificate files:

Certificate/Key Mismatch

Solution: Ensure the certificate and private key are from the same certificate request.

Verification

Test your SSL configuration:
Check certificate details:
Online SSL test:

Security Best Practices

  1. Always use SSL/TLS in production - Even behind a reverse proxy
  2. Keep certificates updated - Monitor expiration dates
  3. Use strong ciphers - Wings defaults are secure
  4. Enable HTTP/2 - Automatically enabled with TLS
  5. Secure private keys - Restrict permissions (600)
  6. Use HSTS - Configure on reverse proxy if applicable

Comparison: Auto-TLS vs Manual TLS

SSL/TLS configuration works alongside:
  • API host/port settings - Where Wings listens
  • Trusted proxies - For X-Forwarded headers
  • CORS settings - Cross-origin requests
  • Panel configuration - Must match Wings URL