← All articles
a computer generated image of a network and a laptop

Kasm Workspaces: Self-Hosted Browser Isolation and Virtual Desktops

Security 2026-02-15 · 7 min read kasm browser-isolation virtual-desktop vdi remote-access docker security
By Selfhosted Guides Editorial TeamSelf-hosting practitioners covering open source software, home lab infrastructure, and data sovereignty.

Every time someone on your network visits a website, their browser executes arbitrary JavaScript from the internet on a machine connected to your internal network. Browser exploits, drive-by downloads, and credential phishing all start with that browser session. Enterprise solutions like Zscaler and Menlo Security address this with cloud-based browser isolation, but they cost a fortune and route your traffic through someone else's infrastructure.

Photo by Growtika on Unsplash

Kasm Workspaces is a self-hosted platform that runs browsers and full desktops inside Docker containers, streaming the display to users over HTTPS. The browser runs on your server, isolated from the user's machine and your internal network. If a malicious site exploits the browser, it compromises a disposable container -- not a workstation.

Kasm Workspaces browser isolation logo

What Kasm Actually Does

Kasm is a container orchestration platform optimized for streaming graphical applications. At its core:

  1. A user requests a workspace (browser, desktop, or application)
  2. Kasm spins up a Docker container with that application
  3. The container's display is streamed to the user's browser via KasmVNC (a fork of TigerVNC optimized for web streaming)
  4. When the user is done, the container is destroyed -- no persistent state, no leftover malware

This architecture supports three primary use cases:

Use Cases in Practice

Secure Browsing

The most immediate use case. Route risky web activity through Kasm:

Remote Work and BYOD

Give employees access to a full desktop environment without managing their hardware:

Development and Testing

Installation

Kasm requires a Linux host with Docker. The installer handles the rest.

System Requirements

Deployment CPU RAM Disk Notes
Single server (1-5 users) 4 cores 8 GB 50 GB SSD Minimum viable
Single server (10-20 users) 8 cores 32 GB 200 GB SSD Comfortable
Multi-server Scales horizontally Per-agent sizing Shared storage Production

Each workspace container uses roughly 500 MB to 1.5 GB of RAM depending on the image (browser sessions use less, full desktops use more).

Single-Server Install

# Download the latest release
cd /tmp
curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.16.0.06fdc8.tar.gz
tar xzf kasm_release_*.tar.gz

# Run the installer
cd kasm_release
sudo bash install.sh

The installer:

After installation, access the admin panel at https://your-server:443.

Docker Compose (Community Edition)

For a lighter deployment, Kasm offers a community edition that runs as a Docker Compose stack:

services:
  kasm:
    image: kasmweb/kasm:latest
    restart: unless-stopped
    ports:
      - "443:443"
    volumes:
      - kasm_data:/opt/kasm
    privileged: true
    environment:
      KASM_DEFAULT_ADMIN_PASSWORD: change-this-password

volumes:
  kasm_data:

Note: Kasm requires privileged mode because it manages Docker containers internally (containers within containers).

Reverse Proxy Considerations

Kasm uses WebSockets heavily for display streaming. Your reverse proxy must support:

Caddy configuration:

kasm.yourdomain.com {
    reverse_proxy localhost:443 {
        transport http {
            tls_insecure_skip_verify
        }
    }
}

For Nginx, ensure you include proxy_set_header Upgrade and Connection "upgrade" headers, and set proxy_read_timeout to at least 3600 seconds to keep long-lived display streams alive.

Like what you're reading? Subscribe to Self-Hosted Weekly — free weekly guides in your inbox.

Workspace Images

Kasm provides a registry of pre-built workspace images. The most commonly used:

Browsers

Image Description RAM Usage
kasmweb/firefox Firefox with privacy defaults ~500 MB
kasmweb/chrome Chromium-based browser ~600 MB
kasmweb/tor-browser Tor Browser for anonymous browsing ~500 MB
kasmweb/brave Brave browser ~550 MB

Desktops

Image Description RAM Usage
kasmweb/ubuntu-jammy-desktop Full Ubuntu 22.04 desktop ~1.2 GB
kasmweb/fedora-desktop Fedora with XFCE ~1 GB
kasmweb/kali-rolling-desktop Kali Linux for security testing ~1.5 GB
kasmweb/rocky-desktop Rocky Linux desktop ~1 GB

Applications

Image Description RAM Usage
kasmweb/vs-code Visual Studio Code ~800 MB
kasmweb/libre-office LibreOffice suite ~700 MB
kasmweb/gimp GIMP image editor ~600 MB
kasmweb/terminal Terminal-only workspace ~200 MB

Adding Custom Images

Build your own workspace images for specialized use cases:

FROM kasmweb/core-ubuntu-jammy:latest

USER root

# Install custom applications
RUN apt-get update && apt-get install -y \
    your-custom-app \
    additional-tools \
    && rm -rf /var/lib/apt/lists/*

# Copy configuration files
COPY --chown=1000:1000 config/ /home/kasm-user/.config/

USER 1000

Register the image in the Kasm admin panel under Workspaces > Add Workspace with the Docker image name, resource limits, and access policies.

Security Configuration

Network Isolation

The strongest security benefit of Kasm comes from network segmentation. Configure Docker networking so that workspace containers:

{
  "docker_network": "kasm_isolation",
  "dns_servers": ["1.1.1.1", "8.8.8.8"],
  "restrict_internal_network": true
}

In the Kasm admin panel under Settings > Docker, configure:

Session Policies

Configure per-group session policies:

For high-security environments, disable clipboard and file transfer. This creates a true air gap: users can see and interact with the browser, but data cannot leave the container.

Authentication

Kasm supports multiple authentication backends:

Audit Logging

Every session is logged:

Enable session recording to capture full video of what happened inside each workspace. This is valuable for compliance and incident investigation but consumes significant disk space.

Scaling and Performance

For larger deployments, Kasm separates into Web App, Manager, Agent, and Database components. Agents run on dedicated servers that host workspace containers -- each agent can handle 20-40 concurrent browser sessions or 10-20 full desktops depending on hardware. Kasm also supports auto-scaling agents in cloud environments (AWS, Azure, GCP) to match demand.

Set per-workspace resource limits to prevent a single session from consuming the entire server. The docker_shm_size setting is particularly important -- Chrome and Firefox use shared memory for tab rendering, and sessions will crash on complex pages if it is set too low (512 MB is a good default).

Backup and Recovery

Kasm stores configuration in PostgreSQL and session data ephemerally. For disaster recovery:

# Backup the database
docker exec kasm_db pg_dump -U kasmapp kasm \
  > /backup/kasm-db-$(date +%F).sql

# Backup the configuration directory
tar czf /backup/kasm-config-$(date +%F).tar.gz /opt/kasm/current/conf/

Workspace containers are ephemeral by design. No backup needed for session state unless you have persistent profiles enabled, in which case back up the profile storage volume.

Known Limitations

The Bottom Line

Kasm Workspaces solves a real security problem: browsers are the largest attack surface on any network, and isolating them in disposable containers eliminates an entire class of threats. The VDI and application streaming capabilities make it useful beyond just security -- remote access, BYOD environments, and consistent development setups all benefit.

The resource requirements are significant, so this is not a tool for everyone's homelab. But for anyone running a small business, managing a team, or dealing with compliance requirements, the ability to provide isolated browsing and controlled desktop access from a self-hosted platform is worth the hardware investment. You get the security of enterprise browser isolation without routing your traffic through a third party's cloud.

Get free weekly tips in your inbox. Subscribe to Self-Hosted Weekly