Skip to content

Commit 5410542

Browse files
Upgopher (#9360)
* 'Add new script' * Update upgopher.json --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Slaviša Arežina <[email protected]>
1 parent a08869b commit 5410542

File tree

4 files changed

+150
-0
lines changed

4 files changed

+150
-0
lines changed

ct/headers/upgopher

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/upgopher.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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: Eduard González (wanetty)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/wanetty/upgopher
7+
8+
APP="Upgopher"
9+
var_tags="${var_tags:-file-sharing}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-512}"
12+
var_disk="${var_disk:-4}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${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+
if [[ ! -d /opt/upgopher ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
if check_for_gh_release "upgopher" "wanetty/upgopher"; then
32+
msg_info "Stopping Service"
33+
systemctl stop upgopher
34+
msg_ok "Stopped Service"
35+
36+
fetch_and_deploy_gh_release "upgopher" "wanetty/upgopher" "prebuild" "latest" "/opt/upgopher" "upgopher_*_linux_amd64.tar.gz"
37+
chmod +x /opt/upgopher/upgopher
38+
39+
msg_info "Starting Service"
40+
systemctl start upgopher
41+
msg_ok "Started Service"
42+
msg_ok "Updated successfully!"
43+
fi
44+
exit
45+
}
46+
47+
start
48+
build_container
49+
description
50+
51+
msg_ok "Completed Successfully!\n"
52+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
53+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
54+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9090${CL}"

frontend/public/json/upgopher.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "Upgopher",
3+
"slug": "upgopher",
4+
"categories": [
5+
11
6+
],
7+
"date_created": "2025-10-31",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 9090,
12+
"documentation": "https://github.com/wanetty/upgopher#readme",
13+
"config_path": "",
14+
"website": "https://github.com/wanetty/upgopher",
15+
"logo": "https://raw.githubusercontent.com/wanetty/upgopher/main/static/logopher.webp",
16+
"description": "A simple Go web server for file upload, download, and browsing. Cross-platform alternative to Python-based file servers with no library dependencies. Features file upload via web interface, directory navigation, URL copying to clipboard, optional basic authentication, HTTPS support, and hidden files toggle.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/upgopher.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 512,
24+
"hdd": 4,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": [
35+
{
36+
"text": "Default uploads directory: `/opt/upgopher/uploads`",
37+
"type": "info"
38+
},
39+
{
40+
"text": "Set application startup options by editing `/etc/systemd/system/upgopher.service`. Read documentation for available options.",
41+
"type": "info"
42+
}
43+
]
44+
}

install/upgopher-install.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+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Eduardo González (wanetty)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/wanetty/upgopher
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+
fetch_and_deploy_gh_release "upgopher" "wanetty/upgopher" "prebuild" "latest" "/opt/upgopher" "upgopher_*_linux_amd64.tar.gz"
17+
18+
msg_info "Installing Upgopher"
19+
chmod +x /opt/upgopher/upgopher
20+
mkdir -p /opt/upgopher/uploads
21+
msg_ok "Installed Upgopher"
22+
23+
msg_info "Creating Service"
24+
cat <<EOF >/etc/systemd/system/upgopher.service
25+
[Unit]
26+
Description=Upgopher File Server
27+
Documentation=https://github.com/wanetty/upgopher
28+
After=network.target
29+
30+
[Service]
31+
Type=simple
32+
User=root
33+
WorkingDirectory=/opt/upgopher
34+
ExecStart=/opt/upgopher/upgopher -port 9090 -dir /opt/upgopher/uploads
35+
Restart=always
36+
RestartSec=5
37+
38+
[Install]
39+
WantedBy=multi-user.target
40+
EOF
41+
systemctl enable -q --now upgopher
42+
msg_ok "Created Service"
43+
44+
motd_ssh
45+
customize
46+
cleanup_lxc

0 commit comments

Comments
 (0)