CloudSignal Docs
Getting StartedFeatures

MQTT transports

Connect to CloudSignal over TLS for backends or WSS for browsers. Two encrypted transports, same MQTT protocol.

CloudSignal exposes the same MQTT 3.1.1 / 5.0 protocol over two transports. Both are encrypted with TLS 1.2 or higher. There is no unencrypted variant.

The two endpoints

TransportURLBest for
MQTT over TLSmqtts://mqtt.cloudsignal.app:8883Backend services, native MQTT clients, Node.js workers, Python services
MQTT over WSSwss://connect.cloudsignal.app:18885/Browser clients, mobile webviews, environments behind restrictive firewalls

Same broker, same credentials, same topics. Pick the transport that matches your runtime.

MQTT over TLS

Native MQTT over a TLS-encrypted TCP socket. Lowest overhead per message. Use this from anywhere your code can open a raw socket.

AspectValue
URLmqtts://mqtt.cloudsignal.app:8883
EncryptionTLS 1.2+
Best forBackend services, native MQTT clients, IoT gateways
OverheadLow (no HTTP framing)

Node.js (SDK)

import CloudSignal from '@cloudsignal/mqtt-client';

const client = new CloudSignal({ preset: 'server' });

await client.connectWithToken({
  organizationId: process.env.CLOUDSIGNAL_ORG_ID,
  secretKey: process.env.CLOUDSIGNAL_SECRET_KEY,
  userEmail: 'service@example.com',
});

Python (paho-mqtt)

import ssl
import paho.mqtt.client as mqtt

client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
client.username_pw_set('agent-01@org_k7xm4pqr2n5t', 'your-password')
client.tls_set(cert_reqs=ssl.CERT_REQUIRED)
client.connect('mqtt.cloudsignal.app', 8883)
client.loop_forever()

MQTT over WSS

MQTT framed inside WebSocket Secure. Required for browser clients (browsers can't open raw TCP). Also useful when corporate firewalls block non-HTTP egress, since WSS travels over the same TLS channel as https://.

AspectValue
URLwss://connect.cloudsignal.app:18885/
EncryptionTLS 1.2+ via WebSocket
Best forBrowsers, mobile webviews, firewalled environments
OverheadSlight WebSocket framing

Browser (SDK)

import CloudSignal from '@cloudsignal/mqtt-client';

const client = new CloudSignal({ preset: 'desktop' });

await client.connectWithToken({
  organizationId: process.env.NEXT_PUBLIC_CLOUDSIGNAL_ORG_ID,
  externalToken: session.access_token,
});

The SDK uses the WSS endpoint automatically in browser presets (desktop, mobile). You don't have to pass the host yourself.

Choosing a transport

You are buildingUse
Browser app, mobile webview, embed widgetWSS
Node.js / Python / Go backend, CLI toolTLS
Mobile native (iOS / Android)Either - SDKs default to WSS for compatibility
Serverless functionTLS (server-side runtimes can open raw sockets)
Gateway forwarding from non-MQTT devicesTLS

Both endpoints are encrypted and use the same authentication, ACL rules, and quota. You don't need to choose for security reasons - only for runtime compatibility.

Token authentication on both transports

Server-side tokens work identically over TLS and WSS. Mint a token on your backend, hand it to the client, and connect. The Token exchange API is transport-agnostic.


Next steps

On this page