Skip to content

Commit 880b6e0

Browse files
authored
New Script: RustDesk Server (#2326)
* add rustdesk server script * remove http from server address
1 parent 4b430aa commit 880b6e0

File tree

3 files changed

+146
-0
lines changed

3 files changed

+146
-0
lines changed

ct/rustdeskserver.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/rustdesk/rustdesk-server
7+
8+
APP="RustDesk Server"
9+
TAGS="remote-desktop"
10+
var_cpu="1"
11+
var_ram="512"
12+
var_disk="2"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
base_settings
19+
20+
variables
21+
color
22+
catch_errors
23+
24+
function update_script() {
25+
header_info
26+
check_container_storage
27+
check_container_resources
28+
29+
if [[ ! -x /usr/bin/hbbr ]]; then
30+
msg_error "No ${APP} Installation Found!"
31+
exit
32+
fi
33+
RELEASE=$(curl -s https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
34+
if [[ "${RELEASE}" != "$(cat /opt/rustdesk_version.txt)" ]] || [[ ! -f /opt/rustdesk_version.txt ]]; then
35+
msg_info "Stopping $APP"
36+
systemctl stop rustdesk-hbbr
37+
systemctl stop rustdesk-hbbs
38+
msg_ok "Stopped $APP"
39+
40+
msg_info "Updating $APP to v${RELEASE}"
41+
TEMPDIR=$(mktemp -d)
42+
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbr_${RELEASE}_amd64.deb" -P $TEMPDIR
43+
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbs_${RELEASE}_amd64.deb" -P $TEMPDIR
44+
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-utils_${RELEASE}_amd64.deb" -P $TEMPDIR
45+
dpkg -i $TEMPDIR/*.deb &> /dev/null
46+
msg_ok "Updated $APP to v${RELEASE}"
47+
48+
msg_info "Cleaning Up"
49+
rm -rf $TEMPDIR
50+
msg_ok "Cleanup Completed"
51+
52+
echo "${RELEASE}" >/opt/rustdesk_version.txt
53+
msg_ok "Update Successful"
54+
else
55+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
56+
fi
57+
exit
58+
}
59+
60+
start
61+
build_container
62+
description
63+
64+
msg_ok "Completed Successfully!\n"
65+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
66+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
67+
echo -e "${TAB}${GATEWAY}${BGN}${IP}${CL}"

install/rustdeskserver-install.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/rustdesk/rustdesk-server
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 Dependencies"
17+
$STD apt-get install -y \
18+
curl \
19+
sudo \
20+
mc
21+
msg_ok "Installed Dependencies"
22+
23+
msg_info "Setup RustDesk"
24+
RELEASE=$(curl -s https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
25+
TEMPDIR=$(mktemp -d)
26+
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbr_${RELEASE}_amd64.deb" -P $TEMPDIR
27+
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbs_${RELEASE}_amd64.deb" -P $TEMPDIR
28+
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-utils_${RELEASE}_amd64.deb" -P $TEMPDIR
29+
$STD dpkg -i $TEMPDIR/*.deb
30+
echo "${RELEASE}" >/opt/rustdesk.txt
31+
msg_ok "Setup RustDesk"
32+
33+
motd_ssh
34+
customize
35+
36+
msg_info "Cleaning up"
37+
rm -rf $TEMPDIR
38+
$STD apt-get -y autoremove
39+
$STD apt-get -y autoclean
40+
msg_ok "Cleaned"

json/rustdeskserver.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "RustDesk Server",
3+
"slug": "rustdesk-server",
4+
"categories": [
5+
21
6+
],
7+
"date_created": "2025-02-13",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": null,
12+
"documentation": "https://rustdesk.com/docs/en/",
13+
"website": "https://rustdesk.com/",
14+
"logo": "https://rustdesk.com/_astro/logo.BKb61-he.svg",
15+
"description": "RustDesk is a full-featured open source remote control alternative for self-hosting and security with minimal configuration.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/rustdeskserver.sh",
20+
"resources": {
21+
"cpu": 1,
22+
"ram": 512,
23+
"hdd": 2,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "Check documentation on how to configure RustDesk Server. `https://rustdesk.com/docs/en/`",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)