Skip to content

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 the docker-compose plugin must be version 1.52 or higher.

  • System Resources: A swap size of at least 8192 MB 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.crt and kasm_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

  1. The system packages are updated via apt.

  2. A specific version of Docker CE is installed and held to prevent unintended upgrades.

  3. An official Kasm installation archive (kasm_release_1.17.0.bbc15c.tar.gz) is downloaded and extracted in the /root directory.

  4. The install.sh script is executed from within the /root/kasm_release directory with the following parameters:

  5. --admin-password: Set via system credentials.

  6. --user-password: Set via system credentials.

  7. --public-hostname: Configured as kasm{Server_ID_from_Invapi}.hostkey.in.

  8. --accept-eula: Accepted automatically.

  9. --no-images, --no-check-ports, --no-check-disk: Bypasses standard checks during the automated setup.

  10. --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 3000 are open for incoming traffic.

  • SSL/TLS: SSL certificates are obtained via Certbot using the --standalone method 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/kasm and /data/kasm/profiles are restricted with 0640 permissions, owned by root.

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.sh script 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:

    docker compose pull && docker compose up -d
    

  • Script-based installations: Re-run the installation script from the /root/kasm_release directory.

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:

    /opt/kasm/bin/stop
    

  • To start the application:

    /opt/kasm/bin/start
    

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×