Kasm Workspaces
Resources
Installation
Creating A Swap Partition
- Swap should be approximately 1gb per concurrent session you expect to run at any given time. Please adjust according to your needs.
- Default is 1g.
This below is running with 10g, which runs 10 concurrent sessions.
sudo fallocate -l 10g /mnt/10GiB.swap
sudo chmod 600 /mnt/10GiB.swap
sudo mkswap /mnt/10GiB.swap
sudo swapon /mnt/10GiB.swap
Verify swap file exists
To make the swap file available on boot
Install
From this link you can obtain the Standard Install command which should contain the updated Kasm release. Single Server Installation — Kasm 1.14.0 documentation
cd /tmp
curl -O https://kasm-static-content.s3.amazonaws.com/KASM_release_1.14.0.3a7abb.tar.gz
tar -xf KASM_release_1.14.0.3a7abb.tar.gz
#If you want to install on default port 443 then run this command.
#If you want to install with non default port, check the next step
sudo bash KASM_release/install.sh -L 443
If you want to install with non default port then change the port number below 8443 to the desired port number.
Log into the Web Application running on port 443 at https://
The Default usernames are admin@kasm.local and user@kasm.local.
The passwords will be randomly generated and presented at the end of the install unless the --admin-password
or/and --user-password
are specified.
Kasm Cert Install
#Stop the Kasm Services
sudo /opt/kasm/bin/stop
#backup and then replace kasm_nginx.crt & kasm_nginx.key file
sudo cp /opt/kasm/current/certs/kasm_nginx.crt /opt/kasm/current/certs/kasm_nginx_backup.crt
sudo cp /opt/kasm/current/certs/kasm_nginx.key /opt/kasm/current/certs/kasm_nginx_backup.key
ls /opt/kasm/current/certs
#Insert value crt
nano /tmp/kasm_nginx_new.crt
#insert value key
nano /tmp/kasm_nginx_new.key
sudo cp /tmp/kasm_nginx_new.crt /opt/kasm/current/certs/kasm_nginx.crt
sudo cp /tmp/kasm_nginx_new.key /opt/kasm/current/certs/kasm_nginx.key
rm /tmp/kasm_nginx_new.crt
rm /tmp/kasm_nginx_new.key
#Start the Kasm Services
sudo /opt/kasm/bin/start
#Test if nginx is running correctly. Wait 30 seconds
sudo docker ps | grep kasm_proxy
sudo cp /opt/kasm/current/certs/KASM_nginx_backup.crt /opt/kasm/current/certs/KASM_nginx.crt
sudo cp /opt/kasm/current/certs/KASM_nginx_backup.key /opt/kasm/current/certs/KASM_nginx.key
Uninstalling Kasm
Stop All Kasm services
Remove any Kasm session containers
Remove Kasm service containers
export KASM_UID=**$(**id kasm -u**)**export KASM_GID=**$(**id kasm -g**)**
sudo -E docker compose -f /opt/kasm/current/docker/docker-compose.yaml rm
Remove the Kasm docker network
Remove the Kasm database docker volume
Remove the Kasm docker_image
sudo docker rmi redis:5-alpine
sudo docker rmi postgres:9.5-alpine
sudo docker rmi kasmweb/nginx:latest
sudo docker rmi kasmweb/share:1.12.0
sudo docker rmi kasmweb/agent:1.12.0
sudo docker rmi kasmweb/manager:1.12.0
sudo docker rmi kasmweb/api:1.12.0
sudo docker rmi $(sudo docker images --filter "label=com.kasmweb.image=true" -q)
Remove the Kasm installation directory structure
Remove the Kasm User Accounts RestartKasm change port after install
Below is example to change from 443 to 8443
Stop All Kasm services
Update the agent.app.config.yaml with the desired port
(Optional) Verify the changes with the following command
sudo grep public_port /opt/kasm/current/conf/app/agent.app.config.yaml
public_port: 8443
public_port: 8443
Update the Kasm Nginx proxy configuration to listen on the desired port
(Optional) Verify the changes with the following command
Update the docker-compose.yaml to export the desired port for kasm_proxy container
(Optional) Verify the changes with the following command
sudo grep kasm_proxy -A5 /opt/kasm/current/docker/docker-compose.yaml
container_name: KASM_proxy
KASM_image: "kasmweb/nginx:latest"
ports:
- "8443:8443"
networks:
- KASM_default_network
Remove the KASM_proxy container so it can be recreated using the updated port mapping
Start All Kasm services
Kasm Docker
If you want to manually pull the docker_images to Kasm Workspaces
sudo docker pull docker <docker_image>
#You will need to change the version numbers
sudo docker pull kasmweb/firefox:1.14.0
sudo docker pull kasmweb/fedora-38-desktop:1.14.0
sudo docker pull kasmweb/alpine-318-desktop:1.14.0
sudo docker pull kasmweb/kali-rolling-desktop:1.14.0
sudo docker pull kasmweb/core-kali-rolling:1.14.0
sudo docker pull kasmweb/qbittorrent:1.14.0
sudo docker pull kasmweb/tor-browser:1.14.0
sudo docker pull kasmweb/sublime-text:1.14.0
sudo docker pull kasmweb/ubuntu-jammy-dind:1.14.0
sudo docker pull kasmweb/postman:1.14.0
sudo docker pull kasmweb/remmina:1.14.0
sudo docker pull kasmweb/remnux-focal-desktop:1.14.0
sudo docker pull kasmweb/core-parrotos-5:1.14.0
sudo docker pull kasmweb/libre-office:1.14.0
sudo docker pull kasmweb/telegram:1.14.0
sudo docker pull kasmweb/pinta:1.14.0
sudo docker pull kasmweb/filezilla:1.14.0
Changing MAX Concurrent Docker Pulls
Stop the Agent Services
Replace the value of max_concurrent_docker_pulls
in the agent config with the new value
Start the Agent Services
If you tail the logs of the agent, after 30 seconds, and if you have multiple images pending will see notifications of images now being pulled
Kasm stop start