|
@@ -0,0 +1,122 @@
|
|
|
+ <!DOCTYPE html>
|
|
|
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
|
+ <head>
|
|
|
+ <title>Run Self-Hosted Desktop as a Service with Kasm Workspaces in Docker</title>
|
|
|
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="keywords" content="Browser Based,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Kasm,Kasm Workspaces,Desktop As A Service,System Administrator,System Administration,Linux,Docker Made Simple,Docker Host,Docker,Containerization,Container,Stream Docker Containers To Browser,Docker Software As A Service,Software As A Service,How To,Tutorial,i12bretro">
|
|
|
+ <meta name="author" content="i12bretro">
|
|
|
+ <meta name="description" content="Run Self-Hosted Desktop as a Service with Kasm Workspaces in Docker">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <meta name="revised" content="12/24/2022 07:14:11 AM" />
|
|
|
+ <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
|
|
|
+ <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
|
|
+ <script type="text/javascript" src="includes/js/steps.js"></script>
|
|
|
+ <link href="css/steps.css" rel="stylesheet" type="text/css" />
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <div id="gridContainer">
|
|
|
+ <div class="topMargin"></div>
|
|
|
+ <div id="listName" class="topMargin">
|
|
|
+ <h1>Run Self-Hosted Desktop as a Service with Kasm Workspaces in Docker</h1>
|
|
|
+ </div>
|
|
|
+ <div></div>
|
|
|
+ <div id="content">
|
|
|
+ <h2>What is Kasm Workspaces?</h2>
|
|
|
+
|
|
|
+<blockquote><em>Kasm Workspaces is a docker container streaming platform that enables you to deliver browser-based access to desktops, applications, and web services. Kasm uses a modern DevOps approach for programmatic delivery of services via Containerized Desktop Infrastructure (CDI) technology to create on-demand, disposable, docker containers that are accessible via web browser. -<a href="https://github.com/kasmtech/workspaces-core-images" target="_blank">https://github.com/kasmtech/workspaces-core-images</a></em></blockquote>
|
|
|
+
|
|
|
+<h2>Installing Docker</h2>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Log into the Linux based device</li>
|
|
|
+ <li>Run the following commands in the terminal
|
|
|
+ <div class="codeBlock"># install prerequisites<br />
|
|
|
+ sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
|
|
|
+ # add docker gpg key<br />
|
|
|
+ curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -<br />
|
|
|
+ # add docker software repository<br />
|
|
|
+ sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"<br />
|
|
|
+ # install docker<br />
|
|
|
+ sudo apt install docker-ce docker-compose containerd.io -y<br />
|
|
|
+ # enable and start docker service<br />
|
|
|
+ sudo systemctl enable docker && sudo systemctl start docker<br />
|
|
|
+ # add the current user to the docker group<br />
|
|
|
+ sudo usermod -aG docker $USER<br />
|
|
|
+ # reauthenticate for the new group membership to take effect<br />
|
|
|
+ su - $USER</div>
|
|
|
+ </li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<h2>Deploying Kasm Workspaces [Simple Method]</h2>
|
|
|
+
|
|
|
+<p>This is the recommended installation method, but requires the most disk space. I choose to be more selective about the Kasm images running, so I use the second installation option outlined later on.</p>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Continue with the following commands in a terminal window
|
|
|
+ <div class="codeBlock"># change directory to /tmp<br />
|
|
|
+ cd /tmp<br />
|
|
|
+ # download the latest kasm workspaces release<br />
|
|
|
+ curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.11.0.18142e.tar.gz<br />
|
|
|
+ # extract the downloaded tar.gz<br />
|
|
|
+ tar -xf kasm_release*.tar.gz<br />
|
|
|
+ # execute the installation script<br />
|
|
|
+ sudo bash kasm_release/install.sh</div>
|
|
|
+ </li>
|
|
|
+ <li>Take note of the credentials displayed in the output</li>
|
|
|
+ <li>Open a web browser and navigate to https://DNSorIP</li>
|
|
|
+ <li>Log in using username admin@kasm.local and the password found in the installation output</li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<h2>Deploying Kasm Workspaces [Selective Method]</h2>
|
|
|
+
|
|
|
+<p>This method can use far less disk space, but requires more time and setup to add Kasm images manually. I only add the Kasm images I use regularly.</p>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Continue with the following commands in a terminal window
|
|
|
+ <div class="codeBlock"># change directory to /tmp<br />
|
|
|
+ cd /tmp<br />
|
|
|
+ # download the latest kasm workspaces release<br />
|
|
|
+ curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.11.0.18142e.tar.gz<br />
|
|
|
+ # extract the downloaded tar.gz<br />
|
|
|
+ tar -xf kasm_release*.tar.gz<br />
|
|
|
+ # execute the installation script<br />
|
|
|
+ # installing only the core images<br />
|
|
|
+ # and setting a custom https port<br />
|
|
|
+ sudo bash kasm_release/install.sh -I -L 8443</div>
|
|
|
+ </li>
|
|
|
+ <li>Take note of the credentials displayed in the output</li>
|
|
|
+ <li>Open a web browser and navigate to https://DNSorIP:8443</li>
|
|
|
+ <li>Log in using username admin@kasm.local and the password found in the installation output</li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<h2>Adding Kasm Desktop/Application Images</h2>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Navigate to https://hub.docker.com/u/kasmweb to view the available Kasm images</li>
|
|
|
+ <li>Select Admin at the top of the Kasm web UI</li>
|
|
|
+ <li>Select Images from the left navigation menu</li>
|
|
|
+ <li>Click the Add Image button</li>
|
|
|
+ <li>Complete the Add Image form as follows (Adding Brave Browser in this example)
|
|
|
+ <p>Docker Image: kasmweb/brave:1.11.0-rolling<br />
|
|
|
+ Description: Brave Browser<br />
|
|
|
+ Friendly Name: Brave Browser<br />
|
|
|
+ Thumbnail URL: https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Brave_lion_icon.svg/654px-Brave_lion_icon.svg.png<br />
|
|
|
+ Cores: 1<br />
|
|
|
+ Memory (MB): 1024<br />
|
|
|
+ GPU Count: 0<br />
|
|
|
+ Docker Registry: hub.docker.com<br />
|
|
|
+ Persistent Profile Path: /home/{username}/brave</p>
|
|
|
+ </li>
|
|
|
+ <li>Scroll to the bottom of the form and click the Submit button</li>
|
|
|
+ <li>Click Workspaces at the top of the Kasm web UI</li>
|
|
|
+ <li>Click the new image > Click Launch Session</li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<p>Documentation: <a href="https://kasmweb.com/docs/latest/index.html" target="_blank">https://kasmweb.com/docs/latest/index.html</a></p>
|
|
|
+
|
|
|
+<p>Source: <a href="https://kasmweb.com/docs/latest/install/single_server_install.html" target="_blank">https://kasmweb.com/docs/latest/install/single_server_install.html</a></p> </div>
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+ </html>
|
|
|
+
|