Client Releases
The instance hosts the installers of the desktop client and tells installed clients when a newer one exists. People download from Settings → Desktop client; installed clients ask the update feed on their own, every few minutes.
What people see
Settings → Desktop client is open to every signed-in account. It shows, for
Windows, macOS and Linux, the current stable build: its version, size, release
notes and SHA-256, and a Download button, with what the platform needs to open each kind of
access entry (the SSH client, a VNC viewer, Remmina on Linux) and, on Linux, the apt install
command for the file. A platform with nothing published says so.
Administrators also see every release, beta builds included, and can:
- Offer this release. Marks it as the one clients are offered for its platform and channel. The mark moves: there is only ever one per platform and channel.
- Stop offering. Takes the mark off. Clients are told there is nothing newer.
- Edit notes and channel. Changes the release notes (Markdown, shown here and in the update prompt) or moves the release to the other channel; a moved release is not offered in either until it is marked there, and a version that already exists in that channel is refused.
- Delete. Removes the row and the installer file. Installed clients keep working. If the release was the one on offer, no other release takes over; mark another one.
The page follows the server live, so a build published by the release workflow appears in open browsers without a reload.
Publishing a build
An installer is published with one call per platform, POST /api/admin/client-releases, made with an administrator's token. Two things make
it:
-
The release workflow (
.github/workflows/release.yml) builds all three platforms for a tagclient-v<version>and publishes the results. The tag has to name theclientVersioninpackage.json. Set the repository secretSELVARA_UPLOAD_TOKENto a token of an administrator (Profile → API tokens) and the variableSELVARA_URLto this instance's address. -
A script, for a build made by hand:
SELVARA_UPLOAD_TOKEN=selv_... npm run client:release:upload -- \--url https://app.example.com --channel beta \windows=Setup.exe linux=selvara_3.0.0_amd64.deb macos=Selvara.dmg--versiondefaults toclientVersioninpackage.json.--no-latestpublishes without offering the build.
A release is one installer for one platform of one version and channel:
| Field | Meaning |
|---|---|
file | The installer. At most 500 MB. Windows takes .exe and .msi, macOS .dmg and .pkg, Linux .deb, .AppImage and .tar.gz; anything else is refused with 422. |
version | Three numbers, 3.0.0. |
channel | stable or beta. |
platform | windows, macos or linux. |
notes | Optional release notes, up to 10,000 characters. |
is_latest | true to offer it at once. Without it the release is published and not offered. |
The server stores the file as Selvara-<version>-<platform>.<ext> (with
-beta after the version for the beta channel), whatever it was called on the
way in, and records its SHA-256 and size while the file arrives. Releases stored
before the name changed keep the name they were stored under and stay
downloadable. Publishing a
version, channel and platform that already exists answers 409 and changes
nothing, so a failed run of the workflow can simply be started again. To replace
a build, delete it first.
Beta builds are offered only to clients that have chosen the beta channel in their settings.
The installers
The workflow builds one installer per platform from client/:
| Platform | Installer | Notes |
|---|---|---|
| Windows | SelvaraSetup-<version>.exe | Inno Setup. Installs for the current person without an administrator prompt; /ALLUSERS installs for the machine. |
| Linux | a .deb package | The package is called rcm-desktop, so apt upgrade carries an installed app over. A tarball with an install.sh is built next to it. |
| macOS | Selvara-<version>.dmg | Not signed or notarized: after an update macOS may ask for the usual confirmation on first launch. |
The program is rcm.exe and the macOS bundle id is de.hillerdaniel.rcm. These
identify the installation: they are what lets an installed app update in place and
keep its settings (rcm_prefs.json, the SSH include rcm_config, window position,
hotkeys), and they keep rcm:// links working. Do not change them, nor the
Windows installer's application id or the Linux package name.
The Windows installer names its shortcuts, on the desktop and in the Start menu, Selvara Desktop, and removes the Selvara RCM ones of earlier versions. The app shows the signed-in person's profile picture, and its tray icon follows the system theme, light or dark, as the taskbar does.
What installed clients ask
GET /api/updates/latest?platform=windows&channel=stable¤t=3.0.0 needs no
sign-in. The answer is a plain object, not the { success, data } envelope,
because installed clients read it that way:
{
"available": true,
"product": "client",
"version": "3.1.0",
"channel": "stable",
"platform": "windows",
"downloadUrl": "https://app.example.com/downloads/Selvara-3.1.0-windows.exe",
"sha256": "…",
"sizeBytes": 61234567,
"publishedAt": 1791124486143,
"notesUrl": "https://app.example.com/settings/client",
"notes": "…"
}
When no release is on offer, or current is the offered version or newer, the
answer is {"available": false}, with latestVersion added in the second case.
downloadUrl is built from AUTH_URL; the client downloads the file and checks
the SHA-256 before it runs it. /downloads/<file> is open too, and serves only
files that a release names, always as a download.
Where the files are
All installers sit in one directory, CLIENT_RELEASES_DIR (/data/client-releases
in the image), which the shipped compose file mounts as the volume
client_releases. The table client_releases says what each file is; a file
without a row is never served.
- Back the volume up with the database. A restored database whose volume
is empty lists releases whose files are gone: downloads answer
404. Publish those versions again after deleting the stale rows. - If you keep your own compose file, copy the volume and the app's
CLIENT_RELEASES_DIRfrom the shipped one. Without a volume the installers disappear with the container.
Behind a reverse proxy
The upload is up to 500 MB in one request. Caddy and Traefik pass it as it is; nginx refuses bodies over 1 MB unless told otherwise:
location /api/admin/client-releases {
client_max_body_size 600m;
proxy_request_buffering off;
proxy_pass http://127.0.0.1:3000;
}
The call is made by the workflow or by an administrator's script, so the limit can stay low everywhere else.
Why the client uses Flutter 3.44.9
The client is built with Flutter 3.44.9 and the build refuses any other version. Flutter 3.47 draws a black window on older graphics cards (those limited to Direct3D 11 feature level 10_0, for example some NVIDIA Quadro models): the app runs, the hotkeys work and the window stays black. The fix is upstream but not in a stable release yet.
- The pin is
environment: flutterinclient/pubspec.yaml; the workflow checks that it matchesFLUTTER_VERSIONinclient-build.yml. - To build by hand, keep the pinned SDK next to your daily one and call it by
full path, or point the build scripts at it with
FLUTTER_BIN. - Before every release, and whenever a new Flutter stable ships, check whether
the fix is in.
client/FLUTTER_PIN.mdhas the commands and what to change when the pin is lifted.
Audit
Publishing, changing and deleting a release write Client release published, changed and deleted to the audit log, with the version, channel, platform and, for a publication, the SHA-256. Downloads and update checks are not recorded.