Request links need the server and web client images at 1.11.0
or later, and Floe Desktop 0.3.0 or later. Codes and share links work the same whether request
links are on or off.
The short version
Put{"requestLinks": true} in a file, mount its folder into the server container, and name the
file in POLICY_FILE. The server reads the file every 60 seconds, so turning links off again is an
edit, not a restart. Unless your instance is on one domain, also tell every Floe Desktop that uses
it where your web app is.
Turn request links on
These steps are for the Docker Compose stack. They need thedocker-compose.yml from v1.11.0 or later, which passes POLICY_FILE to the server. An older copy
leaves it out without a word, and /health keeps listing no features (see
Moving to 1.11.0). For a server run with Node directly,
see Without Docker. On Unraid, the variable and the folder are both template
fields: see Unraid.
1
Create the policy file
Next to The server runs as the unprivileged user
docker-compose.yml:Terminal
node, not as root, so that user has to be able to
read the folder and the file. A file it cannot read counts as unreadable, and request links stay
off.2
Mount the folder and name the file
In Then, in Mount the folder, not the file. Turning links on or off later puts a new file in place of the
old one, and a mount of the single file keeps showing the old one.
docker-compose.yml, uncomment the server’s volumes example:docker-compose.yml
.env:.env
3
Recreate the server and check
Terminal
"features":["request-1"], and the server’s log has one line,
request links: on. If the log says policy file not found, request links off instead, the
folder is not mounted or the path is wrong.4
Point Floe Desktop at the web client
Floe Desktop builds each link from its Share link address setting. When that is blank, it
builds the link from Server address, where
http://localhost:3001 becomes
http://localhost:3000 and any other address is used as it is. The link has to open your web
client, which serves the page a sender sees. In Floe Desktop, open Settings and, under
Advanced, expand Server, then set the field for your layout:Wherever the table says to fill it in, a link built from the server address opens a page the
signaling server does not serve. Every Floe Desktop that uses
your server needs this setting, so hand it out together with the server address. A link that
is already open keeps the address it was made with.To check, choose Receive, then Request link, click Make link, and open the link in
Chrome or Edge on a computer: the page reads “SEND FILES THROUGH THIS LINK”.
Without Docker
A server started with Node readsPOLICY_FILE from its environment, or from server/.env when you
start it from the server/ folder. Put the file in any folder the server’s user can read, and give
the absolute path:
Terminal
server/.env
/health as in step 3. The restart is needed only this once: the
server reads the path at startup, and the file’s content every 60 seconds after that.
Turn request links on or off later
No restart is needed. Write the new content to a temporary file and rename it over the old one, rather than editing the file in place, so the server never reads a half-written file:Terminal
request links: off (or request links: on), and
/health follows.
Turning request links off ends every link that is waiting for a sender. Floe Desktop shows “Request
links are off on this server” on such a link, and a sender who tries it sees “Request links are
turned off right now”.
Two kinds of link are left alone: one whose drop is under way, which is left to finish, and one
whose request is on its owner’s screen or was declined. If the owner of a declined link then clicks
Keep waiting while links are off, that link ends too, with the same message. A server image of
version 1.11.0 or earlier leaves that link waiting with no sender able to reach it, until request
links are on again or the owner’s Floe Desktop reconnects.
Turning them back on does not bring ended links back, so each owner makes a new link. A link that
was ended this way while its Floe Desktop was connected answers “This link has ended” for 24 hours.
How the server reads the file
- Only
true, the JSON boolean, turns request links on."true"in quotes, any other value, and a missingrequestLinkskey all mean off. Other keys are ignored. - The server cannot use a file that it cannot read, that is not a JSON object, or that is larger than 64 KB. A folder or any other thing that is not a plain file at the path counts the same way.
- Then the server keeps its last good setting and logs
policy file unreadable, keeping previous policyonce, until the file reads cleanly again. A server that has read no good file since it started stays off. - A missing file means off, even if request links were on. While a set
POLICY_FILEstays missing, the server logspolicy file not found, request links offonce. - UTF-8 works, and so does the UTF-16 that Windows PowerShell writes by default (little-endian, with a byte-order mark). Any other encoding, such as UTF-16 big-endian or UTF-16 without a mark, counts as unreadable.
- The path in
POLICY_FILEis read once, when the server starts. Pointing it at another file takesdocker compose up -d, or a restart without Docker.
Limits
The server keeps three counts, each per network or for the whole server. A network is one IPv4 address, or one IPv6 /64.
These limits are fixed in the server and have no setting. What Floe Desktop shows at each one is in
What Floe Desktop shows. A link that ends frees its place among the open
ones but still counts toward the 20, and a restart clears all three counts. Behind a
reverse proxy, set
TRUSTED_PROXY_COUNT to match it (see
Configuration), or every user counts as the same
network.
Two more fixed guards protect an open link. One connection can ask to join at most 30 times a
minute, and one link lets a sender connect at most 6 times in any minute. A request past the first
is dropped without an answer, and one past the second is answered as if the link were taken.
Neither is logged.
The limits a link’s owner meets, such as how long a link lasts, are in
Request links.
Keep the client and server on one version
The page a sender opens comes from the web client, not from the signaling server, so run the two images at the same version. Compose does that by default, becauseFLOE_IMAGE_TAG picks both. An
older client in front of a newer server lets Floe Desktop make links whose page does not exist.
How the server holds a request link’s room is described in
Architecture.
Sending to a link on your server
In a browser, a sender opens the link and nothing else is needed. See Sending through a request link for what the page does and which browsers it supports. From the CLI, a sender has to name your signaling server as well as the link, with--server or FLOE_SERVER. Without it the send ends with
Couldn't connect to their computer. Nothing was sent. before it contacts any server. See
floe send.
The page a sender opens shows Report this link only when you give the web client an address for
reports, in REQUEST_REPORT_EMAIL: under
Compose, a line in .env and a docker-compose.yml from 1.11.1 or later (an older copy does not
pass the variable on), then docker compose up -d. The link then starts an email to that
address, carrying the link’s id and never the part after the #. Without an address the page shows
no report link, so tell the people you share links with how to reach you. The variable needs a web
client newer than version 1.11.0: see
What an older web app shows. The one switch you
have is the policy file, which ends every waiting link at once.
What Floe Desktop shows
Request link always shows under Receive in Floe Desktop, whatever the server offers. The app asks the server nothing until someone clicks Make link, which first checks that/health lists
request-1 in its features.
Every other message on a link’s own screen is in
Request links.
If something goes wrong
- A link opens a page that is not Floe’s send page: Share link address is blank, or names the signaling server, where step 4 says to fill it in. See The link opens a page that is not Floe’s send page.
- Make link answers “Request links are off on this server”: see Request links are off on this server.
- Make link answers “This Floe server doesn’t offer request links”: the server predates them. See This Floe server doesn’t offer request links.
- A sender sees “Their computer is not connected right now” after you restarted the server: see Their computer is not connected right now.