Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Script: RustDesk Server #2326

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions ct/rustdeskserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/rustdesk/rustdesk-server

APP="RustDesk Server"
TAGS="remote-desktop"
var_cpu="1"
var_ram="512"
var_disk="2"
var_os="debian"
var_version="12"
var_unprivileged="1"

header_info "$APP"
base_settings

variables
color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources

if [[ ! -x /usr/bin/hbbr ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -s https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/rustdesk_version.txt)" ]] || [[ ! -f /opt/rustdesk_version.txt ]]; then
msg_info "Stopping $APP"
systemctl stop rustdesk-hbbr
systemctl stop rustdesk-hbbs
msg_ok "Stopped $APP"

msg_info "Updating $APP to v${RELEASE}"
TEMPDIR=$(mktemp -d)
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbr_${RELEASE}_amd64.deb" -P $TEMPDIR
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbs_${RELEASE}_amd64.deb" -P $TEMPDIR
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-utils_${RELEASE}_amd64.deb" -P $TEMPDIR
dpkg -i $TEMPDIR/*.deb &> /dev/null
msg_ok "Updated $APP to v${RELEASE}"

msg_info "Cleaning Up"
rm -rf $TEMPDIR
msg_ok "Cleanup Completed"

echo "${RELEASE}" >/opt/rustdesk_version.txt
msg_ok "Update Successful"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
fi
exit
}

start
build_container
description

msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}${IP}${CL}"
40 changes: 40 additions & 0 deletions install/rustdeskserver-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/rustdesk/rustdesk-server

source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os

msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc
msg_ok "Installed Dependencies"

msg_info "Setup RustDesk"
RELEASE=$(curl -s https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
TEMPDIR=$(mktemp -d)
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbr_${RELEASE}_amd64.deb" -P $TEMPDIR
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbs_${RELEASE}_amd64.deb" -P $TEMPDIR
wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-utils_${RELEASE}_amd64.deb" -P $TEMPDIR
$STD dpkg -i $TEMPDIR/*.deb
echo "${RELEASE}" >/opt/rustdesk.txt
msg_ok "Setup RustDesk"

motd_ssh
customize

msg_info "Cleaning up"
rm -rf $TEMPDIR
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
39 changes: 39 additions & 0 deletions json/rustdeskserver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "RustDesk Server",
"slug": "rustdesk-server",
"categories": [
21
],
"date_created": "2025-02-13",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": null,
"documentation": "https://rustdesk.com/docs/en/",
"website": "https://rustdesk.com/",
"logo": "https://rustdesk.com/_astro/logo.BKb61-he.svg",
"description": "RustDesk is a full-featured open source remote control alternative for self-hosting and security with minimal configuration.",
"install_methods": [
{
"type": "default",
"script": "ct/rustdeskserver.sh",
"resources": {
"cpu": 1,
"ram": 512,
"hdd": 2,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Check documentation on how to configure RustDesk Server. `https://rustdesk.com/docs/en/`",
"type": "info"
}
]
}
Loading