Radiator Server Documentation — v10.34.2

listen

The listen block sets the HTTP listener addresses and ports. Add a tls block for HTTPS.

Basic Configuration

listen {
    protocol tcp;
    port 8000;
    ip 0.0.0.0;
}

Parameters

ParameterDescriptionRequired
protocolTransport protocol: tcpYes
portPort number to listen onConditional
ipIP address(es) to bind (can specify multiple)Conditional
addrCombined IP address and port, instead of ip and portConditional
bufferSocket buffer size in bytesNo
timeoutConnection idle timeoutNo
keepaliveTCP keepalive configurationNo
tlsTLS configuration block (required to enable TLS)Conditional

Configure the listener address with ip and port, or with addr.

TLS Configuration

Add a tls block to the TCP listener to enable encryption. Without it, the listener uses plaintext TCP. This applies to HTTP and TACACS+ listeners.

listen {
    protocol tcp;
    port 8443;
    ip 0.0.0.0;

    tls {
        certificate "SERVER_CERT";
        certificate_key "SERVER_KEY";
        require_client_certificate false;
    }
}

The TLS configuration enables HTTPS with HTTP/1.1 and HTTP/2 support. Certificate names reference certificates defined in the certificates block.

Multiple IP Addresses

You can bind to multiple IP addresses by specifying multiple ip statements:

listen {
    protocol tcp;
    port 8000;
    ip 10.0.0.1;     # Specific IPv4 address
    ip 2001:db8::1;  # Specific IPv6 address
}

To bind to all addresses, use ip 0.0.0.0; for IPv4 and ip ::; for IPv6. Do not combine these with specific addresses of the same IP version on the same port. The operating system rejects such overlapping bindings.

Example: HTTP with Timeout and Keepalive

listen {
    protocol tcp;
    port 8000;
    ip 0.0.0.0;

    # Close idle connections after 30 seconds
    timeout 30s;

    # TCP keepalive to detect dead connections
    keepalive {
        idle 60s;
        interval 10s;
        count 3;
    }
}

See Also