loading

Installing Kasm Workspaces and Setting Up SSL with Let’s Encrypt

Updated at
16/12/2023
Views
1108

Introduction: This tutorial will guide you through the process of installing Kasm Workspaces using the official install script and setting up SSL with Let’s Encrypt. Kasm Workspaces is a powerful platform for secure and efficient remote desktops, and automating its installation and configuring SSL can enhance its security. Please note that this tutorial assumes you have a clean, freshly installed server to avoid any potential issues.

Disclaimers:

  • The author does not own Kasm Workspaces or the script used in this tutorial and does not take responsibility for any server-related issues.
  • It is recommended to take a backup of your system or use a fresh installation.
  • The script provided here may be subject to changes by the Kasm Workspaces team.

Prerequisites:

  • Root access to a server running Ubuntu 18.04, 20.04, 22.04, or Debian 9, 10, or 11. Virtual machines with Arm64 or x86 architecture are supported.
  • Port 80 and 443 must be open. Using a reverse proxy is possible but not recommended.
  • A Cloud server with a minimum configuration of CX21, CAX11, CCX12, or higher. Dedicated servers  should also work.
  • If you want to add your SSL certificates, you need a domain with record access that points to your server.

Step 1 - Downloading and Installing Kasm:

  1. SSH into your server as the root user. If you are not logged in as root, you can switch to the root user by running:

    sudo -s
  2. Once you are the root user, run the following command to download and install Kasm Workspaces:

    cd /tmp && curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.13.1.421524.tar.gz && tar -xf kasm_release_1.13.1.421524.tar.gz && bash kasm_release/install.sh
  3. You will be presented with the End User License Agreement (EULA). Read through it, and if you agree, type "y" and press Enter to proceed with the installation.

Step 2 - Testing Kasm:

  1. After installation is complete, you will see Kasm UI Login Credentials displayed in your terminal. These credentials are for accessing the Kasm Workspaces web interface.

  2. Copy the "Admin Kasm UI Login Credentials" and access your server's IP address in your web browser using HTTPS. You can format the URL as follows: https://<server-ip>.

  3. When you access the server, you may see a warning about the self-signed SSL certificate. Proceed by clicking "Advanced" and then "Proceed to <server-ip> (unsafe)."

  4. Log in using the credentials provided in the terminal.

  5. Once logged in, navigate to the "Workspaces" tab to start using Kasm Workspaces.

Step 3 - Setting Up SSL with Let’s Encrypt (Optional):

  1. If you want to replace the self-signed SSL certificate with a Let’s Encrypt certificate to remove the warning, you can follow these steps.

  2. First, stop Kasm using the following command:

    /opt/kasm/bin/stop
  3. Install Let’s Encrypt and navigate to the Kasm SSL certificate directory with these commands:

    apt -y install letsencrypt && cd /opt/kasm/current/certs
  4. Create your SSL certificates using Let’s Encrypt. Replace example.com with your domain name that points to your server:

    certbot certonly --standalone --agree-tos --preferred-challenges http -d example.com
  5. Follow the prompts, providing your email address and specifying whether you want your email to be shared.

  6. After the SSL certificates are created, backup your self-signed certificates by renaming them:

    mv kasm_nginx.crt kasm_nginx.crt.bk && mv kasm_nginx.key kasm_nginx.key.bk

    This command renames the current certificate files.

  7. Create symbolic links for Let’s Encrypt certificates so you can renew them easily. Run these commands:

    ln -s /etc/letsencrypt/live/example.com/privkey.pem kasm_nginx.key ln -s /etc/letsencrypt/live/example.com/fullchain.pem kasm_nginx.crt

    Replace example.com with your domain name.

  8. Start Kasm again:

    /opt/kasm/bin/start
  9. Your Kasm Workspaces instance should now be accessible with SSL.

Conclusion: Congratulations! You have successfully installed Kasm Workspaces and configured SSL with Let’s Encrypt. You can now enjoy the benefits of a secure and efficient remote desktop solution. If you encounter any issues, consider seeking help on the KasmWeb subreddit, where you can get assistance and support for this setup.

YottaSrc footer

why choose us?

Better Pricing, Fast SSD Storage and Real 24/7
Technical Support.

control panel icon
cPanel

Managing Your Site Through CPanel With The Latest Version

security icon
FAST, RELIABLE & SECURE

99.8% Uptime Guarantee.
So Focus On Your Work!

support icon
24/7/365 Support

Day or night, rain or shine,
our team is here for you!

cloud backup icon
Daily Backup

Daily & Weekly Backup.
Your Files Are Safe!