floe at your own Floe signaling server instead of
floe.one, for one command or for every command, and shows which links then work with which server.
It is for anyone who runs a self-hosted instance (see
Self-hosting overview) or was given the address of one.
Usage
Thefloe CLI connects to https://api.floe.one by default. Name another Floe
signaling server with the --server flag:
Terminal
Both sides must use the same server. A room and its code exist on one server
only, so someone on your server cannot transfer with someone on floe.one.
--server at the origin that serves /api and /ws. On a
one-domain deployment that is the same address your users open in a
browser, so this is all you need: the share link that floe send prints
opens the web client at the same address.
Write the address with its https://, or http:// on a private network: a bare hostname fails
before any transfer starts. floe trusts the certificates your system trusts and has no option to
skip that check. A server with a self-signed certificate therefore fails before any transfer
starts, with the certificate error at the end of the line. See
--server.
If you always use the same server, set it once in your environment instead of
repeating the flag on every command:
Terminal
FLOE_WEB the same way when your web app has its own hostname. See
CLI flags reference.
When the web client is on a different host
The browser link printed byfloe send defaults to the same origin as --server.
If your web client lives somewhere else, such as the two-subdomain layout, override
it with --web:
Terminal
--web, that split deployment prints a link pointing at the signaling
server, which serves no web app.
Links carry no server
floe never reads the server from a link. The server is always --server, then FLOE_SERVER,
then floe.one, so a link or a code works only when it belongs to the server in effect. A link from
the wrong server is refused before any network call, so its room is never handed to a server that
does not hold it:
For a link from your server with floe.one in effect,
floe receive prints:
Output
floe receive prints:
Output
floe send --to prints Couldn't connect to their computer. Nothing was sent. and
exits with status 1, as floe receive does.
floe receive in floe 1.11.0 and earlier did not refuse a link from your server when no server
was set: it asked floe.one for that room and ended with
Error: this code is no longer active; ask for a new one. The
link’s room id had then reached floe.one’s server, so ask the sender for a new link.
With FLOE_SERVER set, use a floe.one link by naming floe.one’s own server for that one command.
The flag wins over the variable:
Terminal
Request links on your server
A request link made by a Floe Desktop that uses your server carries your web app’s address. To send through it from the terminal,floe send --to needs your server named,
with --server or FLOE_SERVER:
Terminal
Couldn't connect to their computer. Nothing was sent. The server also has to offer request links,
which are off until you turn them on: see Turn on request links.
The link key behind the dot, in a link from Floe Desktop 1.1 or later, needs
floe 1.12 or later. The server needs nothing for it and never receives it, but your web client has
to read it: see
Keep the client and server on one version.
Local testing
To test against a local instance running on the default ports:Terminal
http://localhost:3000 automatically when the server is
http://localhost:3001.
Desktop app
The Floe desktop app can target a self-hosted server too. Open Settings, expand Server under Advanced, and put your origin in Server address, then click Test to confirm the app can reach it. Leave Share link address blank on a one-domain deployment: the app derives the share link from the server address using the same rule the CLI uses. Fill it in only when your web app has its own hostname. Use default server appears once a custom address is set and clears both fields back toapi.floe.one.
See Desktop app settings for what Test checks and what each
result means.
If something goes wrong
- A code from your server is
not found: the command ran without--serverorFLOE_SERVER, so it asked floe.one. Seenot found. Warning: could not reach signaling server for TURN credentials. Using STUN only., orcould not read TURN credentials: the address after--serveris wrong, the server is down, or a proxy in front of it does not pass/api/on. Seecould not reach signaling server.--relay-only needs a TURN relay: your server offers no relay. See--relay-only needs a TURN relay.