Skip to content

Commit 7d10077

Browse files
authored
Merge pull request #198 from opastorello/main
JumpServer
2 parents 357287f + ac8cd01 commit 7d10077

File tree

3 files changed

+147
-0
lines changed

3 files changed

+147
-0
lines changed

ct/jumpserver.sh

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Nícolas Pastorello (opastorello)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/jumpserver/jumpserver
7+
8+
APP="JumpServer"
9+
var_tags="bastion-host;pam"
10+
var_cpu="2"
11+
var_ram="8192"
12+
var_disk="60"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d /opt/jumpserver ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
32+
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
33+
msg_info "Updating ${APP} to ${RELEASE}"
34+
if [[ -d /opt/jumpserver/config ]]; then
35+
cp -r /opt/jumpserver/config /opt/jumpserver_config_backup
36+
fi
37+
echo "${RELEASE}" >/opt/${APP}_version.txt
38+
rm -rf /opt/jumpserver
39+
cd /opt
40+
curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz
41+
mkdir -p /opt/jumpserver
42+
$STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1
43+
if [[ -d /opt/jumpserver_config_backup ]]; then
44+
cp -r /opt/jumpserver_config_backup /opt/jumpserver/config
45+
rm -rf /opt/jumpserver_config_backup
46+
fi
47+
cd /opt/jumpserver
48+
yes y | head -n 3 | $STD ./jmsctl.sh upgrade
49+
$STD ./jmsctl.sh start
50+
rm -rf /opt/jumpserver-installer-${RELEASE}.tar.gz
51+
msg_ok "Updated Successfully"
52+
else
53+
msg_ok "No update required. ${APP} is already at ${RELEASE}."
54+
fi
55+
exit
56+
}
57+
58+
start
59+
build_container
60+
description
61+
62+
msg_ok "Completed Successfully!\n"
63+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
64+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
65+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

frontend/public/json/jumpserver.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "JumpServer",
3+
"slug": "jumpserver",
4+
"categories": [
5+
6
6+
],
7+
"date_created": "2025-04-08",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 80,
12+
"documentation": "https://www.jumpserver.com/docs",
13+
"website": "https://www.jumpserver.com/",
14+
"logo": "https://raw.githubusercontent.com/jumpserver/jumpserver/refs/heads/dev/apps/static/img/logo.png",
15+
"description": "JumpServer is an open-source Privileged Access Management (PAM) tool that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/jumpserver.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 8192,
23+
"hdd": 60,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": "admin",
31+
"password": "ChangeMe"
32+
},
33+
"notes": []
34+
}

install/jumpserver-install.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Nícolas Pastorello (opastorello)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/jumpserver/jumpserver
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+
tar \
19+
iptables
20+
msg_ok "Installed Dependencies"
21+
22+
msg_info "Installing JumpServer"
23+
cd /opt
24+
RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
25+
curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz
26+
mkdir -p /opt/jumpserver
27+
$STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1
28+
cd /opt/jumpserver
29+
$STD ./jmsctl.sh install <<EOF
30+
n
31+
n
32+
n
33+
redis
34+
n
35+
n
36+
EOF
37+
$STD ./jmsctl.sh start
38+
echo "${RELEASE}" >/opt/${APP}_version.txt
39+
msg_ok "Installed JumpServer"
40+
41+
motd_ssh
42+
customize
43+
44+
msg_info "Cleaning up"
45+
rm -rf /opt/jumpserver-installer-${RELEASE}.tar.gz
46+
$STD apt-get -y autoremove
47+
$STD apt-get -y autoclean
48+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)