This page covers the current version of Realtime. For the original Workspace Settings–based channels, see Realtime (Legacy).
Realtime servers
A realtime server is what a client opens a websocket connection to. It’s the Realtime equivalent of an API group: a named container that holds channels, has its own settings, and — most importantly — has its own connection address, called its canonical. You can create as many realtime servers in a workspace as you need. Each one is independent:- Its own canonical, so clients connect to exactly the surface you intend
- Its own channels and their access rules
- Its own connect and disconnect triggers
Finding Realtime in your workspace
1
Open the Realtime section
In the left side navigation of your workspace, click Realtime. The landing page is the Realtime Servers list.If you don’t see the entry, your role doesn’t have Read on the Workspace Realtime Features permission — the nav item isn’t rendered at all without it. See Access Control.2
Create a server
Use New Server from the Realtime nav entry’s create dropdown, or the primary action on the server list.Canonicals may contain letters, numbers, dashes, and underscores; they must be unique, can’t be a reserved value, and can’t containmvp-. Leave it blank when creating and Xano generates one for you.3
Add channels and messages
Open a server and use Add Channel; open a channel and use Add Message. Every one of these panels has a XanoScript toggle that swaps the guided form for a script editor.Finding the connection address
The canonical is shown in three places:In XanoScript
XanoScript
canonical is also accepted as a clause — omit it when creating and the platform generates one.
For a complete native WebSocket example, including the V2 URL and join acknowledgement, see Connecting a Client.
Channels
A channel is what a client joins once it’s connected. It’s the Realtime equivalent of an API route, and like a route it’s addressed by a path template:Channel path template
rooms/42 matches this channel.
Path template rules
- Letters, numbers, dashes, underscores, slashes, and
{curly params} - Every
{param}needs a matching typed entry in the channel’sinputblock. The builder enforces this and offers an Add missing button when a parameter has no declaration. - Names beginning with
_are reserved for platform lifecycle handlers.
Typed path parameters
Declare a type for each path parameter in the channel input schema:
The schema declaration does not mean that every representation of the path parameter is already coerced to that type. In dev validation, both the join acknowledgement’s
payload.params and realtime.get_session’s params contained {room_id: "42"} — a string — even though the channel declared int room_id.
Treat path values from acknowledgement and session objects as transport values. Validate or convert them before numeric comparisons or database use. Message payload validation is a separate boundary; see Messages.
In XanoScript
A channel declares which server it belongs to by name. The path is unique only within its server.XanoScript
realtime_server is the only required clause. Enable and disable a channel from the builder rather than in script.
Channel settings
What these mean for security is covered in Access Control.
Delivery guarantees
The guarantee is a channel setting — every delivery on the channel uses it. (Which clients receive a given message is chosen per message, withdeliver_to.)
delivery.per_recipient tracks delivery for each recipient individually rather than treating the publish as a single fire-and-forget event.
Match the guarantee to the channel’s traffic. A cursor position or a presence ping is fine at
at_most_once — the next one is along shortly. Chat messages or order status changes usually want at_least_once.Conversation transcript
A channel can keep a client-visible conversation transcript — recent messages available to a client that joins later. It’s bounded two ways:
This is what makes “open the chat and see what was said before I got here” a channel setting rather than something you build from scratch. If you need durable history beyond the transcript window — a permanent record you can query, page through, and report on — write messages to a database table from the message’s function stack, exactly as you would in an API endpoint.
Next steps
Messages
Define the handlers clients invoke on a channel.
Access Control
Decide who can connect, join, publish, and receive.