Alpine Syncthing (#5586)

* Alpine-Syncthing

* Update syncthing.json
This commit is contained in:
CanbiZ 2025-06-30 21:18:45 +02:00 committed by GitHub
parent 1896f2db0f
commit 546bff56fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 89 additions and 3 deletions

45
ct/alpine-syncthing.sh Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://syncthing.net/
APP="Alpine-Syncthing"
var_tags="${var_tags:-alpine;networking}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-256}"
var_disk="${var_disk:-1}"
var_os="${var_os:-alpine}"
var_version="${var_version:-3.22}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
msg_info "Updating Syncthing"
$STD apk upgrade syncthing
msg_ok "Updated Syncthing"
msg_info "Restarting Syncthing"
$STD rc-service syncthing restart
msg_ok "Restarted Syncthing"
exit 1
}
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}http://${IP}:8384${CL}"

View File

@ -12,7 +12,7 @@
"documentation": null, "documentation": null,
"website": "https://syncthing.net/", "website": "https://syncthing.net/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/syncthing.webp", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/syncthing.webp",
"config_path": "/root/.local/state/syncthing/config.xml", "config_path": "/root/.local/state/syncthing/config.xml - Alpine: /var/lib/syncthing/.local/state/syncthing/config.xml",
"description": "Syncthing is an open-source file syncing tool that allows users to keep their files in sync across multiple devices by using peer-to-peer synchronization. It doesn't rely on any central server, so all data transfers are directly between devices.", "description": "Syncthing is an open-source file syncing tool that allows users to keep their files in sync across multiple devices by using peer-to-peer synchronization. It doesn't rely on any central server, so all data transfers are directly between devices.",
"install_methods": [ "install_methods": [
{ {
@ -25,8 +25,19 @@
"os": "debian", "os": "debian",
"version": "12" "version": "12"
} }
} },
], {
"type": "alpine",
"script": "ct/alpine-syncthing.sh",
"resources": {
"cpu": 1,
"ram": 256,
"hdd": 1,
"os": "alpine",
"version": "3.22"
}
}
],
"default_credentials": { "default_credentials": {
"username": null, "username": null,
"password": null "password": null

View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://syncthing.net/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Setup Syncthing"
$STD apk add --no-cache syncthing
sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /var/lib/syncthing/.local/state/syncthing/config.xml
msg_ok "Setup Syncthing"
msg_info "Enabling Syncthing Service"
$STD rc-update add syncthing default
msg_ok "Enabled Syncthing Service"
msg_info "Starting Syncthing"
$STD rc-service syncthing start
msg_ok "Started Syncthing"
motd_ssh
customize