How to Install and Configure Kasm Workspaces on Ubuntu
Background
As we would like to test the suspicious URL, we could set up a virtual machine and create a snapshot and test that way. Once it has been done, then roll back the snapshot. The problem with this approach is that sometimes you forget to roll back the snapshot and are not sure about the status of that machine.
Solution
Kasm Workspaces provides a safe way to browse websites, check webmail and open files without putting the computer at risk. Kasm environments isolate users by creating a chasm between users’ computers and web threats.
Here’s the step-by-step.
Our Environment
- We utilised Microsoft Azure to create a dedicated virtual machine with Standard B2s size, 2 vCPUs, and 4 Gb RAM. We used a 64 GB OS disk. We allowed 443 and SSH ports only.
- For simplicity, we use a single-server installation approach
Requirement
Ensure to follow the requirement based on this Kasm documentation.
Supported OS: Ubuntu 18.04 / 20.04 / 22.04 (amd64/arm64) Minimum Requirement: 2 cores CPU, 4GB Memory, 50GB storage
Open the command line or terminal.
Log in to the virtual machine.
Creating A Swap Partition
We use the recommendation which is a 1GB swap partition.
sudo dd if=/dev/zero bs=1M count=1024 of=/mnt/1GiB.swap
Change the permission:
sudo chmod 600 /mnt/1GiB.swap
Create a swap:
sudo mkswap /mnt/1GiB.swap
Swap:
sudo swapon /mnt/1GiB.swap
Verify swap file exists:
cat /proc/swaps
To make the swap file available on boot:
echo '/mnt/1GiB.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab
Installation
Access to /tmp folder:
cd /tmp
Download the latest version of Kasm Workspaces to /tmp folder:
curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.11.0.18142e.tar.gz
Extract the package:
tar -xf kasm_release*.tar.gz
Run the installation script:
sudo bash kasm_release/install.sh
Accept the user agreement.
Wait for the installation to complete and this took a while.
Once it is complete, keep the information login detail safe.
Run the Application
Open the browser and type in https://{Public_IP_Address}
Log in as admin.
To launch the app container, click the Workspaces tab.
Select Chrome for instance.
Click the Launch Session button.
This will launch a Chrome browser inside the browser.
Note: On the left-hand side, there is menu option.
Click the left-hand side menu icon:
That is it. This container running on the web is really cool. You can even run a full-blown Ubuntu desktop or Kali Linux or play Doom on the go!
The End
Congratulation on reaching the end of this article. We hope we have shed some light on outlining how to install and configure Kasm Workspaces on Ubuntu Server.
We write this so that this is not a fixed article. Like in this journey, we learn as we go and re-write some parts, so please keep pinging with this article.
If you like this post, please check out our other related posts:
- How to Enable Remote Access to MariaDB Database
- How to Install the Webmin on Ubuntu 20.04
- How to Install and Configure OpenVPN on Ubuntu
- Troubleshoot for not being able to Receive a Test Email from Webmin on a particular Domain
- Troubleshooting ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)
- How to Harden the Ubuntu Server in 2022
- A Complete Setup Guide for Contabo VPS Ubuntu 20.04 with preinstalled Webmin + LAMP
If you love this article or any tech posts and you would like to receive an update of this article or our latest post, please sign up for the form below: