Kasm Workspaces

References Kasm Documentation Kasm System Requirements Kasm GPU Install Prerequisites Install Docker Tutorial Swap Space Installation NOTE: check for the latest version cd /tmp curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.18.1.tar.gz tar -xf kasm_release_1.18.1.tar.gz sudo bash kasm_release/install.sh --accept-eula --swap-size 8192 GPU Setup The Nvidia container setup instructions, and standard GPU driver installation threw an error: nvidia runtime not found. The script on Kasm’s site worked. #!/bin/bash # Check for NVIDIA cards if ! lspci | grep -i nvidia > /dev/null; then echo "No NVIDIA GPU detected" exit 0 fi add-apt-repository -y ppa:graphics-drivers/ppa curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list apt update apt install -y ubuntu-drivers-common # Run ubuntu-drivers and capture the output DRIVER_OUTPUT=$(ubuntu-drivers list 2>/dev/null) # Extract server driver versions using grep and regex # Pattern looks for nvidia-driver-XXX-server SERVER_VERSIONS=$(echo "$DRIVER_OUTPUT" | grep -o 'nvidia-driver-[0-9]\+-server' | grep -o '[0-9]\+' | sort -n) # Check if any server versions were found if [ -z "$SERVER_VERSIONS" ]; then echo "Error: No NVIDIA server driver versions found." >&2 exit 1 fi # Find the highest version number LATEST_VERSION=$(echo "$SERVER_VERSIONS" | tail -n 1) # Validate that the version is numeric if ! [[ "$LATEST_VERSION" =~ ^[0-9]+$ ]]; then echo "Error: Invalid version number: $LATEST_VERSION" >&2 exit 2 fi # Output only the version number echo "Latest version is: $LATEST_VERSION" ubuntu-drivers install "nvidia:$LATEST_VERSION-server" apt install -y "nvidia-utils-$LATEST_VERSION-server" # Install NVIDIA toolkit + configure for docker apt-get install -y nvidia-container-toolkit nvidia-ctk runtime configure --runtime=docker Egress Setup: NordVPN Get service credentials for the VPN: Available on the VPN dashboard Download desired OpenVPN configuration files: Available on the VPN dashboard On Kasm Administrator dashboard, select Egress (Infrastructure > Egress) Add the egress provider: Configure VPN type: Add egress gateways: On the Workspaces > Workspace page, select the workspace to allow it to use the VPN, click edit and add the egress provider on the Egress tab. On the Egress Credentials tab, add in the service credentials for the VPN

August 31, 2025 · welcome-2themachine

Keepalived

Explanation: vrrp_instance: a virtual router state: master or backup priority: higher priority means that router gets chosen more often authentication: auth_type: can integrate with other ticket based authentication protocols auth_pass: IPv4 sub 8 character passwords, IPv6 allows for longer passwords virtual_ipaddress: the shared IP ranges for the virtual router (can be more than one) Setup Examples Manager: vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 priority 10 advert_int 1 authentication { auth_type AH auth_pass adguard } virtual_ipaddress { 10.133.7.11/24 } } vrrp_instance VI_2 { state MASTER interface eth0 virtual_router_id 52 priority 10 advert_int 1 authentication { auth_type PASS auth_pass adgaurdhome } virtual_ipaddress { fd48:fb0a:cb3a:b8d4::1234/64 } } Backup: vrrp_instance VI_1 { state BACKUP interface eth0 virtual_router_id 51 priority 1 advert_int 1 authentication { auth_type AH auth_pass adguard } virtual_ipaddress { 10.133.7.11/24 } } vrrp_instance VI_2 { state BACKUP interface eth0 virtual_router_id 52 priority 1 advert_int 1 authentication { auth_type PASS auth_pass adgaurdhome } virtual_ipaddress { fd48:fb0a:cb3a:b8d4::1234/64 } } Notes: Separate setup for IPv4 and IPv6 addresses Can have multiple setup for different interfaces References: redhat arch wiki keepalived documentation

July 27, 2024 · welcome-2themachine

Cloudflare Tunnel

Links dash.cloudflare.com one.dash.cloudflare.com Installing the service Ubuntu curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb && sudo cloudflared service install [TUNNEL KEY] Red Hat curl -L --output cloudflared.rpm https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-x86_64.rpm && sudo yum localinstall -y cloudflared.rpm && sudo cloudflared service install [TUNNEL KEY] Docker docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token [TUNNEL KEY] Docker Compose services: cloudflared: image: cloudflare/cloudflared:latest restart: unless-stopped command: tunnel run network_mode: host environment: - "TUNNEL_TOKEN=[TUNNEL KEY]" deploy: mode: global placement: constraints: [node.platform.os == linux] Cloudflare as a Docker Sidecar Cloudflare can serve ports from other docker containers without actually exposing the container ports on the host device. See the compose example below: ...

July 4, 2024 · welcome-2themachine

Smart Cards on Linux

Description PCSCD serves as middleware to access a smart card using PC/SC. Install this program to Installation sudo apt install pcscd -y Enable Socket sudo systemctl enable --now pcscd.socket Make Sure It’s Working systemctl status pcscd.service

July 3, 2024 · welcome-2themachine