Kasm - Immutable Apps & VMs
Explore Kasm, a containerized virtual desktop platform offering secure, scalable, and disposable workspaces for testing, isolation, and remote use.
Ever wanted to spin up a virtual machine in seconds without worrying about cluttering your system? I've been using Kasm for years, and it has become one of those tools I can't live without, yet I realized I never properly highlighted it. Whether for sandboxing, running disposable virtual desktops, or creating throwaway environments for testing, Kasm streamlines everything. Let's dive deeper into what Kasm is and how you can get started.

What is Kasm?
Kasm is a containerized virtual desktop platform that provides on-demand, secure, and scalable workspaces directly through a web browser. Unlike traditional virtual machines that require heavy overhead, Kasm leverages Docker containers to deliver ephemeral (temporary) workspaces that can be spun up and destroyed with ease.
Think of Kasm as immutable virtual machines – lightweight, fast, and capable of running anything from full desktops to isolated web browsers. This means you can run tests, access remote environments, and even host development machines without worrying about persistence or contamination.
Key Benefits of Kasm:
- Security: Every workspace is isolated and can be wiped clean after each session.
- Efficiency: Minimal overhead compared to running full VMs.
- Scalability: Run multiple environments simultaneously without heavy resource consumption.
- Accessibility: Accessible from any browser – no need for complex RDP/VNC setups.
Why Use Kasm?
Here are a few real-world examples where Kasm shines:
- Testing and Development: Spin up disposable environments to test code or applications without risking your main OS.
- Browsing Isolation: Run a web browser in a sandbox to isolate sensitive sessions from your daily browsing.
- Security Research: Analyze malware or sketchy files without exposing your primary machine.
- Remote Workspaces: Deploy cloud-hosted environments accessible from anywhere.
- Education and Training: Set up disposable desktops for students that reset after each use.
Getting Started with Kasm
Ready to give Kasm a spin? Here’s a step-by-step guide to getting it up and running on Ubuntu.
VM Setup:
I recommend creating a VM with at least 8GB of RAM and a 50GB drive. This provides enough headroom for Kasm and any workspaces you’ll deploy.
Step 1: Create a Swap Partition
Ensure your VM has sufficient swap space to handle intensive workloads.
sudo dd if=/dev/zero bs=1M count=1024 of=/mnt/1GiB.swap
sudo chmod 600 /mnt/1GiB.swap
sudo mkswap /mnt/1GiB.swap
sudo swapon /mnt/1GiB.swap
This command creates a 1GB swap file and activates it, preventing your VM from crashing if memory runs low.
Step 2: Download and Install Kasm
Install Kasm directly from their official repository.
cd /tmp
curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.16.1.98d6fa.tar.gz
tar -xf kasm_release_1.16.1.98d6fa.tar.gz
sudo bash kasm_release/install.sh
The installation process will walk you through the basics and generate default administrator credentials.
Step 3: Accessing the Kasm Web Interface
Once installed, Kasm hosts a web interface on port 443.
- Log in using the default credentials shown during the install.
- Immediately change your password to secure your environment.
Access it by navigating to:https://<WEBAPP_SERVER>
Getting Started with KasmReady to give Kasm a spin? Here’s a step-by-step guide to getting it up and running on Ubuntu.
Step 1: Create a Swap Partition
Ensure your VM has sufficient swap space to handle intensive workloads.
sudo dd if=/dev/zero bs=1M count=1024 of=/mnt/1GiB.swap
sudo chmod 600 /mnt/1GiB.swap
sudo mkswap /mnt/1GiB.swap
sudo swapon /mnt/1GiB.swap
This command creates a 1GB swap file and activates it, preventing your VM from crashing if memory runs low.
Step 4: Adding Workspaces
Now for the fun part – adding virtual environments!
- Sign in to the web app.
- Click on your profile (top-right) and reset the admin password.
- Navigate to Workspaces > Add From Registry.
- Browse available workspaces and add whatever you need – Ubuntu, Kali, browsers, or even full desktops.
Advanced Configuration
- Resource Limits: Fine-tune RAM, CPU, and GPU allocations per workspace.
- Persistent Workspaces: If needed, you can enable persistence for specific use cases.
- Custom Images: Build custom Docker images and deploy them directly as workspaces.
- Snapshot Workspaces: Automatically revert to a clean state after each session.
Why Kasm Over Traditional VMs?
- Speed: Launches in seconds, compared to minutes for VMs.
- Low Overhead: Minimal resource consumption thanks to containerization.
- Immutability: Revert to pristine states instantly.
- Accessibility: No need for complex VPN or RDP setups. Just open a browser.