Deployment Overview of Kasm Workspaces on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Debian or Ubuntu (for script-based installation) or RHEL-based distributions.
-
Privileges: Root or sudo access is required for all installation steps.
-
Dependencies:
-
ca-certificates -
curl -
gnupg -
python3-pip -
python3-requests -
python3-docker -
Docker Requirements: A specific version of Docker CE (e.g.,
5:28.5.2-1~ubuntu.22.04~jammy) may be required on Ubuntu 22.04 systems to ensure compatibility, and thedocker-composeplugin must be version 1.52 or higher. -
System Resources: A swap size of at least
8192MB is configured during installation.
FQDN of the final panel on the hostkey.in domain¶
The application uses a specific subdomain pattern for access via the hostkey.in domain.
| Parameter | Value |
|---|---|
| Prefix | kasm |
| Domain | hostkey.in |
| Full template | kasm{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The application utilizes several directories for configuration, data persistence, and system management:
-
/opt/kasm: Main installation directory containing binaries and services. -
/opt/kasm/current/certs: Location of the active SSL certificates (kasm_nginx.crtandkasm_nginx.key). -
/data/kasm: Primary data storage for Kasm. -
/data/kasm/profiles: Dedicated directory for user profiles. -
/etc/docker/: Docker daemon configuration directory.
Application installation process¶
The installation method depends on the operating system:
Debian and Ubuntu Systems¶
-
The system packages are updated via
apt. -
A specific version of Docker CE is installed and held to prevent unintended upgrades.
-
An official Kasm installation archive (
kasm_release_1.17.0.bbc15c.tar.gz) is downloaded and extracted in the/rootdirectory. -
The
install.shscript is executed from within the/root/kasm_releasedirectory with the following parameters: -
--admin-password: Set via system credentials. -
--user-password: Set via system credentials. -
--public-hostname: Configured askasm{Server_ID_from_Invapi}.hostkey.in. -
--accept-eula: Accepted automatically. -
--no-images,--no-check-ports,--no-check-disk: Bypasses standard checks during the automated setup. -
--swap-size 8192: Configures swap space.
RHEL Systems¶
The application is deployed as a Docker container with specific volume mappings to ensure data persistence in /data/kasm.
Access Rights and Security¶
-
Firewall: Ensure that the configured Kasm port and port
3000are open for incoming traffic. -
SSL/TLS: SSL certificates are obtained via Certbot using the
--standalonemethod on the FQDN. The certificates are then moved from/etc/letsencrypt/live/to the Kasm certificate directory (/opt/kasm/current/certs/) to secure the Nginx proxy. -
User Permissions: Data directories like
/data/kasmand/data/kasm/profilesare restricted with0640permissions, owned byroot.
Databases¶
The application manages its own internal database services as part of the Kasm deployment suite; specific external connection details are managed within the containerized environment.
Docker Containers and Their Deployment¶
RHEL-based Deployment¶
| Container Name | Image | Ports | Volumes | Environment Variables | Restart Policy |
|---|---|---|---|---|---|
kasm | lscr.io/linuxserver/kasm:latest | 3000:3000, {kasm_port}:{kasm_port} | /data/kasm:/opt, /data/kasm/profiles:/profiles, /dev/input:/dev/input, /run/udev/data:/run/udev/data | KASM_PORT={kasm_port} | unless-stopped |
Custom Scripts and Additional Setup¶
-
Installation Script: The
./install.shscript is used to automate the core application setup, including user creation and service configuration. -
Certificate Management: A custom sequence of commands is used to stop Kasm services, issue SSL certificates via Certbot, back up existing Nginx certificates, and replace them with the newly issued Let's Encrypt certificates before restarting the services.
Application Update Instructions¶
To update the application:
-
Docker-based installations: Use the following command to pull the latest images and restart the containers:
-
Script-based installations: Re-run the installation script from the
/root/kasm_releasedirectory.
Location of configuration files and data¶
-
Application Data:
/data/kasm -
User Profiles:
/data/kasm/profiles -
Docker Configuration:
/etc/docker/daemon.json -
SSL Certificates:
/opt/kasm/current/certs/
Available ports for connection¶
-
3000: Default management/access port. -
{kasm_port}: The custom configured application port.
Starting and Stopping the application¶
The application services are managed via the Kasm binary tool:
-
To stop the application:
-
To start the application: