This repository provides a distro-agnostic, POSIX-compliant shell script (install.sh) to install and update Kasm Workspaces safely and consistently.
- ✅ POSIX-compliant: Works with
/bin/sh(dash-safe). - ✅ Distro-agnostic: Supports Debian/Ubuntu, RHEL/Fedora, CentOS, openSUSE, and Arch Linux.
- ✅ No
curl | sh: All downloads are verified with SHA-256. - ✅ No
docker.iopackage: Installs official Docker Engine instead of distro-shipped variants. - ✅ Safe upgrades: Re-running the script upgrades Kasm without breaking existing installs.
- ✅ Custom port: Defaults to port 64301, suitable for reverse proxy setups.
- Root privileges (
sudo) for package installation and Docker setup. - Supported package manager:
apt(Debian/Ubuntu)dnf(Fedora/RHEL)yum(CentOS 7)zypper(openSUSE)pacman(Arch Linux)
The script will install missing prerequisites automatically.
git clone https://github.com/scriptmgr/kasmweb.git
cd kasmwebchmod +x install.shsudo ./install.sh- On first run, it performs a fresh install.
- On subsequent runs, it performs a safe upgrade.
| Variable | Default | Description |
|---|---|---|
KASM_PORT |
64301 |
The internal port Kasm listens on (for reverse proxy). |
WORKDIR |
/tmp/kasmweb |
Temporary working directory. |
CACHE_DIR |
/var/cache/kasmweb |
Cache for downloaded release bundles. |
KASM_RELEASE_URL |
(auto) | Override with a fixed release tarball URL. |
KASM_RELEASE_SHA |
(auto) | SHA-256 of pinned release, if overriding URL. |
Set these as environment variables when running the script:
sudo KASM_PORT=12345 ./install.shA minimal Nginx configuration (TLS termination handled by Nginx):
server {
listen 443 ssl http2;
server_name kasm.example.com;
ssl_certificate /etc/letsencrypt/live/kasm.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/kasm.example.com/privkey.pem;
location / {
proxy_pass https://127.0.0.1:64301;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
}To update Kasm Workspaces, simply re-run:
sudo ./install.shThe script will:
- Discover the latest release.
- Download and verify the tarball.
- Run the automated upgrade script.
- Default admin credentials are shown at the end of installation.
- Docker service is enabled and started automatically.
- Script never pipes shell from
curland never installsdocker.io.
MIT License © 2025 ScriptMgr
Do you want me to also include reverse proxy snippets for Caddy and Apache, so the README is more complete for users who don’t use Nginx? `