Skip to content

Commit 98c64ff

Browse files
'Add new script' (#4716)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
1 parent c136133 commit 98c64ff

File tree

4 files changed

+129
-0
lines changed

4 files changed

+129
-0
lines changed

ct/headers/kasm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__ __
2+
/ //_/___ __________ ___
3+
/ ,< / __ `/ ___/ __ `__ \
4+
/ /| / /_/ (__ ) / / / / /
5+
/_/ |_\__,_/____/_/ /_/ /_/
6+

ct/kasm.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Omar Minaya
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://www.kasmweb.com/docs/latest/index.html
7+
8+
APP="Kasm"
9+
var_tags="${var_tags:-os}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-4192}"
12+
var_disk="${var_disk:-30}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
var_fuse="${var_fuse:-yes}"
17+
var_tun="${var_tun:-yes}"
18+
19+
header_info "$APP"
20+
variables
21+
color
22+
catch_errors
23+
24+
function update_script() {
25+
header_info
26+
check_container_storage
27+
check_container_resources
28+
if [[ ! -d /var ]]; then
29+
msg_error "No ${APP} Installation Found!"
30+
exit
31+
fi
32+
msg_info "Updating $APP LXC"
33+
$STD apt-get update
34+
$STD apt-get -y upgrade
35+
msg_ok "Updated $APP LXC"
36+
exit
37+
}
38+
39+
start
40+
build_container
41+
description
42+
43+
msg_ok "Completed Successfully!\n"
44+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
45+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
46+
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}${CL}"

frontend/public/json/kasm.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "Kasm",
3+
"slug": "kasm",
4+
"categories": [
5+
9
6+
],
7+
"date_created": "2025-03-24",
8+
"type": "ct",
9+
"updateable": false,
10+
"privileged": true,
11+
"config_path": "",
12+
"interface_port": 443,
13+
"documentation": "https://www.kasmweb.com/docs/",
14+
"website": "https://www.kasmweb.com/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/kasm-workspaces.webp",
16+
"description": "Kasm Workspaces is a container streaming platform that delivers browser-based access to desktops, applications, and web services with enhanced security and scalability.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/kasm.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 4096,
24+
"hdd": 50,
25+
"os": "Debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": [
35+
{
36+
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
37+
"type": "warning"
38+
},
39+
{
40+
"text": "Show password: `cat ~/kasm.creds`",
41+
"type": "info"
42+
}
43+
]
44+
}

install/kasm-install.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Omar Minaya
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://www.kasmweb.com/docs/latest/index.html
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Kasm Workspaces"
17+
KASM_VERSION=$(curl -fsSL 'https://www.kasmweb.com/downloads' | grep -o 'https://kasm-static-content.s3.amazonaws.com/kasm_release_[^"]*\.tar\.gz' | head -n 1 | sed -E 's/.*release_(.*)\.tar\.gz/\1/')
18+
curl -fsSL -o "/opt/kasm_release_${KASM_VERSION}.tar.gz" "https://kasm-static-content.s3.amazonaws.com/kasm_release_${KASM_VERSION}.tar.gz"
19+
cd /opt
20+
tar -xf "kasm_release_${KASM_VERSION}.tar.gz"
21+
chmod +x /opt/kasm_release/install.sh
22+
printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh | tee ~/kasm-install.output
23+
sed -n '/Kasm UI Login Credentials/,$p' ~/kasm-install.output >~/kasm.creds
24+
msg_ok "Installed Kasm Workspaces"
25+
26+
motd_ssh
27+
customize
28+
29+
msg_info "Cleaning up"
30+
$STD rm -f /opt/kasm_release_${KASM_VERSION}.tar.gz
31+
$STD apt-get -y autoremove
32+
$STD apt-get -y autoclean
33+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)