Ports, TLS, and firewalls

Configure HTTPS/WSS, native TCP, certificates, and an SSH tunnel.

On this page

Default ports and paths

EndpointDefaultUse
HTTPS / WSSTCP 8191Browser assets and browser/native WSS connections
WSS upgrade path/transportViewer WebSocket transport
Native TLS / TCPTCP 4815Native viewer with --use-tcp
Session administrationLocal OS endpointPrivileged tmdtool operations; not a public TCP service

Allow the selected transport through every relevant host firewall, router, cloud security group, and access policy. A local installation rule does not configure an external network device. Keep remote administration access available while changing firewall rules.

Firewall examples

For an already enabled Ubuntu UFW firewall, restrict WSS to a trusted client subnet. Replace this documentation subnet:

sudo ufw allow from 192.0.2.0/24 to any port 8191 proto tcp
sudo ufw status

Add a TCP 4815 rule only if using native TCP. If enabling UFW for the first time over SSH, allow your SSH access before enabling the firewall.

The Windows MSI can create exceptions for the default ports or defer setup. On macOS, review host firewall policy and external network rules separately. If you change a listener port, update rules and viewer addresses together.

Change listener settings

On Linux/macOS, merge into /etc/tmd/server/tmd.conf:

[transport]
wss-enable = 1
wss-port = 8191
wss-path = /transport
tcp-port = 4815

Values above show the defaults. Windows service equivalents are under the transport subkey of its service registry. Apply configuration during a maintenance window.

Configure TLS certificates

TMD generates a self-signed certificate by default. For managed deployments, supply a PEM server certificate and matching private key, issued for the DNS name used by viewers. Merge these settings, replacing the example paths:

[security]
self-signed-certificate = /etc/tmd/server/tmd.example.com.crt
private-key = /etc/tmd/server/tmd.example.com.key
authentication-method = system

The historical setting name self-signed-certificate is also used to supply your certificate file. Keep the private key readable only by the required service account/administrators. Both files must exist; check startup and the certificate actually presented after restarting. A missing configured file can cause fallback to the generated certificate.

HTTPS is required for the browser viewer's secure-context capabilities, including clipboard and WebCodecs. Browser trust exceptions are per profile/origin; verify the host identity before accepting one.

Test through an SSH tunnel

From the client machine, on a Linux/macOS server with SSH access:

ssh -N -L 8191:127.0.0.1:8191 alice@tmd.example.com

Then connect to https://localhost:8191/#console or #work. A certificate issued only for the server name will not match localhost; verify the expected endpoint rather than interpreting this as a different server. Close the SSH process when the test is complete.

Verify connectivity in order

  1. Confirm the service and intended listener are running.
  2. Confirm the requested TMD session reports active.
  3. Test reachability from the actual client network.
  4. Verify TLS identity and trust.
  5. Check system authentication and session ownership.
  6. Only then investigate codecs or capture if the connected desktop is wrong.

On Linux:

sudo ss -ltnp | grep -E ':4815|:8191'
sudo tmdtool list-sessions --json

A failed TLS handshake before certificate acceptance does not by itself indicate a capture failure. Use both server and viewer logs to place the failure in the connection sequence.