No worries. I can give you a rough sketch:
To start with, try deploying the image locally (makes debugging easier). Follow the “docker cli” instructions on https://hub.docker.com/r/linuxserver/kasm.
Once you get that working, the basic command to deploy the image to Fly is fly launch --image linuxserver/kasm
, but there are complications:
-
The image starts a setup wizard on port 3000 for setting passwords etc. You’ll need to access that wizard using port forwarding (fly proxy), or find a way to automate the setup (see here for how the wizard sets the passwords).
-
Kasm only supports HTTPS out of the box (issue), which is a pain because the normal setup on Fly is to have Fly do the the TLS termination and talk to your app using HTTP. Some options:
(a) As a temporary hack, usefly proxy
to access Kasm’s port 443 directly, as with the wizard.
(b) Run a reverse proxy that listens on port 8080 for HTTP connections and forwards them to port 443 using HTTPS; see using Kasm’s reverse proxy configuration.
(c) Disable SSL by modifying the image. See the linked issue for some helpful comments. -
You’ll want to use persistent volumes, because anything outside a persistent volume will be lost when the Fly VM restarts. Based on the image documentation it looks like
/opt
should be on a persistent volume, and I’m guessing Kasm’s PostgreSQL database (which has the passwords etc.) will also need to be on a persistent volume.
When you get stuck, post the full steps you used and the full error messages.