Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
61cf475dd2 feat(sqlserver): add SQL Server 2025 with Ubuntu 24.04 support & refactor 2022
- Add new SQL Server 2025 scripts with Ubuntu 24.04 support
- Refactor both versions to use setup_deb822_repo
- Fix debuginfod profile causing update errors (#11522)
- Use apt instead of apt-get in CT scripts
- Consistent messaging and formatting
2026-02-04 20:20:36 +01:00
197 changed files with 3170 additions and 8589 deletions

View File

@@ -32,8 +32,6 @@ body:
required: true required: true
- label: "The application requested has 600+ stars on Github (if applicable), is older than 6 months, actively maintained and has release tarballs published." - label: "The application requested has 600+ stars on Github (if applicable), is older than 6 months, actively maintained and has release tarballs published."
required: true required: true
- label: "I understand that not all applications will be accepted due to various reasons and criteria by the community-scripts ORG."
required: true
- type: markdown - type: markdown
attributes: attributes:
value: "Thanks for submitting your request! The team will review it and reach out if we need more information." value: "Thanks for submitting your request! The team will review it and reach out if we need more information."

116
.github/changelogs/2026/02.md generated vendored
View File

@@ -1,119 +1,3 @@
## 2026-02-07
### 🆕 New Scripts
- Checkmate ([#11672](https://github.com/community-scripts/ProxmoxVE/pull/11672))
- Bichon ([#11671](https://github.com/community-scripts/ProxmoxVE/pull/11671))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- NocoDB: pin to v0.301.1 [@MickLesk](https://github.com/MickLesk) ([#11655](https://github.com/community-scripts/ProxmoxVE/pull/11655))
- Pin Memos to v0.25.3 - last version with release binaries [@MickLesk](https://github.com/MickLesk) ([#11658](https://github.com/community-scripts/ProxmoxVE/pull/11658))
- Downgrade: OpenProject | NginxProxyManager | Semaphore to Debian 12 due to persistent SHA1 issues [@MickLesk](https://github.com/MickLesk) ([#11654](https://github.com/community-scripts/ProxmoxVE/pull/11654))
### 💾 Core
- #### ✨ New Features
- tools: fallback to previous release when asset is missing [@MickLesk](https://github.com/MickLesk) ([#11660](https://github.com/community-scripts/ProxmoxVE/pull/11660))
### 📚 Documentation
- fix(setup): correctly auto-detect username when using --full [@ls-root](https://github.com/ls-root) ([#11650](https://github.com/community-scripts/ProxmoxVE/pull/11650))
### 🌐 Website
- #### ✨ New Features
- feat(frontend): add JSON script import functionality [@ls-root](https://github.com/ls-root) ([#11563](https://github.com/community-scripts/ProxmoxVE/pull/11563))
## 2026-02-06
### 🆕 New Scripts
- Nightscout ([#11621](https://github.com/community-scripts/ProxmoxVE/pull/11621))
- PVE LXC Apps Updater [@MickLesk](https://github.com/MickLesk) ([#11533](https://github.com/community-scripts/ProxmoxVE/pull/11533))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Immich: supress startup messages for immich-admin [@vhsdream](https://github.com/vhsdream) ([#11635](https://github.com/community-scripts/ProxmoxVE/pull/11635))
- Semaphore: Change Ubuntu release from 'jammy' to 'noble' [@MickLesk](https://github.com/MickLesk) ([#11625](https://github.com/community-scripts/ProxmoxVE/pull/11625))
- Pangolin: replace build:sqlite with db:generate + build [@MickLesk](https://github.com/MickLesk) ([#11616](https://github.com/community-scripts/ProxmoxVE/pull/11616))
- [FIX] OpenCloud: path issues [@vhsdream](https://github.com/vhsdream) ([#11593](https://github.com/community-scripts/ProxmoxVE/pull/11593))
- [FIX] Homepage: preserve public/images & public/icons if they exist [@vhsdream](https://github.com/vhsdream) ([#11594](https://github.com/community-scripts/ProxmoxVE/pull/11594))
- #### ✨ New Features
- Shelfmark: remove Chromedriver dep, add URL_BASE env [@vhsdream](https://github.com/vhsdream) ([#11619](https://github.com/community-scripts/ProxmoxVE/pull/11619))
- Immich: pin to v2.5.5 [@vhsdream](https://github.com/vhsdream) ([#11598](https://github.com/community-scripts/ProxmoxVE/pull/11598))
- #### 🔧 Refactor
- refactor: homepage [@CrazyWolf13](https://github.com/CrazyWolf13) ([#11605](https://github.com/community-scripts/ProxmoxVE/pull/11605))
### 💾 Core
- #### 🐞 Bug Fixes
- fix(core): spinner misalignment [@ls-root](https://github.com/ls-root) ([#11627](https://github.com/community-scripts/ProxmoxVE/pull/11627))
- #### 🔧 Refactor
- [Fix] build.func: QOL grammar adjustment for Creating LXC message [@vhsdream](https://github.com/vhsdream) ([#11633](https://github.com/community-scripts/ProxmoxVE/pull/11633))
### 📚 Documentation
- [gh] Update to the New Script request template [@tremor021](https://github.com/tremor021) ([#11612](https://github.com/community-scripts/ProxmoxVE/pull/11612))
### 🌐 Website
- #### 📝 Script Information
- Update LXC App Updater JSON to reflect tag override option [@vhsdream](https://github.com/vhsdream) ([#11626](https://github.com/community-scripts/ProxmoxVE/pull/11626))
### ❔ Uncategorized
- Opencloud: fix JSON [@vhsdream](https://github.com/vhsdream) ([#11617](https://github.com/community-scripts/ProxmoxVE/pull/11617))
## 2026-02-05
### 🆕 New Scripts
- OpenCloud ([#11538](https://github.com/community-scripts/ProxmoxVE/pull/11538))
- Nginx-UI ([#11573](https://github.com/community-scripts/ProxmoxVE/pull/11573))
- New: SQL-Server 2025 | Refactor SQL-Server 2022 [@MickLesk](https://github.com/MickLesk) ([#11546](https://github.com/community-scripts/ProxmoxVE/pull/11546))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- OpenCloud: pin version to 5.0.2; Collabora CSP fix [@vhsdream](https://github.com/vhsdream) ([#11585](https://github.com/community-scripts/ProxmoxVE/pull/11585))
- Wanderer: Fix repo [@tremor021](https://github.com/tremor021) ([#11567](https://github.com/community-scripts/ProxmoxVE/pull/11567))
- #### ✨ New Features
- Refactor: Docker-VM (Multi-OS / Cloud-Init / Stabilization) [@MickLesk](https://github.com/MickLesk) ([#9047](https://github.com/community-scripts/ProxmoxVE/pull/9047))
### 💾 Core
- #### ✨ New Features
- cloud-init: add interactive SSH key discovery and selection [@MickLesk](https://github.com/MickLesk) ([#11547](https://github.com/community-scripts/ProxmoxVE/pull/11547))
### 📚 Documentation
- github: extend docs / contribution / templates [@MickLesk](https://github.com/MickLesk) ([#10921](https://github.com/community-scripts/ProxmoxVE/pull/10921))
### 🌐 Website
- #### 🐞 Bug Fixes
- fix(frontend): theme respective syntax highlighting [@ls-root](https://github.com/ls-root) ([#11565](https://github.com/community-scripts/ProxmoxVE/pull/11565))
## 2026-02-04 ## 2026-02-04
### 🆕 New Scripts ### 🆕 New Scripts

View File

@@ -89,15 +89,9 @@ jobs:
slug=$(jq -r '.slug // empty' "$json_file" 2>/dev/null) slug=$(jq -r '.slug // empty' "$json_file" 2>/dev/null)
[[ -z "$slug" ]] && continue [[ -z "$slug" ]] && continue
# Find corresponding script (install script or addon script) # Find corresponding install script
install_script="" install_script="install/${slug}-install.sh"
if [[ -f "install/${slug}-install.sh" ]]; then [[ ! -f "$install_script" ]] && continue
install_script="install/${slug}-install.sh"
elif [[ -f "tools/addon/${slug}.sh" ]]; then
install_script="tools/addon/${slug}.sh"
else
continue
fi
# Look for fetch_and_deploy_gh_release calls # Look for fetch_and_deploy_gh_release calls
# Pattern: fetch_and_deploy_gh_release "app" "owner/repo" ["mode"] ["version"] # Pattern: fetch_and_deploy_gh_release "app" "owner/repo" ["mode"] ["version"]

View File

@@ -12,9 +12,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details> <details>
<summary><h2>📜 History</h2></summary> <summary><h2>📜 History</h2></summary>
@@ -24,7 +21,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details> <details>
<summary><h4>February (7 entries)</h4></summary> <summary><h4>February (4 entries)</h4></summary>
[View February 2026 Changelog](.github/changelogs/2026/02.md) [View February 2026 Changelog](.github/changelogs/2026/02.md)
@@ -44,84 +41,84 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details> <details>
<summary><h4>December (31 entries)</h4></summary> <summary><h4>December - 31 entries</h4></summary>
[View December 2025 Changelog](.github/changelogs/2025/12.md) [View December 2025 Changelog](.github/changelogs/2025/12.md)
</details> </details>
<details> <details>
<summary><h4>November (29 entries)</h4></summary> <summary><h4>November - 30 entries</h4></summary>
[View November 2025 Changelog](.github/changelogs/2025/11.md) [View November 2025 Changelog](.github/changelogs/2025/11.md)
</details> </details>
<details> <details>
<summary><h4>October (30 entries)</h4></summary> <summary><h4>October - 31 entries</h4></summary>
[View October 2025 Changelog](.github/changelogs/2025/10.md) [View October 2025 Changelog](.github/changelogs/2025/10.md)
</details> </details>
<details> <details>
<summary><h4>September (29 entries)</h4></summary> <summary><h4>September - 30 entries</h4></summary>
[View September 2025 Changelog](.github/changelogs/2025/09.md) [View September 2025 Changelog](.github/changelogs/2025/09.md)
</details> </details>
<details> <details>
<summary><h4>August (30 entries)</h4></summary> <summary><h4>August - 31 entries</h4></summary>
[View August 2025 Changelog](.github/changelogs/2025/08.md) [View August 2025 Changelog](.github/changelogs/2025/08.md)
</details> </details>
<details> <details>
<summary><h4>July (29 entries)</h4></summary> <summary><h4>July - 30 entries</h4></summary>
[View July 2025 Changelog](.github/changelogs/2025/07.md) [View July 2025 Changelog](.github/changelogs/2025/07.md)
</details> </details>
<details> <details>
<summary><h4>June (29 entries)</h4></summary> <summary><h4>June - 30 entries</h4></summary>
[View June 2025 Changelog](.github/changelogs/2025/06.md) [View June 2025 Changelog](.github/changelogs/2025/06.md)
</details> </details>
<details> <details>
<summary><h4>May (30 entries)</h4></summary> <summary><h4>May - 31 entries</h4></summary>
[View May 2025 Changelog](.github/changelogs/2025/05.md) [View May 2025 Changelog](.github/changelogs/2025/05.md)
</details> </details>
<details> <details>
<summary><h4>April (25 entries)</h4></summary> <summary><h4>April - 26 entries</h4></summary>
[View April 2025 Changelog](.github/changelogs/2025/04.md) [View April 2025 Changelog](.github/changelogs/2025/04.md)
</details> </details>
<details> <details>
<summary><h4>March (30 entries)</h4></summary> <summary><h4>March - 31 entries</h4></summary>
[View March 2025 Changelog](.github/changelogs/2025/03.md) [View March 2025 Changelog](.github/changelogs/2025/03.md)
</details> </details>
<details> <details>
<summary><h4>February (26 entries)</h4></summary> <summary><h4>February - 27 entries</h4></summary>
[View February 2025 Changelog](.github/changelogs/2025/02.md) [View February 2025 Changelog](.github/changelogs/2025/02.md)
</details> </details>
<details> <details>
<summary><h4>January (27 entries)</h4></summary> <summary><h4>January - 28 entries</h4></summary>
[View January 2025 Changelog](.github/changelogs/2025/01.md) [View January 2025 Changelog](.github/changelogs/2025/01.md)
@@ -134,84 +131,84 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details> <details>
<summary><h4>December (22 entries)</h4></summary> <summary><h4>December - 23 entries</h4></summary>
[View December 2024 Changelog](.github/changelogs/2024/12.md) [View December 2024 Changelog](.github/changelogs/2024/12.md)
</details> </details>
<details> <details>
<summary><h4>November (15 entries)</h4></summary> <summary><h4>November - 16 entries</h4></summary>
[View November 2024 Changelog](.github/changelogs/2024/11.md) [View November 2024 Changelog](.github/changelogs/2024/11.md)
</details> </details>
<details> <details>
<summary><h4>October (9 entries)</h4></summary> <summary><h4>October - 10 entries</h4></summary>
[View October 2024 Changelog](.github/changelogs/2024/10.md) [View October 2024 Changelog](.github/changelogs/2024/10.md)
</details> </details>
<details> <details>
<summary><h4>September (1 entries)</h4></summary> <summary><h4>September - 2 entries</h4></summary>
[View September 2024 Changelog](.github/changelogs/2024/09.md) [View September 2024 Changelog](.github/changelogs/2024/09.md)
</details> </details>
<details> <details>
<summary><h4>August (2 entries)</h4></summary> <summary><h4>August - 3 entries</h4></summary>
[View August 2024 Changelog](.github/changelogs/2024/08.md) [View August 2024 Changelog](.github/changelogs/2024/08.md)
</details> </details>
<details> <details>
<summary><h4>July (0 entries)</h4></summary> <summary><h4>July - 1 entries</h4></summary>
[View July 2024 Changelog](.github/changelogs/2024/07.md) [View July 2024 Changelog](.github/changelogs/2024/07.md)
</details> </details>
<details> <details>
<summary><h4>June (8 entries)</h4></summary> <summary><h4>June - 9 entries</h4></summary>
[View June 2024 Changelog](.github/changelogs/2024/06.md) [View June 2024 Changelog](.github/changelogs/2024/06.md)
</details> </details>
<details> <details>
<summary><h4>May (16 entries)</h4></summary> <summary><h4>May - 17 entries</h4></summary>
[View May 2024 Changelog](.github/changelogs/2024/05.md) [View May 2024 Changelog](.github/changelogs/2024/05.md)
</details> </details>
<details> <details>
<summary><h4>April (14 entries)</h4></summary> <summary><h4>April - 15 entries</h4></summary>
[View April 2024 Changelog](.github/changelogs/2024/04.md) [View April 2024 Changelog](.github/changelogs/2024/04.md)
</details> </details>
<details> <details>
<summary><h4>March (5 entries)</h4></summary> <summary><h4>March - 6 entries</h4></summary>
[View March 2024 Changelog](.github/changelogs/2024/03.md) [View March 2024 Changelog](.github/changelogs/2024/03.md)
</details> </details>
<details> <details>
<summary><h4>February (9 entries)</h4></summary> <summary><h4>February - 10 entries</h4></summary>
[View February 2024 Changelog](.github/changelogs/2024/02.md) [View February 2024 Changelog](.github/changelogs/2024/02.md)
</details> </details>
<details> <details>
<summary><h4>January (9 entries)</h4></summary> <summary><h4>January - 10 entries</h4></summary>
[View January 2024 Changelog](.github/changelogs/2024/01.md) [View January 2024 Changelog](.github/changelogs/2024/01.md)
@@ -224,84 +221,84 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details> <details>
<summary><h4>December (3 entries)</h4></summary> <summary><h4>December - 4 entries</h4></summary>
[View December 2023 Changelog](.github/changelogs/2023/12.md) [View December 2023 Changelog](.github/changelogs/2023/12.md)
</details> </details>
<details> <details>
<summary><h4>November (3 entries)</h4></summary> <summary><h4>November - 4 entries</h4></summary>
[View November 2023 Changelog](.github/changelogs/2023/11.md) [View November 2023 Changelog](.github/changelogs/2023/11.md)
</details> </details>
<details> <details>
<summary><h4>October (7 entries)</h4></summary> <summary><h4>October - 8 entries</h4></summary>
[View October 2023 Changelog](.github/changelogs/2023/10.md) [View October 2023 Changelog](.github/changelogs/2023/10.md)
</details> </details>
<details> <details>
<summary><h4>September (10 entries)</h4></summary> <summary><h4>September - 11 entries</h4></summary>
[View September 2023 Changelog](.github/changelogs/2023/09.md) [View September 2023 Changelog](.github/changelogs/2023/09.md)
</details> </details>
<details> <details>
<summary><h4>August (7 entries)</h4></summary> <summary><h4>August - 8 entries</h4></summary>
[View August 2023 Changelog](.github/changelogs/2023/08.md) [View August 2023 Changelog](.github/changelogs/2023/08.md)
</details> </details>
<details> <details>
<summary><h4>July (5 entries)</h4></summary> <summary><h4>July - 6 entries</h4></summary>
[View July 2023 Changelog](.github/changelogs/2023/07.md) [View July 2023 Changelog](.github/changelogs/2023/07.md)
</details> </details>
<details> <details>
<summary><h4>June (5 entries)</h4></summary> <summary><h4>June - 6 entries</h4></summary>
[View June 2023 Changelog](.github/changelogs/2023/06.md) [View June 2023 Changelog](.github/changelogs/2023/06.md)
</details> </details>
<details> <details>
<summary><h4>May (8 entries)</h4></summary> <summary><h4>May - 9 entries</h4></summary>
[View May 2023 Changelog](.github/changelogs/2023/05.md) [View May 2023 Changelog](.github/changelogs/2023/05.md)
</details> </details>
<details> <details>
<summary><h4>April (8 entries)</h4></summary> <summary><h4>April - 9 entries</h4></summary>
[View April 2023 Changelog](.github/changelogs/2023/04.md) [View April 2023 Changelog](.github/changelogs/2023/04.md)
</details> </details>
<details> <details>
<summary><h4>March (8 entries)</h4></summary> <summary><h4>March - 9 entries</h4></summary>
[View March 2023 Changelog](.github/changelogs/2023/03.md) [View March 2023 Changelog](.github/changelogs/2023/03.md)
</details> </details>
<details> <details>
<summary><h4>February (6 entries)</h4></summary> <summary><h4>February - 7 entries</h4></summary>
[View February 2023 Changelog](.github/changelogs/2023/02.md) [View February 2023 Changelog](.github/changelogs/2023/02.md)
</details> </details>
<details> <details>
<summary><h4>January (15 entries)</h4></summary> <summary><h4>January - 16 entries</h4></summary>
[View January 2023 Changelog](.github/changelogs/2023/01.md) [View January 2023 Changelog](.github/changelogs/2023/01.md)
@@ -314,84 +311,84 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
<details> <details>
<summary><h4>December (7 entries)</h4></summary> <summary><h4>December - 8 entries</h4></summary>
[View December 2022 Changelog](.github/changelogs/2022/12.md) [View December 2022 Changelog](.github/changelogs/2022/12.md)
</details> </details>
<details> <details>
<summary><h4>November (7 entries)</h4></summary> <summary><h4>November - 8 entries</h4></summary>
[View November 2022 Changelog](.github/changelogs/2022/11.md) [View November 2022 Changelog](.github/changelogs/2022/11.md)
</details> </details>
<details> <details>
<summary><h4>October (2 entries)</h4></summary> <summary><h4>October - 3 entries</h4></summary>
[View October 2022 Changelog](.github/changelogs/2022/10.md) [View October 2022 Changelog](.github/changelogs/2022/10.md)
</details> </details>
<details> <details>
<summary><h4>September (9 entries)</h4></summary> <summary><h4>September - 10 entries</h4></summary>
[View September 2022 Changelog](.github/changelogs/2022/09.md) [View September 2022 Changelog](.github/changelogs/2022/09.md)
</details> </details>
<details> <details>
<summary><h4>August (7 entries)</h4></summary> <summary><h4>August - 8 entries</h4></summary>
[View August 2022 Changelog](.github/changelogs/2022/08.md) [View August 2022 Changelog](.github/changelogs/2022/08.md)
</details> </details>
<details> <details>
<summary><h4>July (10 entries)</h4></summary> <summary><h4>July - 11 entries</h4></summary>
[View July 2022 Changelog](.github/changelogs/2022/07.md) [View July 2022 Changelog](.github/changelogs/2022/07.md)
</details> </details>
<details> <details>
<summary><h4>June (1 entries)</h4></summary> <summary><h4>June - 2 entries</h4></summary>
[View June 2022 Changelog](.github/changelogs/2022/06.md) [View June 2022 Changelog](.github/changelogs/2022/06.md)
</details> </details>
<details> <details>
<summary><h4>May (8 entries)</h4></summary> <summary><h4>May - 9 entries</h4></summary>
[View May 2022 Changelog](.github/changelogs/2022/05.md) [View May 2022 Changelog](.github/changelogs/2022/05.md)
</details> </details>
<details> <details>
<summary><h4>April (13 entries)</h4></summary> <summary><h4>April - 14 entries</h4></summary>
[View April 2022 Changelog](.github/changelogs/2022/04.md) [View April 2022 Changelog](.github/changelogs/2022/04.md)
</details> </details>
<details> <details>
<summary><h4>March (20 entries)</h4></summary> <summary><h4>March - 21 entries</h4></summary>
[View March 2022 Changelog](.github/changelogs/2022/03.md) [View March 2022 Changelog](.github/changelogs/2022/03.md)
</details> </details>
<details> <details>
<summary><h4>February (15 entries)</h4></summary> <summary><h4>February - 16 entries</h4></summary>
[View February 2022 Changelog](.github/changelogs/2022/02.md) [View February 2022 Changelog](.github/changelogs/2022/02.md)
</details> </details>
<details> <details>
<summary><h4>January (3 entries)</h4></summary> <summary><h4>January - 4 entries</h4></summary>
[View January 2022 Changelog](.github/changelogs/2022/01.md) [View January 2022 Changelog](.github/changelogs/2022/01.md)
@@ -401,257 +398,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details> </details>
## 2026-02-12
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Pangolin: Update database generation command in install script [@tremor021](https://github.com/tremor021) ([#11825](https://github.com/community-scripts/ProxmoxVE/pull/11825))
- #### ✨ New Features
- Debian13-VM: Optimize First Boot & add noCloud/Cloud Selection [@MickLesk](https://github.com/MickLesk) ([#11810](https://github.com/community-scripts/ProxmoxVE/pull/11810))
### 💾 Core
- #### ✨ New Features
- core: remove old Go API and extend misc/api.func with new backend [@MickLesk](https://github.com/MickLesk) ([#11822](https://github.com/community-scripts/ProxmoxVE/pull/11822))
## 2026-02-11
### 🆕 New Scripts
- Draw.io ([#11788](https://github.com/community-scripts/ProxmoxVE/pull/11788))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- dispatcharr: include port 9191 in success-message [@MickLesk](https://github.com/MickLesk) ([#11808](https://github.com/community-scripts/ProxmoxVE/pull/11808))
- fix: make donetick 0.1.71 compatible [@tomfrenzel](https://github.com/tomfrenzel) ([#11804](https://github.com/community-scripts/ProxmoxVE/pull/11804))
- Kasm: Support new version URL format without hash suffix [@MickLesk](https://github.com/MickLesk) ([#11787](https://github.com/community-scripts/ProxmoxVE/pull/11787))
- LibreTranslate: Remove Torch [@tremor021](https://github.com/tremor021) ([#11783](https://github.com/community-scripts/ProxmoxVE/pull/11783))
- Snowshare: fix update script [@TuroYT](https://github.com/TuroYT) ([#11726](https://github.com/community-scripts/ProxmoxVE/pull/11726))
- #### ✨ New Features
- [Feature] OpenCloud: support PosixFS Collaborative Mode [@vhsdream](https://github.com/vhsdream) ([#11806](https://github.com/community-scripts/ProxmoxVE/pull/11806))
### 💾 Core
- #### 🔧 Refactor
- core: respect EDITOR variable for config editing [@ls-root](https://github.com/ls-root) ([#11693](https://github.com/community-scripts/ProxmoxVE/pull/11693))
### 📚 Documentation
- Fix formatting in kutt.json notes section [@tiagodenoronha](https://github.com/tiagodenoronha) ([#11774](https://github.com/community-scripts/ProxmoxVE/pull/11774))
## 2026-02-10
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Immich: Pin version to 2.5.6 [@vhsdream](https://github.com/vhsdream) ([#11775](https://github.com/community-scripts/ProxmoxVE/pull/11775))
- Libretranslate: Fix setuptools [@tremor021](https://github.com/tremor021) ([#11772](https://github.com/community-scripts/ProxmoxVE/pull/11772))
- Element Synapse: prevent systemd invoke failure during apt install [@MickLesk](https://github.com/MickLesk) ([#11758](https://github.com/community-scripts/ProxmoxVE/pull/11758))
- #### ✨ New Features
- Refactor: Slskd & Soularr [@vhsdream](https://github.com/vhsdream) ([#11674](https://github.com/community-scripts/ProxmoxVE/pull/11674))
### 🗑️ Deleted Scripts
- move paperless-exporter from LXC to addon ([#11737](https://github.com/community-scripts/ProxmoxVE/pull/11737))
### 🧰 Tools
- #### 🐞 Bug Fixes
- feat: improve storage parsing & add guestname [@carlosmaroot](https://github.com/carlosmaroot) ([#11752](https://github.com/community-scripts/ProxmoxVE/pull/11752))
### 📂 Github
- Github-Version Workflow: include addon scripts in extraction [@MickLesk](https://github.com/MickLesk) ([#11757](https://github.com/community-scripts/ProxmoxVE/pull/11757))
### 🌐 Website
- #### 📝 Script Information
- Snowshare: fix typo in config file path on website [@BirdMakingStuff](https://github.com/BirdMakingStuff) ([#11754](https://github.com/community-scripts/ProxmoxVE/pull/11754))
## 2026-02-09
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- several scripts: add --clear to uv venv calls for uv 0.10 compatibility [@MickLesk](https://github.com/MickLesk) ([#11723](https://github.com/community-scripts/ProxmoxVE/pull/11723))
- Koillection: ensure setup_composer is in update script [@MickLesk](https://github.com/MickLesk) ([#11734](https://github.com/community-scripts/ProxmoxVE/pull/11734))
- PeaNUT: symlink server.js after update [@vhsdream](https://github.com/vhsdream) ([#11696](https://github.com/community-scripts/ProxmoxVE/pull/11696))
- Umlautadaptarr: use release appsettings.json instead of hardcoded copy [@MickLesk](https://github.com/MickLesk) ([#11725](https://github.com/community-scripts/ProxmoxVE/pull/11725))
- tracearr: prepare for next stable release [@durzo](https://github.com/durzo) ([#11673](https://github.com/community-scripts/ProxmoxVE/pull/11673))
- #### ✨ New Features
- remove whiptail from update scripts for unattended update support [@MickLesk](https://github.com/MickLesk) ([#11712](https://github.com/community-scripts/ProxmoxVE/pull/11712))
- #### 🔧 Refactor
- Refactor: FileFlows [@tremor021](https://github.com/tremor021) ([#11108](https://github.com/community-scripts/ProxmoxVE/pull/11108))
- Refactor: wger [@MickLesk](https://github.com/MickLesk) ([#11722](https://github.com/community-scripts/ProxmoxVE/pull/11722))
- Nginx-UI: better User Handling | ACME [@MickLesk](https://github.com/MickLesk) ([#11715](https://github.com/community-scripts/ProxmoxVE/pull/11715))
- NginxProxymanager: use better-sqlite3 [@MickLesk](https://github.com/MickLesk) ([#11708](https://github.com/community-scripts/ProxmoxVE/pull/11708))
### 💾 Core
- #### 🔧 Refactor
- hwaccel: add libmfx-gen1.2 to Intel Arc setup for QSV support [@MickLesk](https://github.com/MickLesk) ([#11707](https://github.com/community-scripts/ProxmoxVE/pull/11707))
### 🧰 Tools
- #### 🐞 Bug Fixes
- addons: ensure curl is installed before use [@MickLesk](https://github.com/MickLesk) ([#11718](https://github.com/community-scripts/ProxmoxVE/pull/11718))
- Netbird (addon): add systemd ordering to start after Docker [@MickLesk](https://github.com/MickLesk) ([#11716](https://github.com/community-scripts/ProxmoxVE/pull/11716))
### ❔ Uncategorized
- Bichon: Update website [@tremor021](https://github.com/tremor021) ([#11711](https://github.com/community-scripts/ProxmoxVE/pull/11711))
## 2026-02-08
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- feat(healthchecks): add sendalerts service [@Mika56](https://github.com/Mika56) ([#11694](https://github.com/community-scripts/ProxmoxVE/pull/11694))
- ComfyUI: Dynamic Fetch PyTorch Versions [@MickLesk](https://github.com/MickLesk) ([#11657](https://github.com/community-scripts/ProxmoxVE/pull/11657))
- #### 💥 Breaking Changes
- Semaphore: switch from Debian to Ubuntu 24.04 [@MickLesk](https://github.com/MickLesk) ([#11670](https://github.com/community-scripts/ProxmoxVE/pull/11670))
## 2026-02-07
### 🆕 New Scripts
- Checkmate ([#11672](https://github.com/community-scripts/ProxmoxVE/pull/11672))
- Bichon ([#11671](https://github.com/community-scripts/ProxmoxVE/pull/11671))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- NocoDB: pin to v0.301.1 [@MickLesk](https://github.com/MickLesk) ([#11655](https://github.com/community-scripts/ProxmoxVE/pull/11655))
- Pin Memos to v0.25.3 - last version with release binaries [@MickLesk](https://github.com/MickLesk) ([#11658](https://github.com/community-scripts/ProxmoxVE/pull/11658))
- Downgrade: OpenProject | NginxProxyManager | Semaphore to Debian 12 due to persistent SHA1 issues [@MickLesk](https://github.com/MickLesk) ([#11654](https://github.com/community-scripts/ProxmoxVE/pull/11654))
### 💾 Core
- #### ✨ New Features
- tools: fallback to previous release when asset is missing [@MickLesk](https://github.com/MickLesk) ([#11660](https://github.com/community-scripts/ProxmoxVE/pull/11660))
### 📚 Documentation
- fix(setup): correctly auto-detect username when using --full [@ls-root](https://github.com/ls-root) ([#11650](https://github.com/community-scripts/ProxmoxVE/pull/11650))
### 🌐 Website
- #### ✨ New Features
- feat(frontend): add JSON script import functionality [@ls-root](https://github.com/ls-root) ([#11563](https://github.com/community-scripts/ProxmoxVE/pull/11563))
## 2026-02-06
### 🆕 New Scripts
- Nightscout ([#11621](https://github.com/community-scripts/ProxmoxVE/pull/11621))
- PVE LXC Apps Updater [@MickLesk](https://github.com/MickLesk) ([#11533](https://github.com/community-scripts/ProxmoxVE/pull/11533))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Immich: supress startup messages for immich-admin [@vhsdream](https://github.com/vhsdream) ([#11635](https://github.com/community-scripts/ProxmoxVE/pull/11635))
- Semaphore: Change Ubuntu release from 'jammy' to 'noble' [@MickLesk](https://github.com/MickLesk) ([#11625](https://github.com/community-scripts/ProxmoxVE/pull/11625))
- Pangolin: replace build:sqlite with db:generate + build [@MickLesk](https://github.com/MickLesk) ([#11616](https://github.com/community-scripts/ProxmoxVE/pull/11616))
- [FIX] OpenCloud: path issues [@vhsdream](https://github.com/vhsdream) ([#11593](https://github.com/community-scripts/ProxmoxVE/pull/11593))
- [FIX] Homepage: preserve public/images & public/icons if they exist [@vhsdream](https://github.com/vhsdream) ([#11594](https://github.com/community-scripts/ProxmoxVE/pull/11594))
- #### ✨ New Features
- Shelfmark: remove Chromedriver dep, add URL_BASE env [@vhsdream](https://github.com/vhsdream) ([#11619](https://github.com/community-scripts/ProxmoxVE/pull/11619))
- Immich: pin to v2.5.5 [@vhsdream](https://github.com/vhsdream) ([#11598](https://github.com/community-scripts/ProxmoxVE/pull/11598))
- #### 🔧 Refactor
- refactor: homepage [@CrazyWolf13](https://github.com/CrazyWolf13) ([#11605](https://github.com/community-scripts/ProxmoxVE/pull/11605))
### 💾 Core
- #### 🐞 Bug Fixes
- fix(core): spinner misalignment [@ls-root](https://github.com/ls-root) ([#11627](https://github.com/community-scripts/ProxmoxVE/pull/11627))
- #### 🔧 Refactor
- [Fix] build.func: QOL grammar adjustment for Creating LXC message [@vhsdream](https://github.com/vhsdream) ([#11633](https://github.com/community-scripts/ProxmoxVE/pull/11633))
### 📚 Documentation
- [gh] Update to the New Script request template [@tremor021](https://github.com/tremor021) ([#11612](https://github.com/community-scripts/ProxmoxVE/pull/11612))
### 🌐 Website
- #### 📝 Script Information
- Update LXC App Updater JSON to reflect tag override option [@vhsdream](https://github.com/vhsdream) ([#11626](https://github.com/community-scripts/ProxmoxVE/pull/11626))
### ❔ Uncategorized
- Opencloud: fix JSON [@vhsdream](https://github.com/vhsdream) ([#11617](https://github.com/community-scripts/ProxmoxVE/pull/11617))
## 2026-02-05
### 🆕 New Scripts
- OpenCloud ([#11538](https://github.com/community-scripts/ProxmoxVE/pull/11538))
- Nginx-UI ([#11573](https://github.com/community-scripts/ProxmoxVE/pull/11573))
- New: SQL-Server 2025 | Refactor SQL-Server 2022 [@MickLesk](https://github.com/MickLesk) ([#11546](https://github.com/community-scripts/ProxmoxVE/pull/11546))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- OpenCloud: pin version to 5.0.2; Collabora CSP fix [@vhsdream](https://github.com/vhsdream) ([#11585](https://github.com/community-scripts/ProxmoxVE/pull/11585))
- Wanderer: Fix repo [@tremor021](https://github.com/tremor021) ([#11567](https://github.com/community-scripts/ProxmoxVE/pull/11567))
- #### ✨ New Features
- Refactor: Docker-VM (Multi-OS / Cloud-Init / Stabilization) [@MickLesk](https://github.com/MickLesk) ([#9047](https://github.com/community-scripts/ProxmoxVE/pull/9047))
### 💾 Core
- #### ✨ New Features
- cloud-init: add interactive SSH key discovery and selection [@MickLesk](https://github.com/MickLesk) ([#11547](https://github.com/community-scripts/ProxmoxVE/pull/11547))
### 📚 Documentation
- github: extend docs / contribution / templates [@MickLesk](https://github.com/MickLesk) ([#10921](https://github.com/community-scripts/ProxmoxVE/pull/10921))
### 🌐 Website
- #### 🐞 Bug Fixes
- fix(frontend): theme respective syntax highlighting [@ls-root](https://github.com/ls-root) ([#11565](https://github.com/community-scripts/ProxmoxVE/pull/11565))
## 2026-02-04 ## 2026-02-04
### 🆕 New Scripts ### 🆕 New Scripts
@@ -661,11 +407,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
### 🚀 Updated Scripts ### 🚀 Updated Scripts
- Add log directory and permissions for koillection [@shineangelic](https://github.com/shineangelic) ([#11553](https://github.com/community-scripts/ProxmoxVE/pull/11553))
- #### 🐞 Bug Fixes - #### 🐞 Bug Fixes
- [FIX] Scanopy: ensure Scanopy Daemon update [@vhsdream](https://github.com/vhsdream) ([#11541](https://github.com/community-scripts/ProxmoxVE/pull/11541))
- Immich: pin version to 2.5.3 [@vhsdream](https://github.com/vhsdream) ([#11515](https://github.com/community-scripts/ProxmoxVE/pull/11515)) - Immich: pin version to 2.5.3 [@vhsdream](https://github.com/vhsdream) ([#11515](https://github.com/community-scripts/ProxmoxVE/pull/11515))
### 💾 Core ### 💾 Core
@@ -686,10 +429,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- fix(frontend): implement weighted search scoring for command menu [@ls-root](https://github.com/ls-root) ([#11534](https://github.com/community-scripts/ProxmoxVE/pull/11534)) - fix(frontend): implement weighted search scoring for command menu [@ls-root](https://github.com/ls-root) ([#11534](https://github.com/community-scripts/ProxmoxVE/pull/11534))
### ❔ Uncategorized
- [FIX] Immich Public Proxy docs link [@vhsdream](https://github.com/vhsdream) ([#11543](https://github.com/community-scripts/ProxmoxVE/pull/11543))
## 2026-02-03 ## 2026-02-03
### 🆕 New Scripts ### 🆕 New Scripts
@@ -1429,4 +1168,117 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 💥 Breaking Changes - #### 💥 Breaking Changes
- fix: setup_mariadb hangs on [@CrazyWolf13](https://github.com/CrazyWolf13) ([#10672](https://github.com/community-scripts/ProxmoxVE/pull/10672)) - fix: setup_mariadb hangs on [@CrazyWolf13](https://github.com/CrazyWolf13) ([#10672](https://github.com/community-scripts/ProxmoxVE/pull/10672))
## 2026-01-08
### 🆕 New Scripts
- GWN-Manager ([#10642](https://github.com/community-scripts/ProxmoxVE/pull/10642))
### 🚀 Updated Scripts
- Fix line continuation for vlc-bin installation [@chinedu40](https://github.com/chinedu40) ([#10654](https://github.com/community-scripts/ProxmoxVE/pull/10654))
- #### 🐞 Bug Fixes
- outline: use corepack yarn module [@MickLesk](https://github.com/MickLesk) ([#10652](https://github.com/community-scripts/ProxmoxVE/pull/10652))
- Remove unnecessary quotes from variable expansions in VM scripts [@MickLesk](https://github.com/MickLesk) ([#10649](https://github.com/community-scripts/ProxmoxVE/pull/10649))
- Monica: Fix database variable names [@tremor021](https://github.com/tremor021) ([#10634](https://github.com/community-scripts/ProxmoxVE/pull/10634))
- Tianji: Fix PostrgreSQL vars [@tremor021](https://github.com/tremor021) ([#10633](https://github.com/community-scripts/ProxmoxVE/pull/10633))
- #### 🔧 Refactor
- deCONZ: Bump to Trixie base [@tremor021](https://github.com/tremor021) ([#10643](https://github.com/community-scripts/ProxmoxVE/pull/10643))
## 2026-01-07
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- pve-scripts-local: fix missing exit in update [@MickLesk](https://github.com/MickLesk) ([#10630](https://github.com/community-scripts/ProxmoxVE/pull/10630))
- #### ✨ New Features
- Upgrade ESPHome LXC to Debian 13 [@heinemannj](https://github.com/heinemannj) ([#10624](https://github.com/community-scripts/ProxmoxVE/pull/10624))
- #### 🔧 Refactor
- Explicitly state installation method [@tremor021](https://github.com/tremor021) ([#10608](https://github.com/community-scripts/ProxmoxVE/pull/10608))
### 🧰 Tools
- Modify Debian sources list for trixie updates (as 4.1.0-1 config) [@maiux](https://github.com/maiux) ([#10505](https://github.com/community-scripts/ProxmoxVE/pull/10505))
## 2026-01-06
### 🆕 New Scripts
- Sportarr ([#10600](https://github.com/community-scripts/ProxmoxVE/pull/10600))
### 🚀 Updated Scripts
- chore: fix update msg [@CrazyWolf13](https://github.com/CrazyWolf13) ([#10593](https://github.com/community-scripts/ProxmoxVE/pull/10593))
- #### 🐞 Bug Fixes
- InspIRCd: Fix release fetching [@tremor021](https://github.com/tremor021) ([#10578](https://github.com/community-scripts/ProxmoxVE/pull/10578))
- #### 🔧 Refactor
- Refactor: Sonarr [@tremor021](https://github.com/tremor021) ([#10573](https://github.com/community-scripts/ProxmoxVE/pull/10573))
- Refactor: Dispatcharr [@tremor021](https://github.com/tremor021) ([#10599](https://github.com/community-scripts/ProxmoxVE/pull/10599))
### 💾 Core
- #### ✨ New Features
- hwaccel: rewrite of GPU hardware acceleration support [@MickLesk](https://github.com/MickLesk) ([#10597](https://github.com/community-scripts/ProxmoxVE/pull/10597))
### 🧰 Tools
- #### 🐞 Bug Fixes
- iptag: fix syntax error in VM config file parsing [@MickLesk](https://github.com/MickLesk) ([#10598](https://github.com/community-scripts/ProxmoxVE/pull/10598))
- #### ✨ New Features
- Update clean-lxcs.sh to support Red Hat compatible distros [@jabofh](https://github.com/jabofh) ([#10583](https://github.com/community-scripts/ProxmoxVE/pull/10583))
### 📚 Documentation
- [gh] New Script template update [@tremor021](https://github.com/tremor021) ([#10607](https://github.com/community-scripts/ProxmoxVE/pull/10607))
- chore: bump copyright to 2026 - happy new year [@CrazyWolf13](https://github.com/CrazyWolf13) ([#10585](https://github.com/community-scripts/ProxmoxVE/pull/10585))
### 📂 Github
- re-add shellcheck exclusions [@CrazyWolf13](https://github.com/CrazyWolf13) ([#10586](https://github.com/community-scripts/ProxmoxVE/pull/10586))
## 2026-01-05
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- reitti: add postgis extension to PostgreSQL DB setup [@MickLesk](https://github.com/MickLesk) ([#10555](https://github.com/community-scripts/ProxmoxVE/pull/10555))
- openWRT: separate disk attachment and resizing in VM setup [@MickLesk](https://github.com/MickLesk) ([#10557](https://github.com/community-scripts/ProxmoxVE/pull/10557))
- paperless-ai: Set TMPDIR for pip to use disk during install [@MickLesk](https://github.com/MickLesk) ([#10559](https://github.com/community-scripts/ProxmoxVE/pull/10559))
- #### 🔧 Refactor
- Refactor: Monica [@tremor021](https://github.com/tremor021) ([#10552](https://github.com/community-scripts/ProxmoxVE/pull/10552))
- Upgrade Wazuh LXC Container to Debian 13 [@heinemannj](https://github.com/heinemannj) ([#10551](https://github.com/community-scripts/ProxmoxVE/pull/10551))
- Upgrade evcc LXC to Debian 13 [@heinemannj](https://github.com/heinemannj) ([#10548](https://github.com/community-scripts/ProxmoxVE/pull/10548))
### 💾 Core
- #### 🔧 Refactor
- Harden setup_hwaccel for old Intel GPUs [@MickLesk](https://github.com/MickLesk) ([#10556](https://github.com/community-scripts/ProxmoxVE/pull/10556))
### 🧰 Tools
- #### 🔧 Refactor
- Refactor: IP-Tag (Multiple IP / Performance / Execution Time) [@MickLesk](https://github.com/MickLesk) ([#10558](https://github.com/community-scripts/ProxmoxVE/pull/10558))

5
api/.env.example Normal file
View File

@@ -0,0 +1,5 @@
MONGO_USER=
MONGO_PASSWORD=
MONGO_IP=
MONGO_PORT=
MONGO_DATABASE=

23
api/go.mod Normal file
View File

@@ -0,0 +1,23 @@
module proxmox-api
go 1.24.0
require (
github.com/gorilla/mux v1.8.1
github.com/joho/godotenv v1.5.1
github.com/rs/cors v1.11.1
go.mongodb.org/mongo-driver v1.17.2
)
require (
github.com/golang/snappy v0.0.4 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
golang.org/x/crypto v0.45.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/text v0.31.0 // indirect
)

56
api/go.sum Normal file
View File

@@ -0,0 +1,56 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE=
github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=
github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=
github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=
github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.mongodb.org/mongo-driver v1.17.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793SqyhzM=
go.mongodb.org/mongo-driver v1.17.2/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

450
api/main.go Normal file
View File

@@ -0,0 +1,450 @@
// Copyright (c) 2021-2026 community-scripts ORG
// Author: Michel Roegl-Brunner (michelroegl-brunner)
// License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"strconv"
"time"
"github.com/gorilla/mux"
"github.com/joho/godotenv"
"github.com/rs/cors"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
var client *mongo.Client
var collection *mongo.Collection
func loadEnv() {
if err := godotenv.Load(); err != nil {
log.Fatal("Error loading .env file")
}
}
// DataModel represents a single document in MongoDB
type DataModel struct {
ID primitive.ObjectID `json:"id" bson:"_id,omitempty"`
CT_TYPE uint `json:"ct_type" bson:"ct_type"`
DISK_SIZE float32 `json:"disk_size" bson:"disk_size"`
CORE_COUNT uint `json:"core_count" bson:"core_count"`
RAM_SIZE uint `json:"ram_size" bson:"ram_size"`
OS_TYPE string `json:"os_type" bson:"os_type"`
OS_VERSION string `json:"os_version" bson:"os_version"`
DISABLEIP6 string `json:"disableip6" bson:"disableip6"`
NSAPP string `json:"nsapp" bson:"nsapp"`
METHOD string `json:"method" bson:"method"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
PVEVERSION string `json:"pve_version" bson:"pve_version"`
STATUS string `json:"status" bson:"status"`
RANDOM_ID string `json:"random_id" bson:"random_id"`
TYPE string `json:"type" bson:"type"`
ERROR string `json:"error" bson:"error"`
}
type StatusModel struct {
RANDOM_ID string `json:"random_id" bson:"random_id"`
ERROR string `json:"error" bson:"error"`
STATUS string `json:"status" bson:"status"`
}
type CountResponse struct {
TotalEntries int64 `json:"total_entries"`
StatusCount map[string]int64 `json:"status_count"`
NSAPPCount map[string]int64 `json:"nsapp_count"`
}
// ConnectDatabase initializes the MongoDB connection
func ConnectDatabase() {
loadEnv()
mongoURI := fmt.Sprintf("mongodb://%s:%s@%s:%s",
os.Getenv("MONGO_USER"),
os.Getenv("MONGO_PASSWORD"),
os.Getenv("MONGO_IP"),
os.Getenv("MONGO_PORT"))
database := os.Getenv("MONGO_DATABASE")
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
var err error
client, err = mongo.Connect(ctx, options.Client().ApplyURI(mongoURI))
if err != nil {
log.Fatal("Failed to connect to MongoDB!", err)
}
collection = client.Database(database).Collection("data_models")
fmt.Println("Connected to MongoDB on 10.10.10.18")
}
// UploadJSON handles API requests and stores data as a document in MongoDB
func UploadJSON(w http.ResponseWriter, r *http.Request) {
var input DataModel
if err := json.NewDecoder(r.Body).Decode(&input); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
input.CreatedAt = time.Now()
_, err := collection.InsertOne(context.Background(), input)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
log.Println("Received data:", input)
w.WriteHeader(http.StatusCreated)
json.NewEncoder(w).Encode(map[string]string{"message": "Data saved successfully"})
}
// UpdateStatus updates the status of a record based on RANDOM_ID
func UpdateStatus(w http.ResponseWriter, r *http.Request) {
var input StatusModel
if err := json.NewDecoder(r.Body).Decode(&input); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
filter := bson.M{"random_id": input.RANDOM_ID}
update := bson.M{"$set": bson.M{"status": input.STATUS, "error": input.ERROR}}
_, err := collection.UpdateOne(context.Background(), filter, update)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
log.Println("Updated data:", input)
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(map[string]string{"message": "Record updated successfully"})
}
// GetDataJSON fetches all data from MongoDB
func GetDataJSON(w http.ResponseWriter, r *http.Request) {
var records []DataModel
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
cursor, err := collection.Find(ctx, bson.M{})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer cursor.Close(ctx)
for cursor.Next(ctx) {
var record DataModel
if err := cursor.Decode(&record); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
records = append(records, record)
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(records)
}
func GetPaginatedData(w http.ResponseWriter, r *http.Request) {
page, _ := strconv.Atoi(r.URL.Query().Get("page"))
limit, _ := strconv.Atoi(r.URL.Query().Get("limit"))
if page < 1 {
page = 1
}
if limit < 1 {
limit = 10
}
skip := (page - 1) * limit
var records []DataModel
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
options := options.Find().SetSkip(int64(skip)).SetLimit(int64(limit))
cursor, err := collection.Find(ctx, bson.M{}, options)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer cursor.Close(ctx)
for cursor.Next(ctx) {
var record DataModel
if err := cursor.Decode(&record); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
records = append(records, record)
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(records)
}
func GetSummary(w http.ResponseWriter, r *http.Request) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
totalCount, err := collection.CountDocuments(ctx, bson.M{})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
statusCount := make(map[string]int64)
nsappCount := make(map[string]int64)
pipeline := []bson.M{
{"$group": bson.M{"_id": "$status", "count": bson.M{"$sum": 1}}},
}
cursor, err := collection.Aggregate(ctx, pipeline)
if err == nil {
for cursor.Next(ctx) {
var result struct {
ID string `bson:"_id"`
Count int64 `bson:"count"`
}
if err := cursor.Decode(&result); err == nil {
statusCount[result.ID] = result.Count
}
}
}
pipeline = []bson.M{
{"$group": bson.M{"_id": "$nsapp", "count": bson.M{"$sum": 1}}},
}
cursor, err = collection.Aggregate(ctx, pipeline)
if err == nil {
for cursor.Next(ctx) {
var result struct {
ID string `bson:"_id"`
Count int64 `bson:"count"`
}
if err := cursor.Decode(&result); err == nil {
nsappCount[result.ID] = result.Count
}
}
}
response := CountResponse{
TotalEntries: totalCount,
StatusCount: statusCount,
NSAPPCount: nsappCount,
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(response)
}
func GetByNsapp(w http.ResponseWriter, r *http.Request) {
nsapp := r.URL.Query().Get("nsapp")
var records []DataModel
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
cursor, err := collection.Find(ctx, bson.M{"nsapp": nsapp})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer cursor.Close(ctx)
for cursor.Next(ctx) {
var record DataModel
if err := cursor.Decode(&record); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
records = append(records, record)
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(records)
}
func GetByDateRange(w http.ResponseWriter, r *http.Request) {
startDate := r.URL.Query().Get("start_date")
endDate := r.URL.Query().Get("end_date")
if startDate == "" || endDate == "" {
http.Error(w, "Both start_date and end_date are required", http.StatusBadRequest)
return
}
start, err := time.Parse("2006-01-02T15:04:05.999999+00:00", startDate+"T00:00:00+00:00")
if err != nil {
http.Error(w, "Invalid start_date format", http.StatusBadRequest)
return
}
end, err := time.Parse("2006-01-02T15:04:05.999999+00:00", endDate+"T23:59:59+00:00")
if err != nil {
http.Error(w, "Invalid end_date format", http.StatusBadRequest)
return
}
var records []DataModel
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
cursor, err := collection.Find(ctx, bson.M{
"created_at": bson.M{
"$gte": start,
"$lte": end,
},
})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer cursor.Close(ctx)
for cursor.Next(ctx) {
var record DataModel
if err := cursor.Decode(&record); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
records = append(records, record)
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(records)
}
func GetByStatus(w http.ResponseWriter, r *http.Request) {
status := r.URL.Query().Get("status")
var records []DataModel
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
cursor, err := collection.Find(ctx, bson.M{"status": status})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer cursor.Close(ctx)
for cursor.Next(ctx) {
var record DataModel
if err := cursor.Decode(&record); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
records = append(records, record)
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(records)
}
func GetByOS(w http.ResponseWriter, r *http.Request) {
osType := r.URL.Query().Get("os_type")
osVersion := r.URL.Query().Get("os_version")
var records []DataModel
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
cursor, err := collection.Find(ctx, bson.M{"os_type": osType, "os_version": osVersion})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer cursor.Close(ctx)
for cursor.Next(ctx) {
var record DataModel
if err := cursor.Decode(&record); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
records = append(records, record)
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(records)
}
func GetErrors(w http.ResponseWriter, r *http.Request) {
errorCount := make(map[string]int)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
cursor, err := collection.Find(ctx, bson.M{"error": bson.M{"$ne": ""}})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
defer cursor.Close(ctx)
for cursor.Next(ctx) {
var record DataModel
if err := cursor.Decode(&record); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
if record.ERROR != "" {
errorCount[record.ERROR]++
}
}
type ErrorCountResponse struct {
Error string `json:"error"`
Count int `json:"count"`
}
var errorCounts []ErrorCountResponse
for err, count := range errorCount {
errorCounts = append(errorCounts, ErrorCountResponse{
Error: err,
Count: count,
})
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(struct {
ErrorCounts []ErrorCountResponse `json:"error_counts"`
}{
ErrorCounts: errorCounts,
})
}
func main() {
ConnectDatabase()
router := mux.NewRouter()
router.HandleFunc("/upload", UploadJSON).Methods("POST")
router.HandleFunc("/upload/updatestatus", UpdateStatus).Methods("POST")
router.HandleFunc("/data/json", GetDataJSON).Methods("GET")
router.HandleFunc("/data/paginated", GetPaginatedData).Methods("GET")
router.HandleFunc("/data/summary", GetSummary).Methods("GET")
router.HandleFunc("/data/nsapp", GetByNsapp).Methods("GET")
router.HandleFunc("/data/date", GetByDateRange).Methods("GET")
router.HandleFunc("/data/status", GetByStatus).Methods("GET")
router.HandleFunc("/data/os", GetByOS).Methods("GET")
router.HandleFunc("/data/errors", GetErrors).Methods("GET")
c := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST"},
AllowedHeaders: []string{"Content-Type", "Authorization"},
AllowCredentials: true,
})
handler := c.Handler(router)
fmt.Println("Server running on port 8080")
log.Fatal(http.ListenAndServe(":8080", handler))
}

View File

@@ -51,7 +51,7 @@ function update_script() {
cp -r /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media cp -r /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media
cd /opt/adventurelog/backend/server cd /opt/adventurelog/backend/server
if [[ ! -x .venv/bin/python ]]; then if [[ ! -x .venv/bin/python ]]; then
$STD uv venv --clear .venv $STD uv venv .venv
$STD .venv/bin/python -m ensurepip --upgrade $STD .venv/bin/python -m ensurepip --upgrade
fi fi
$STD .venv/bin/python -m pip install --upgrade pip $STD .venv/bin/python -m pip install --upgrade pip

View File

@@ -20,9 +20,28 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
header_info if ! apk -e info newt >/dev/null 2>&1; then
$STD apk -U upgrade apk add -q newt
msg_ok "Updated successfully!" fi
while true; do
CHOICE=$(
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 1 \
"1" "Check for Docker Updates" 3>&2 2>&1 1>&3
)
exit_status=$?
if [ $exit_status == 1 ]; then
clear
exit-script
fi
header_info
case $CHOICE in
1)
$STD apk -U upgrade
msg_ok "Updated successfully!"
exit
;;
esac
done
exit 0 exit 0
} }

View File

@@ -20,32 +20,43 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
if ! apk -e info newt >/dev/null 2>&1; then
apk add -q newt
fi
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
while true; do
CHOICE=$(msg_menu "Grafana Update Options" \ CHOICE=$(
"1" "Check for Grafana Updates" \ whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 3 \
"2" "Allow 0.0.0.0 for listening" \ "1" "Check for Grafana Updates" \
"3" "Allow only ${LXCIP} for listening") "2" "Allow 0.0.0.0 for listening" \
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
case $CHOICE in )
1) exit_status=$?
$STD apk -U upgrade if [ $exit_status == 1 ]; then
msg_ok "Updated successfully!" clear
exit exit-script
;; fi
2) header_info
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana case $CHOICE in
service grafana restart 1)
msg_ok "Allowed listening on all interfaces!" $STD apk -U upgrade
exit msg_ok "Updated successfully!"
;; exit
3) ;;
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana 2)
service grafana restart sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana
msg_ok "Allowed listening only on ${LXCIP}!" service grafana restart
exit msg_ok "Allowed listening on all interfaces!"
;; exit
esac ;;
3)
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana
service grafana restart
msg_ok "Allowed listening only on ${LXCIP}!"
exit
;;
esac
done
exit 0 exit 0
} }

View File

@@ -20,32 +20,43 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
if ! apk -e info newt >/dev/null 2>&1; then
apk add -q newt
fi
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
while true; do
CHOICE=$(msg_menu "Loki Update Options" \ CHOICE=$(
"1" "Check for Loki Updates" \ whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 3 \
"2" "Allow 0.0.0.0 for listening" \ "1" "Check for Loki Updates" \
"3" "Allow only ${LXCIP} for listening") "2" "Allow 0.0.0.0 for listening" \
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
case $CHOICE in )
1) exit_status=$?
$STD apk -U upgrade if [ $exit_status == 1 ]; then
msg_ok "Updated successfully!" clear
exit exit-script
;; fi
2) header_info
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/loki case $CHOICE in
service loki restart 1)
msg_ok "Allowed listening on all interfaces!" $STD apk -U upgrade
exit msg_ok "Updated successfully!"
;; exit
3) ;;
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/loki 2)
service loki restart sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/loki
msg_ok "Allowed listening only on ${LXCIP}!" service loki restart
exit msg_ok "Allowed listening on all interfaces!"
;; exit
esac ;;
3)
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/loki
service loki restart
msg_ok "Allowed listening only on ${LXCIP}!"
exit
;;
esac
done
exit 0 exit 0
} }

View File

@@ -24,31 +24,33 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
if ! apk -e info newt >/dev/null 2>&1; then
CHOICE=$(msg_menu "Nextcloud Options" \ apk add -q newt
"1" "Update Alpine Packages" \ fi
"2" "Nextcloud Login Credentials" \ while true; do
"3" "Renew Self-signed Certificate") CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \
"1" "Nextcloud Login Credentials" ON \
case $CHOICE in "2" "Renew Self-signed Certificate" OFF \
1) 3>&1 1>&2 2>&3)
msg_info "Updating Alpine Packages" exit_status=$?
$STD apk -U upgrade if [ $exit_status == 1 ]; then
msg_ok "Updated Alpine Packages" clear
msg_ok "Updated successfully!" exit-script
exit fi
;; header_info
2) case $CHOICE in
cat nextcloud.creds 1)
exit cat nextcloud.creds
;; exit
3) ;;
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" >/dev/null 2>&1 2)
rc-service nginx restart openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" >/dev/null 2>&1
msg_ok "Renewed self-signed certificate" rc-service nginx restart
exit exit
;; ;;
esac esac
done
exit 0
} }
start start

View File

@@ -20,36 +20,47 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
if ! apk -e info newt >/dev/null 2>&1; then
apk add -q newt
fi
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
while true; do
CHOICE=$(msg_menu "Redis Management" \ CHOICE=$(
"1" "Update Redis" \ whiptail --backtitle "Proxmox VE Helper Scripts" --title "Redis Management" --menu "Select option" 11 58 3 \
"2" "Allow 0.0.0.0 for listening" \ "1" "Update Redis" \
"3" "Allow only ${LXCIP} for listening") "2" "Allow 0.0.0.0 for listening" \
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
case $CHOICE in )
1) exit_status=$?
msg_info "Updating Redis" if [ $exit_status == 1 ]; then
apk update && apk upgrade redis clear
rc-service redis restart exit-script
msg_ok "Updated successfully!" fi
exit header_info
;; case $CHOICE in
2) 1)
msg_info "Setting Redis to listen on all interfaces" msg_info "Updating Redis"
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf apk update && apk upgrade redis
rc-service redis restart rc-service redis restart
msg_ok "Redis now listens on all interfaces!" msg_ok "Updated successfully!"
exit exit
;; ;;
3) 2)
msg_info "Setting Redis to listen only on ${LXCIP}" msg_info "Setting Redis to listen on all interfaces"
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/redis.conf sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf
rc-service redis restart rc-service redis restart
msg_ok "Redis now listens only on ${LXCIP}!" msg_ok "Redis now listens on all interfaces!"
exit exit
;; ;;
esac 3)
msg_info "Setting Redis to listen only on ${LXCIP}"
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/redis.conf
rc-service redis restart
msg_ok "Redis now listens only on ${LXCIP}!"
exit
;;
esac
done
} }
start start

View File

@@ -20,37 +20,48 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
if ! apk -e info newt >/dev/null 2>&1; then
apk add -q newt
fi
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
while true; do
CHOICE=$(msg_menu "Valkey Management" \ CHOICE=$(
"1" "Update Valkey" \ whiptail --backtitle "Proxmox VE Helper Scripts" --title "Valkey Management" --menu "Select option" 11 58 3 \
"2" "Allow 0.0.0.0 for listening" \ "1" "Update Valkey" \
"3" "Allow only ${LXCIP} for listening") "2" "Allow 0.0.0.0 for listening" \
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
case $CHOICE in )
1) exit_status=$?
msg_info "Updating Valkey" if [ $exit_status == 1 ]; then
apk update && apk upgrade valkey clear
rc-service valkey restart exit-script
msg_ok "Updated Valkey" fi
msg_ok "Updated successfully!" header_info
exit case $CHOICE in
;; 1)
2) msg_info "Updating Valkey"
msg_info "Setting Valkey to listen on all interfaces" apk update && apk upgrade valkey
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf rc-service valkey restart
rc-service valkey restart msg_ok "Updated Valkey"
msg_ok "Valkey now listens on all interfaces!" msg_ok "Updated successfully!"
exit exit
;; ;;
3) 2)
msg_info "Setting Valkey to listen only on ${LXCIP}" msg_info "Setting Valkey to listen on all interfaces"
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/valkey/valkey.conf sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
rc-service valkey restart rc-service valkey restart
msg_ok "Valkey now listens only on ${LXCIP}!" msg_ok "Valkey now listens on all interfaces!"
exit exit
;; ;;
esac 3)
msg_info "Setting Valkey to listen only on ${LXCIP}"
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/valkey/valkey.conf
rc-service valkey restart
msg_ok "Valkey now listens only on ${LXCIP}!"
exit
;;
esac
done
} }
start start

View File

@@ -20,38 +20,45 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
CHOICE=$(msg_menu "Vaultwarden Update Options" \ if ! apk -e info newt >/dev/null 2>&1; then
"1" "Update Vaultwarden" \ apk add -q newt
"2" "Reset ADMIN_TOKEN") fi
while true; do
case $CHOICE in CHOICE=$(
1) whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \
$STD apk -U upgrade "1" "Update Vaultwarden" \
rc-service vaultwarden restart -q "2" "Reset ADMIN_TOKEN" 3>&2 2>&1 1>&3
msg_ok "Updated successfully!" )
exit exit_status=$?
;; if [ $exit_status == 1 ]; then
2) clear
if [[ "${PHS_SILENT:-0}" == "1" ]]; then exit-script
msg_warn "Reset ADMIN_TOKEN requires interactive mode, skipping."
exit
fi fi
read -r -s -p "Setup your ADMIN_TOKEN (make it strong): " NEWTOKEN header_info
echo "" case $CHOICE in
if [[ -n "$NEWTOKEN" ]]; then 1)
if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi $STD apk -U upgrade
TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
if [[ ! -f /var/lib/vaultwarden/config.json ]]; then
sed -i "s|export ADMIN_TOKEN=.*|export ADMIN_TOKEN='${TOKEN}'|" /etc/conf.d/vaultwarden
else
sed -i "s|\"admin_token\": .*|\"admin_token\": \"${TOKEN}\",|" /var/lib/vaultwarden/config.json
fi
rc-service vaultwarden restart -q rc-service vaultwarden restart -q
msg_ok "Admin token updated" msg_ok "Updated successfully!"
fi exit
exit ;;
;; 2)
esac if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Setup your ADMIN_TOKEN (make it strong)" 10 58 3>&1 1>&2 2>&3); then
if [[ -z "$NEWTOKEN" ]]; then exit-script; fi
if ! command -v argon2 >/dev/null 2>&1; then apk add argon2 &>/dev/null; fi
TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1)
if [[ ! -f /var/lib/vaultwarden/config.json ]]; then
sed -i "s|export ADMIN_TOKEN=.*|export ADMIN_TOKEN='${TOKEN}'|" /etc/conf.d/vaultwarden
else
sed -i "s|\"admin_token\": .*|\"admin_token\": \"${TOKEN}\",|" /var/lib/vaultwarden/config.json
fi
rc-service vaultwarden restart -q
fi
clear
exit
;;
esac
done
} }
start start

View File

@@ -20,10 +20,28 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
header_info if ! apk -e info newt >/dev/null 2>&1; then
$STD apk -U upgrade apk add -q newt
msg_ok "Updated successfully!" fi
exit 0 while true; do
CHOICE=$(
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 1 \
"1" "Check for Zigbee2MQTT Updates" 3>&2 2>&1 1>&3
)
exit_status=$?
if [ $exit_status == 1 ]; then
clear
exit-script
fi
header_info
case $CHOICE in
1)
$STD apk -U upgrade
msg_ok "Updated successfully!"
exit
;;
esac
done
} }
start start

View File

@@ -20,10 +20,18 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
UPD=$(
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \
"1" "Check for Alpine Updates" ON \
3>&1 1>&2 2>&3
)
header_info header_info
$STD apk -U upgrade if [ "$UPD" == "1" ]; then
msg_ok "Updated successfully!" $STD apk -U upgrade
exit 0 msg_ok "Updated successfully!"
exit 0
fi
} }
start start

View File

@@ -44,7 +44,7 @@ function update_script() {
msg_info "Updating Autocaliweb" msg_info "Updating Autocaliweb"
cd "$INSTALL_DIR" cd "$INSTALL_DIR"
if [[ ! -d "$VIRTUAL_ENV" ]]; then if [[ ! -d "$VIRTUAL_ENV" ]]; then
$STD uv venv --clear "$VIRTUAL_ENV" $STD uv venv "$VIRTUAL_ENV"
fi fi
$STD uv sync --all-extras --active $STD uv sync --all-extras --active
cd "$INSTALL_DIR"/koreader/plugins cd "$INSTALL_DIR"/koreader/plugins

View File

@@ -40,7 +40,7 @@ function update_script() {
chmod 775 /opt/bazarr /var/lib/bazarr/ chmod 775 /opt/bazarr /var/lib/bazarr/
# Always ensure venv exists # Always ensure venv exists
if [[ ! -d /opt/bazarr/venv/ ]]; then if [[ ! -d /opt/bazarr/venv/ ]]; then
$STD uv venv --clear /opt/bazarr/venv --python 3.12 $STD uv venv /opt/bazarr/venv --python 3.12
fi fi
# Always check and fix service file if needed # Always check and fix service file if needed

View File

@@ -1,55 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/rustmailer/bichon
APP="Bichon"
var_tags="${var_tags:-email;archive}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/bichon ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "bichon" "rustmailer/bichon"; then
msg_info "Stopping service"
systemctl stop bichon
msg_ok "Stopped service"
cp /opt/bichon/bichon.env /tmp/bichon.env.backup
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bichon" "rustmailer/bichon" "prebuild" "latest" "/opt/bichon" "bichon-*-x86_64-unknown-linux-gnu.tar.gz"
cp /tmp/bichon.env.backup /opt/bichon/bichon.env
msg_info "Starting service"
systemctl start bichon
msg_ok "Service started"
msg_ok "Updated successfully!"
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}http://${IP}:15630${CL}"

View File

@@ -1,78 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bluewave-labs/Checkmate
APP="Checkmate"
var_tags="${var_tags:-monitoring;uptime}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-10}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/checkmate ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "checkmate" "bluewave-labs/Checkmate"; then
msg_info "Stopping Services"
systemctl stop checkmate-server checkmate-client nginx
msg_ok "Stopped Services"
msg_info "Backing up Data"
cp /opt/checkmate/server/.env /opt/checkmate_server.env.bak
[ -f /opt/checkmate/client/.env.local ] && cp /opt/checkmate/client/.env.local /opt/checkmate_client.env.local.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "checkmate" "bluewave-labs/Checkmate"
msg_info "Updating Checkmate Server"
cd /opt/checkmate/server
$STD npm install
if [ -f package.json ]; then
grep -q '"build"' package.json && $STD npm run build || true
fi
msg_ok "Updated Checkmate Server"
msg_info "Updating Checkmate Client"
cd /opt/checkmate/client
$STD npm install
VITE_APP_API_BASE_URL="/api/v1" UPTIME_APP_API_BASE_URL="/api/v1" VITE_APP_LOG_LEVEL="warn" $STD npm run build
msg_ok "Updated Checkmate Client"
msg_info "Restoring Data"
mv /opt/checkmate_server.env.bak /opt/checkmate/server/.env
[ -f /opt/checkmate_client.env.local.bak ] && mv /opt/checkmate_client.env.local.bak /opt/checkmate/client/.env.local
msg_ok "Restored Data"
msg_info "Starting Services"
systemctl start checkmate-server checkmate-client nginx
msg_ok "Started Services"
msg_ok "Updated successfully!"
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}http://${IP}${CL}"

View File

@@ -23,9 +23,10 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
UPD=$(msg_menu "Cronicle Update Options" \ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
"1" "Update ${APP}" \ "1" "Update ${APP}" ON \
"2" "Install ${APP} Worker") "2" "Install ${APP} Worker" OFF \
3>&1 1>&2 2>&3)
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
if [[ ! -d /opt/cronicle ]]; then if [[ ! -d /opt/cronicle ]]; then

View File

@@ -103,7 +103,7 @@ function update_script() {
cd /opt/dispatcharr cd /opt/dispatcharr
rm -rf .venv rm -rf .venv
$STD uv venv --clear $STD uv venv
$STD uv pip install -r requirements.txt --index-strategy unsafe-best-match $STD uv pip install -r requirements.txt --index-strategy unsafe-best-match
$STD uv pip install gunicorn gevent celery redis daphne $STD uv pip install gunicorn gevent celery redis daphne
msg_ok "Updated Dispatcharr Backend" msg_ok "Updated Dispatcharr Backend"
@@ -144,4 +144,4 @@ description
msg_ok "Completed successfully!\n" msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9191${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

View File

@@ -35,14 +35,13 @@ function update_script() {
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing Up Configurations" msg_info "Backing Up Configurations"
mv /opt/donetick/config/selfhosted.yaml /opt/donetick/donetick.db /opt mv /opt/donetick/config/selfhosted.yml /opt/donetick/donetick.db /opt
msg_ok "Backed Up Configurations" msg_ok "Backed Up Configurations"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "donetick" "donetick/donetick" "prebuild" "latest" "/opt/donetick" "donetick_Linux_x86_64.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "donetick" "donetick/donetick" "prebuild" "latest" "/opt/donetick" "donetick_Linux_x86_64.tar.gz"
msg_info "Restoring Configurations" msg_info "Restoring Configurations"
mv /opt/selfhosted.yaml /opt/donetick/config mv /opt/selfhosted.yml /opt/donetick/config
sed -i '/capacitor:\/\/localhost/d' /opt/donetick/config/selfhosted.yaml
mv /opt/donetick.db /opt/donetick mv /opt/donetick.db /opt/donetick
msg_ok "Restored Configurations" msg_ok "Restored Configurations"

View File

@@ -1,58 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.drawio.com/
APP="DrawIO"
var_tags="${var_tags:-diagrams}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /var/lib/tomcat11/webapps/draw.war ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "drawio" "jgraph/drawio"; then
msg_info "Stopping service"
systemctl stop tomcat11
msg_ok "Service stopped"
msg_info "Updating Debian LXC"
$STD apt update
$STD apt upgrade -y
msg_ok "Updated Debian LXC"
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "drawio" "jgraph/drawio" "singlefile" "latest" "/var/lib/tomcat11/webapps" "draw.war"
msg_info "Starting service"
systemctl start tomcat11
msg_ok "Service started"
msg_ok "Updated successfully!"
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}http://${IP}:8080/draw${CL}"

View File

@@ -61,7 +61,7 @@ function update_script() {
msg_info "Updating Backend" msg_info "Updating Backend"
cd /opt/endurain/backend cd /opt/endurain/backend
$STD poetry export -f requirements.txt --output requirements.txt --without-hashes $STD poetry export -f requirements.txt --output requirements.txt --without-hashes
$STD uv venv --clear $STD uv venv
$STD uv pip install -r requirements.txt $STD uv pip install -r requirements.txt
msg_ok "Backend Updated" msg_ok "Backend Updated"

View File

@@ -42,7 +42,7 @@ function update_script() {
rm -rf "$VENV_PATH" rm -rf "$VENV_PATH"
mkdir -p /opt/esphome mkdir -p /opt/esphome
cd /opt/esphome cd /opt/esphome
$STD uv venv --clear "$VENV_PATH" $STD uv venv "$VENV_PATH"
$STD "$VENV_PATH/bin/python" -m ensurepip --upgrade $STD "$VENV_PATH/bin/python" -m ensurepip --upgrade
$STD "$VENV_PATH/bin/python" -m pip install --upgrade pip $STD "$VENV_PATH/bin/python" -m pip install --upgrade pip
$STD "$VENV_PATH/bin/python" -m pip install esphome tornado esptool $STD "$VENV_PATH/bin/python" -m pip install esphome tornado esptool

View File

@@ -37,12 +37,17 @@ function update_script() {
msg_info "Stopped Service" msg_info "Stopped Service"
msg_info "Creating Backup" msg_info "Creating Backup"
ls /opt/*.tar.gz &>/dev/null && rm -f /opt/*.tar.gz
backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz" backup_filename="/opt/${APP}_backup_$(date +%F).tar.gz"
tar -czf "$backup_filename" -C /opt/fileflows Data tar -czf "$backup_filename" -C /opt/fileflows Data
msg_ok "Backup Created" msg_ok "Backup Created"
fetch_and_deploy_from_url "https://fileflows.com/downloads/zip" "/opt/fileflows" msg_info "Updating $APP to latest version"
temp_file=$(mktemp)
curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file"
$STD unzip -o -d /opt/fileflows "$temp_file"
rm -rf "$temp_file"
rm -rf "$backup_filename"
msg_ok "Updated $APP to latest version"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start fileflows systemctl start fileflows

View File

@@ -31,27 +31,18 @@ function update_script() {
APP_VERSION=$(grep -o '"version": *"[^"]*"' /opt/gitea-mirror/package.json | cut -d'"' -f4) APP_VERSION=$(grep -o '"version": *"[^"]*"' /opt/gitea-mirror/package.json | cut -d'"' -f4)
if [[ $APP_VERSION =~ ^2\. ]]; then if [[ $APP_VERSION =~ ^2\. ]]; then
if [[ "${PHS_SILENT:-0}" == "1" ]]; then if ! whiptail --backtitle "Gitea Mirror Update" --title "⚠️ VERSION 2.x DETECTED" --yesno \
msg_warn "Version $APP_VERSION detected. Major version upgrade requires interactive confirmation, skipping." "WARNING: Version $APP_VERSION detected!\n\nUpdating from version 2.x will CLEAR ALL CONFIGURATION.\n\nThis includes:\n• API tokens\n• User settings\n• Repository configurations\n• All custom settings\n\nDo you want to continue with the update process?" 15 70 --defaultno; then
exit 75
fi
msg_warn "WARNING: Version $APP_VERSION detected!"
msg_warn "Updating from version 2.x will CLEAR ALL CONFIGURATION."
msg_warn "This includes: API tokens, User settings, Repository configurations, All custom settings"
echo ""
read -r -p "Do you want to continue? (y/N): " CONFIRM
if [[ ! "$CONFIRM" =~ ^[Yy]$ ]]; then
exit 0 exit 0
fi fi
msg_warn "FINAL WARNING: This update WILL clear all configuration!"
msg_warn "Please ensure you have backed up API tokens, custom configurations, and repository settings." if ! whiptail --backtitle "Gitea Mirror Update" --title "⚠️ FINAL CONFIRMATION" --yesno \
echo "" "FINAL WARNING: This update WILL clear all configuration!\n\nBEFORE PROCEEDING, please:\n\n• Copy API tokens to a safe location\n• Backup any custom configurations\n• Note down repository settings\n\nThis action CANNOT be undone!" 18 70 --defaultno; then
read -r -p "Final confirmation - proceed? (y/N): " CONFIRM2 whiptail --backtitle "Gitea Mirror Update" --title "Update Cancelled" --msgbox "Update process cancelled. Please backup your configuration before proceeding." 8 60
if [[ ! "$CONFIRM2" =~ ^[Yy]$ ]]; then
msg_info "Update cancelled. Please backup your configuration before proceeding."
exit 0 exit 0
fi fi
msg_info "Proceeding with version $APP_VERSION update. All configuration will be cleared as warned." whiptail --backtitle "Gitea Mirror Update" --title "Proceeding with Update" --msgbox \
"Proceeding with version $APP_VERSION update.\n\nAll configuration will be cleared as warned." 8 50
rm -rf /opt/gitea-mirror rm -rf /opt/gitea-mirror
fi fi

View File

@@ -1,6 +0,0 @@
____ _ __
/ __ )(_)____/ /_ ____ ____
/ __ / / ___/ __ \/ __ \/ __ \
/ /_/ / / /__/ / / / /_/ / / / /
/_____/_/\___/_/ /_/\____/_/ /_/

View File

@@ -1,6 +0,0 @@
________ __ __
/ ____/ /_ ___ _____/ /______ ___ ____ _/ /____
/ / / __ \/ _ \/ ___/ //_/ __ `__ \/ __ `/ __/ _ \
/ /___/ / / / __/ /__/ ,< / / / / / / /_/ / /_/ __/
\____/_/ /_/\___/\___/_/|_/_/ /_/ /_/\__,_/\__/\___/

View File

@@ -1,6 +0,0 @@
____ ________
/ __ \_________ __ __/ _/ __ \
/ / / / ___/ __ `/ | /| / // // / / /
/ /_/ / / / /_/ /| |/ |/ // // /_/ /
/_____/_/ \__,_/ |__/|__/___/\____/

View File

@@ -1,6 +0,0 @@
_ __ _ __ ______
/ | / /___ _(_)___ _ __ / / / / _/
/ |/ / __ `/ / __ \| |/_/_____/ / / // /
/ /| / /_/ / / / / /> </_____/ /_/ // /
/_/ |_/\__, /_/_/ /_/_/|_| \____/___/
/____/

View File

@@ -1,6 +0,0 @@
_ ___ __ __ __
/ | / (_)___ _/ /_ / /_______________ __ __/ /_
/ |/ / / __ `/ __ \/ __/ ___/ ___/ __ \/ / / / __/
/ /| / / /_/ / / / / /_(__ ) /__/ /_/ / /_/ / /_
/_/ |_/_/\__, /_/ /_/\__/____/\___/\____/\__,_/\__/
/____/

View File

@@ -1,6 +0,0 @@
____ ________ __
/ __ \____ ___ ____ / ____/ /___ __ ______/ /
/ / / / __ \/ _ \/ __ \/ / / / __ \/ / / / __ /
/ /_/ / /_/ / __/ / / / /___/ / /_/ / /_/ / /_/ /
\____/ .___/\___/_/ /_/\____/_/\____/\__,_/\__,_/
/_/

View File

@@ -0,0 +1,6 @@
____ __ __ ____ __ _ _________ __ ______ __
/ __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / __ \____ _____ ___ _____/ /__ __________ / | / / ____/ |/ / / ____/ ______ ____ _____/ /____ _____
/ /_/ / ___/ __ \/ __ `__ \/ _ \/ __/ __ \/ _ \/ / / / ___/_____/ /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/_____/ |/ / / __ | /_____/ __/ | |/_/ __ \/ __ \/ ___/ __/ _ \/ ___/
/ ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ )_____/ ____/ /_/ / /_/ / __/ / / / __(__ |__ )_____/ /| / /_/ // /_____/ /____> </ /_/ / /_/ / / / /_/ __/ /
/_/ /_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ /_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ |_/\____//_/|_| /_____/_/|_/ .___/\____/_/ \__/\___/_/
/_/ /_/

View File

@@ -1,6 +0,0 @@
_____ ____ __ _____ ___ ____ ___ ______
/ ___// __ \ / / / ___/___ ______ _____ _____ |__ \ / __ \__ \ / ____/
\__ \/ / / / / / \__ \/ _ \/ ___/ | / / _ \/ ___/ __/ // / / /_/ //___ \
___/ / /_/ / / /___ ___/ / __/ / | |/ / __/ / / __// /_/ / __/____/ /
/____/\___\_\/_____/ /____/\___/_/ |___/\___/_/ /____/\____/____/_____/

View File

@@ -27,11 +27,12 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
UPD=$(msg_menu "Home Assistant Update Options" \ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
"1" "Update ALL Containers" \ "1" "Update ALL Containers" ON \
"2" "Remove ALL Unused Images" \ "2" "Remove ALL Unused Images" OFF \
"3" "Install HACS" \ "3" "Install HACS" OFF \
"4" "Install FileBrowser") "4" "Install FileBrowser" OFF \
3>&1 1>&2 2>&3)
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
msg_info "Updating All Containers" msg_info "Updating All Containers"

View File

@@ -28,6 +28,7 @@ function update_script() {
exit exit
fi fi
get_lxc_ip
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
ensure_dependencies jq ensure_dependencies jq
@@ -36,20 +37,12 @@ function update_script() {
systemctl stop homepage systemctl stop homepage
msg_ok "Stopped service" msg_ok "Stopped service"
msg_info "Creating Backup"
cp /opt/homepage/.env /opt/homepage.env cp /opt/homepage/.env /opt/homepage.env
cp -r /opt/homepage/config /opt/homepage_config_backup cp -r /opt/homepage/config /opt/homepage_config_backup
[[ -d /opt/homepage/public/images ]] && cp -r /opt/homepage/public/images /opt/homepage_images_backup
[[ -d /opt/homepage/public/icons ]] && cp -r /opt/homepage/public/icons /opt/homepage_icons_backup
msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homepage" "gethomepage/homepage" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homepage" "gethomepage/homepage" "tarball"
msg_info "Restoring Backup"
mv /opt/homepage.env /opt/homepage mv /opt/homepage.env /opt/homepage
rm -rf /opt/homepage/config rm -rf /opt/homepage/config
mv /opt/homepage_config_backup /opt/homepage/config mv /opt/homepage_config_backup /opt/homepage/config
msg_ok "Restored Backup"
msg_info "Updating Homepage (Patience)" msg_info "Updating Homepage (Patience)"
RELEASE=$(get_latest_github_release "gethomepage/homepage") RELEASE=$(get_latest_github_release "gethomepage/homepage")
@@ -61,8 +54,6 @@ function update_script() {
export NEXT_PUBLIC_BUILDTIME=$(curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r '.published_at') export NEXT_PUBLIC_BUILDTIME=$(curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r '.published_at')
export NEXT_TELEMETRY_DISABLED=1 export NEXT_TELEMETRY_DISABLED=1
$STD pnpm build $STD pnpm build
[[ -d /opt/homepage_images_backup ]] && mv /opt/homepage_images_backup /opt/homepage/public/images
[[ -d /opt/homepage_icons_backup ]] && mv /opt/homepage_icons_backup /opt/homepage/public/icons
msg_ok "Updated Homepage" msg_ok "Updated Homepage"
msg_info "Starting service" msg_info "Starting service"

View File

@@ -105,8 +105,8 @@ EOF
msg_ok "Image-processing libraries up to date" msg_ok "Image-processing libraries up to date"
fi fi
RELEASE="2.5.6" RELEASE="2.5.3"
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}"; then if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then
if [[ $(cat ~/.immich) > "2.5.1" ]]; then if [[ $(cat ~/.immich) > "2.5.1" ]]; then
msg_info "Enabling Maintenance Mode" msg_info "Enabling Maintenance Mode"
cd /opt/immich/app/bin cd /opt/immich/app/bin
@@ -140,7 +140,7 @@ EOF
GEO_DIR="${INSTALL_DIR}/geodata" GEO_DIR="${INSTALL_DIR}/geodata"
[[ -f "$ML_DIR"/ml_start.sh ]] && cp "$ML_DIR"/ml_start.sh "$INSTALL_DIR" [[ -f "$ML_DIR"/ml_start.sh ]] && cp "$ML_DIR"/ml_start.sh "$INSTALL_DIR"
if grep -qs "set -a" "$APP_DIR"/bin/start.sh && grep -qs "warnings" "$APP_DIR"/bin/start.sh; then if grep -qs "set -a" "$APP_DIR"/bin/start.sh; then
cp "$APP_DIR"/bin/start.sh "$INSTALL_DIR" cp "$APP_DIR"/bin/start.sh "$INSTALL_DIR"
else else
cat <<EOF >"$INSTALL_DIR"/start.sh cat <<EOF >"$INSTALL_DIR"/start.sh
@@ -150,7 +150,7 @@ set -a
. ${INSTALL_DIR}/.env . ${INSTALL_DIR}/.env
set +a set +a
/usr/bin/node --no-warnings ${APP_DIR}/dist/main.js "\$@" /usr/bin/node ${APP_DIR}/dist/main.js "\$@"
EOF EOF
chmod +x "$INSTALL_DIR"/start.sh chmod +x "$INSTALL_DIR"/start.sh
fi fi
@@ -161,7 +161,7 @@ EOF
) )
setup_uv setup_uv
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR"
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' ${SRC_DIR}/package.json)" PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' ${SRC_DIR}/package.json)"
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
@@ -248,7 +248,6 @@ EOF
msg_ok "Disabled Maintenance Mode" msg_ok "Disabled Maintenance Mode"
fi fi
systemctl restart immich-ml immich-web systemctl restart immich-ml immich-web
[[ -f /etc/systemd/system/immich-proxy.service ]] && systemctl restart immich-proxy
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
exit exit

View File

@@ -34,7 +34,7 @@ function update_script() {
PYTHON_VERSION="3.12" setup_uv PYTHON_VERSION="3.12" setup_uv
mkdir -p "$INSTALL_DIR" mkdir -p "$INSTALL_DIR"
cd "$INSTALL_DIR" cd "$INSTALL_DIR"
$STD uv venv --clear .venv $STD uv venv .venv
$STD "$VENV_PYTHON" -m ensurepip --upgrade $STD "$VENV_PYTHON" -m ensurepip --upgrade
$STD "$VENV_PYTHON" -m pip install --upgrade pip $STD "$VENV_PYTHON" -m pip install --upgrade pip
$STD "$VENV_PYTHON" -m pip install jupyter $STD "$VENV_PYTHON" -m pip install jupyter

View File

@@ -34,19 +34,10 @@ function update_script() {
CURRENT_VERSION=$(readlink -f /opt/kasm/current | awk -F'/' '{print $4}') CURRENT_VERSION=$(readlink -f /opt/kasm/current | awk -F'/' '{print $4}')
KASM_URL=$(curl -fsSL "https://www.kasm.com/downloads" | tr '\n' ' ' | grep -oE 'https://kasm-static-content[^"]*kasm_release_[0-9]+\.[0-9]+\.[0-9]+\.[a-z0-9]+\.tar\.gz' | head -n 1) KASM_URL=$(curl -fsSL "https://www.kasm.com/downloads" | tr '\n' ' ' | grep -oE 'https://kasm-static-content[^"]*kasm_release_[0-9]+\.[0-9]+\.[0-9]+\.[a-z0-9]+\.tar\.gz' | head -n 1)
if [[ -z "$KASM_URL" ]]; then if [[ -z "$KASM_URL" ]]; then
SERVICE_IMAGE_URL=$(curl -fsSL "https://www.kasm.com/downloads" | tr '\n' ' ' | grep -oE 'https://kasm-static-content[^"]*kasm_release_service_images_amd64_[0-9]+\.[0-9]+\.[0-9]+\.tar\.gz' | head -n 1)
if [[ -n "$SERVICE_IMAGE_URL" ]]; then
KASM_VERSION=$(echo "$SERVICE_IMAGE_URL" | sed -E 's/.*kasm_release_service_images_amd64_([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
KASM_URL="https://kasm-static-content.s3.amazonaws.com/kasm_release_${KASM_VERSION}.tar.gz"
fi
else
KASM_VERSION=$(echo "$KASM_URL" | sed -E 's/.*kasm_release_([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
fi
if [[ -z "$KASM_URL" ]] || [[ -z "$KASM_VERSION" ]]; then
msg_error "Unable to detect latest Kasm release URL." msg_error "Unable to detect latest Kasm release URL."
exit 1 exit 1
fi fi
KASM_VERSION=$(echo "$KASM_URL" | sed -E 's/.*kasm_release_([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
msg_info "Checked for new version" msg_info "Checked for new version"
msg_info "Removing outdated docker-compose plugin" msg_info "Removing outdated docker-compose plugin"

View File

@@ -33,8 +33,7 @@ function update_script() {
msg_ok "Stopped Service" msg_ok "Stopped Service"
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
setup_composer
msg_info "Creating a backup" msg_info "Creating a backup"
mv /opt/koillection/ /opt/koillection-backup mv /opt/koillection/ /opt/koillection-backup
msg_ok "Backup created" msg_ok "Backup created"
@@ -60,8 +59,6 @@ function update_script() {
$STD yarn install $STD yarn install
$STD yarn build $STD yarn build
mkdir -p /opt/koillection/public/uploads mkdir -p /opt/koillection/public/uploads
mkdir -p /opt/koillection/var/log
chown -R www-data:www-data /opt/koillection/var/log
chown -R www-data:www-data /opt/koillection/public/uploads chown -R www-data:www-data /opt/koillection/public/uploads
rm -r /opt/koillection-backup rm -r /opt/koillection-backup

View File

@@ -29,13 +29,21 @@ function update_script() {
exit 1 exit 1
fi fi
CHOICE=$(msg_menu "Loki Update Options" \ while true; do
"1" "Update Loki & Promtail" \ CHOICE=$(
"2" "Allow 0.0.0.0 for listening" \ whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 3 \
"3" "Allow only ${LOCAL_IP} for listening") "1" "Update Loki & Promtail" \
"2" "Allow 0.0.0.0 for listening" \
case $CHOICE in "3" "Allow only ${LOCAL_IP} for listening" 3>&2 2>&1 1>&3
1) )
exit_status=$?
if [ $exit_status == 1 ]; then
clear
exit-script
fi
header_info
case $CHOICE in
1)
msg_info "Stopping Loki" msg_info "Stopping Loki"
systemctl stop loki systemctl stop loki
if systemctl is-active --quiet promtail 2>/dev/null || dpkg -s promtail >/dev/null 2>&1; then if systemctl is-active --quiet promtail 2>/dev/null || dpkg -s promtail >/dev/null 2>&1; then
@@ -77,6 +85,7 @@ function update_script() {
exit exit
;; ;;
esac esac
done
exit 0 exit 0
} }

View File

@@ -24,9 +24,21 @@ function update_script() {
check_container_storage check_container_storage
check_container_resources check_container_resources
setup_meilisearch UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Meilisearch Update" --radiolist --cancel-button Exit-Script "Spacebar = Select" 10 58 2 \
"1" "Update Meilisearch" ON \
"2" "Update Meilisearch-UI" OFF \
3>&1 1>&2 2>&3)
if [[ -d /opt/meilisearch-ui ]]; then if [ "$UPD" == "1" ]; then
setup_meilisearch
exit
fi
if [ "$UPD" == "2" ]; then
if [[ ! -d /opt/meilisearch-ui ]]; then
msg_error "No Meilisearch-UI Installation Found!"
exit
fi
if check_for_gh_release "meilisearch-ui" "riccox/meilisearch-ui"; then if check_for_gh_release "meilisearch-ui" "riccox/meilisearch-ui"; then
msg_info "Stopping Meilisearch-UI" msg_info "Stopping Meilisearch-UI"
systemctl stop meilisearch-ui systemctl stop meilisearch-ui
@@ -46,11 +58,10 @@ function update_script() {
msg_info "Starting Meilisearch-UI" msg_info "Starting Meilisearch-UI"
systemctl start meilisearch-ui systemctl start meilisearch-ui
msg_ok "Started Meilisearch-UI" msg_ok "Started Meilisearch-UI"
msg_ok "Updated successfully!"
fi fi
exit
fi fi
msg_ok "Updated successfully!"
exit
} }
start start

View File

@@ -27,12 +27,12 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
if check_for_gh_release "memos" "usememos/memos" "v0.25.3"; then if check_for_gh_release "memos" "usememos/memos"; then
msg_info "Stopping service" msg_info "Stopping service"
systemctl stop memos systemctl stop memos
msg_ok "Service stopped" msg_ok "Service stopped"
fetch_and_deploy_gh_release "memos" "usememos/memos" "prebuild" "v0.25.3" "/opt/memos" "memos*linux_amd64.tar.gz" fetch_and_deploy_gh_release "memos" "usememos/memos" "prebuild" "latest" "/opt/memos" "memos*linux_amd64.tar.gz"
msg_info "Starting service" msg_info "Starting service"
systemctl start memos systemctl start memos

View File

@@ -1,68 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://nginxui.com
APP="Nginx-UI"
var_tags="${var_tags:-webserver;nginx;proxy}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /usr/local/bin/nginx-ui ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "nginx-ui" "0xJacky/nginx-ui"; then
msg_info "Stopping Service"
systemctl stop nginx-ui
msg_ok "Stopped Service"
msg_info "Backing up Configuration"
cp /usr/local/etc/nginx-ui/app.ini /tmp/nginx-ui-app.ini.bak
msg_ok "Backed up Configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nginx-ui" "0xJacky/nginx-ui" "prebuild" "latest" "/opt/nginx-ui" "nginx-ui-linux-64.tar.gz"
msg_info "Updating Binary"
cp /opt/nginx-ui/nginx-ui /usr/local/bin/nginx-ui
chmod +x /usr/local/bin/nginx-ui
rm -rf /opt/nginx-ui
msg_ok "Updated Binary"
msg_info "Restoring Configuration"
mv /tmp/nginx-ui-app.ini.bak /usr/local/etc/nginx-ui/app.ini
msg_ok "Restored Configuration"
msg_info "Starting Service"
systemctl start nginx-ui
msg_ok "Started Service"
msg_ok "Updated successfully!"
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}http://${IP}:9000${CL}"

View File

@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-8}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"
@@ -28,6 +28,12 @@ function update_script() {
exit exit
fi fi
msg_error "This script is currently disabled due to an external issue with the OpenResty APT repository."
msg_error "The repository's GPG key uses SHA-1 signatures, which are no longer accepted by Debian as of February 1, 2026."
msg_error "The issue is tracked in openresty/openresty#1097"
msg_error "For more details, see: https://github.com/community-scripts/ProxmoxVE/issues/11406"
exit 1
if [[ $(grep -E '^VERSION_ID=' /etc/os-release) == *"12"* ]]; then if [[ $(grep -E '^VERSION_ID=' /etc/os-release) == *"12"* ]]; then
msg_error "Wrong Debian version detected!" msg_error "Wrong Debian version detected!"
msg_error "Please create a snapshot first. You must upgrade your LXC to Debian Trixie before updating. Visit: https://github.com/community-scripts/ProxmoxVE/discussions/7489" msg_error "Please create a snapshot first. You must upgrade your LXC to Debian Trixie before updating. Visit: https://github.com/community-scripts/ProxmoxVE/discussions/7489"
@@ -139,17 +145,15 @@ function update_script() {
"database": { "database": {
"engine": "knex-native", "engine": "knex-native",
"knex": { "knex": {
"client": "better-sqlite3", "client": "sqlite3",
"connection": { "connection": {
"filename": "/data/database.sqlite" "filename": "/data/database.sqlite"
}, }
"useNullAsDefault": true
} }
} }
} }
EOF EOF
fi fi
sed -i 's/"client": "sqlite3"/"client": "better-sqlite3"/' /app/config/production.json
cd /app cd /app
$STD yarn install --network-timeout 600000 $STD yarn install --network-timeout 600000
msg_ok "Initialized Backend" msg_ok "Initialized Backend"

View File

@@ -27,12 +27,12 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
if check_for_gh_release "nocodb" "nocodb/nocodb" "0.301.1"; then if check_for_gh_release "nocodb" "nocodb/nocodb"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop nocodb systemctl stop nocodb
msg_ok "Stopped Service" msg_ok "Stopped Service"
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "0.301.1" "/opt/nocodb/" "Noco-linux-x64" fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start nocodb systemctl start nocodb

View File

@@ -27,9 +27,10 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
UPD=$(msg_menu "Node-Red Update Options" \ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
"1" "Update ${APP}" \ "1" "Update ${APP}" ON \
"2" "Install Themes") "2" "Install Themes" OFF \
3>&1 1>&2 2>&3)
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
NODE_VERSION="22" setup_nodejs NODE_VERSION="22" setup_nodejs
@@ -48,31 +49,32 @@ function update_script() {
exit exit
fi fi
if [ "$UPD" == "2" ]; then if [ "$UPD" == "2" ]; then
THEME=$(msg_menu "Node-Red Themes" \ THEME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \
"midnight-red" "Midnight Red (default)" \ "aurora" "" OFF \
"aurora" "Aurora" \ "cobalt2" "" OFF \
"cobalt2" "Cobalt2" \ "dark" "" OFF \
"dark" "Dark" \ "dracula" "" OFF \
"dracula" "Dracula" \ "espresso-libre" "" OFF \
"espresso-libre" "Espresso Libre" \ "github-dark" "" OFF \
"github-dark" "GitHub Dark" \ "github-dark-default" "" OFF \
"github-dark-default" "GitHub Dark Default" \ "github-dark-dimmed" "" OFF \
"github-dark-dimmed" "GitHub Dark Dimmed" \ "midnight-red" "" ON \
"monoindustrial" "Monoindustrial" \ "monoindustrial" "" OFF \
"monokai" "Monokai" \ "monokai" "" OFF \
"monokai-dimmed" "Monokai Dimmed" \ "monokai-dimmed" "" OFF \
"noctis" "Noctis" \ "noctis" "" OFF \
"oceanic-next" "Oceanic Next" \ "oceanic-next" "" OFF \
"oled" "OLED" \ "oled" "" OFF \
"one-dark-pro" "One Dark Pro" \ "one-dark-pro" "" OFF \
"one-dark-pro-darker" "One Dark Pro Darker" \ "one-dark-pro-darker" "" OFF \
"solarized-dark" "Solarized Dark" \ "solarized-dark" "" OFF \
"solarized-light" "Solarized Light" \ "solarized-light" "" OFF \
"tokyo-night" "Tokyo Night" \ "tokyo-night" "" OFF \
"tokyo-night-light" "Tokyo Night Light" \ "tokyo-night-light" "" OFF \
"tokyo-night-storm" "Tokyo Night Storm" \ "tokyo-night-storm" "" OFF \
"totallyinformation" "TotallyInformation" \ "totallyinformation" "" OFF \
"zenburn" "Zenburn") "zenburn" "" OFF \
3>&1 1>&2 2>&3)
header_info header_info
msg_info "Installing ${THEME} Theme" msg_info "Installing ${THEME} Theme"
cd /root/.node-red cd /root/.node-red

View File

@@ -20,21 +20,32 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE MODE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 14 60 2 \
"1" "Check for Alpine Updates" OFF \
"2" "Update NPMplus Docker Container" ON \
3>&1 1>&2 2>&3)
header_info "$APP" header_info "$APP"
msg_info "Updating Alpine OS" case "$UPD" in
$STD apk -U upgrade "1")
msg_ok "System updated" msg_info "Updating Alpine OS"
$STD apk -U upgrade
msg_info "Pulling latest NPMplus container image" msg_ok "System updated"
cd /opt exit
$STD docker compose pull ;;
msg_info "Recreating container" "2")
$STD docker compose up -d msg_info "Updating NPMplus Container"
msg_ok "Updated NPMplus container" cd /opt
msg_info "Pulling latest container image"
msg_ok "Updated successfully!" $STD docker compose pull
exit msg_info "Recreating container"
$STD docker compose up -d
msg_ok "Updated successfully!"
exit
;;
esac
exit 0
} }
start start

View File

@@ -1,72 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://opencloud.eu
APP="OpenCloud"
var_tags="${var_tags:-files;cloud}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-20}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /etc/opencloud ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE="v5.0.2"
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}"; then
msg_info "Stopping services"
systemctl stop opencloud opencloud-wopi
msg_ok "Stopped services"
msg_info "Updating packages"
$STD apt-get update
$STD apt-get dist-upgrade -y
ensure_dependencies "inotify-tools"
msg_ok "Updated packages"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "${RELEASE}" "/usr/bin" "opencloud-*-linux-amd64"
if ! grep -q 'POSIX_WATCH' /etc/opencloud/opencloud.env; then
sed -i '/^## External/i ## Uncomment below to enable PosixFS Collaborative Mode\
## Increase inotify watch/instance limits on your PVE host:\
### sysctl -w fs.inotify.max_user_watches=1048576\
### sysctl -w fs.inotify.max_user_instances=1024\
# STORAGE_USERS_POSIX_ENABLE_COLLABORATION=true\
# STORAGE_USERS_POSIX_WATCH_TYPE=inotifywait\
# STORAGE_USERS_POSIX_WATCH_FS=true\
# STORAGE_USERS_POSIX_WATCH_PATH=<path-to-storage-or-bind-mount>' /etc/opencloud/opencloud.env
fi
msg_info "Starting services"
systemctl start opencloud opencloud-wopi
msg_ok "Started services"
msg_ok "Updated successfully"
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}https://<your-OpenCloud-FQDN>${CL}"

View File

@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}" var_ram="${var_ram:-4096}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-8}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"

View File

@@ -48,10 +48,8 @@ function update_script() {
$STD npm run set:sqlite $STD npm run set:sqlite
$STD npm run set:oss $STD npm run set:oss
rm -rf server/private rm -rf server/private
$STD npm run db:generate $STD npm run build:sqlite
$STD npm run build
$STD npm run build:cli $STD npm run build:cli
$STD npm run db:sqlite:push
cp -R .next/standalone ./ cp -R .next/standalone ./
chmod +x ./dist/cli.mjs chmod +x ./dist/cli.mjs
cp server/db/names.json ./dist/names.json cp server/db/names.json ./dist/names.json

View File

@@ -30,30 +30,30 @@ function update_script() {
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
if check_for_gh_release "PeaNUT" "Brandawg93/PeaNUT"; then if check_for_gh_release "peanut" "Brandawg93/PeaNUT"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop peanut systemctl stop peanut
msg_info "Stopped Service" msg_info "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "PeaNUT" "Brandawg93/PeaNUT" "tarball" "latest" "/opt/peanut" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "peanut" "Brandawg93/PeaNUT" "tarball" "latest" "/opt/peanut"
if ! grep -q '/opt/peanut/entrypoint.mjs' /etc/systemd/system/peanut.service; then if ! grep -q '/opt/peanut/entrypoint.mjs' /etc/systemd/system/peanut.service; then
msg_info "Fixing entrypoint" msg_info "Fixing entrypoint"
cd /opt/peanut cd /opt/peanut
ln -sf .next/standalone/server.js server.js
sed -i 's|/opt/peanut/.next/standalone/server.js|/opt/peanut/entrypoint.mjs|' /etc/systemd/system/peanut.service sed -i 's|/opt/peanut/.next/standalone/server.js|/opt/peanut/entrypoint.mjs|' /etc/systemd/system/peanut.service
systemctl daemon-reload systemctl daemon-reload
msg_ok "Fixed entrypoint" msg_ok "Fixed entrypoint"
fi fi
msg_info "Updating PeaNUT" msg_info "Updating Peanut"
cd /opt/peanut cd /opt/peanut
$STD pnpm i $STD pnpm i
$STD pnpm run build:local $STD pnpm run build:local
cp -r .next/static .next/standalone/.next/ cp -r .next/static .next/standalone/.next/
mkdir -p /opt/peanut/.next/standalone/config mkdir -p /opt/peanut/.next/standalone/config
ln -sf /etc/peanut/settings.yml /opt/peanut/.next/standalone/config/settings.yml ln -sf /etc/peanut/settings.yml /opt/peanut/.next/standalone/config/settings.yml
ln -sf .next/standalone/server.js server.js msg_ok "Updated Peanut"
msg_ok "Updated PeaNUT"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start peanut systemctl start peanut

View File

@@ -29,9 +29,10 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
UPD=$(msg_menu "Plex Update Options" \ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \
"1" "Update LXC" \ "1" "Update LXC" ON \
"2" "Install plexupdate") "2" "Install plexupdate" OFF \
3>&1 1>&2 2>&3)
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
msg_info "Updating ${APP} LXC" msg_info "Updating ${APP} LXC"
$STD apt update $STD apt update

View File

@@ -27,11 +27,12 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
UPD=$(msg_menu "Home Assistant Update Options" \ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
"1" "Update system and containers" \ "1" "Update system and containers" ON \
"2" "Install HACS" \ "2" "Install HACS" OFF \
"3" "Install FileBrowser" \ "3" "Install FileBrowser" OFF \
"4" "Remove ALL Unused Images") "4" "Remove ALL Unused Images" OFF \
3>&1 1>&2 2>&3)
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
msg_info "Updating ${APP} LXC" msg_info "Updating ${APP} LXC"

View File

@@ -1,15 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG # Copyright (c) 2021-2026 community-scripts ORG
# Author: aendel # Author: Andy Grunwald (andygrunwald)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/nightscout/cgm-remote-monitor # Source: https://github.com/hansmi/prometheus-paperless-exporter
APP="Nightscout" APP="Prometheus-Paperless-NGX-Exporter"
var_tags="${var_tags:-health}" var_tags="${var_tags:-monitoring;alerting}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-256}"
var_disk="${var_disk:-10}" var_disk="${var_disk:-2}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-13}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
@@ -23,25 +23,19 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /opt/nightscout ]]; then if [[ ! -f /etc/systemd/system/prometheus-paperless-ngx-exporter.service ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
if check_for_gh_release "prom-paperless-exp" "hansmi/prometheus-paperless-exporter"; then
if check_for_gh_release "nightscout" "nightscout/cgm-remote-monitor"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop nightscout systemctl stop prometheus-paperless-ngx-exporter
msg_ok "Stopped Service" msg_ok "Stopped Service"
fetch_and_deploy_gh_release "nightscout" "nightscout/cgm-remote-monitor" "tarball" fetch_and_deploy_gh_release "prom-paperless-exp" "hansmi/prometheus-paperless-exporter" "binary"
msg_info "Updating Nightscout"
cd /opt/nightscout
$STD npm install
msg_ok "Updated Nightscout"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start nightscout systemctl start prometheus-paperless-ngx-exporter
msg_ok "Started Service" msg_ok "Started Service"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
@@ -55,4 +49,4 @@ description
msg_ok "Completed successfully!\n" msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1337${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8081/metrics${CL}"

View File

@@ -41,7 +41,7 @@ function update_script() {
rm -rf "$PVE_VENV_PATH" rm -rf "$PVE_VENV_PATH"
mkdir -p /opt/prometheus-pve-exporter mkdir -p /opt/prometheus-pve-exporter
cd /opt/prometheus-pve-exporter cd /opt/prometheus-pve-exporter
$STD uv venv --clear "$PVE_VENV_PATH" $STD uv venv "$PVE_VENV_PATH"
$STD "$PVE_VENV_PATH/bin/python" -m ensurepip --upgrade $STD "$PVE_VENV_PATH/bin/python" -m ensurepip --upgrade
$STD "$PVE_VENV_PATH/bin/python" -m pip install --upgrade pip $STD "$PVE_VENV_PATH/bin/python" -m pip install --upgrade pip
$STD "$PVE_VENV_PATH/bin/python" -m pip install prometheus-pve-exporter $STD "$PVE_VENV_PATH/bin/python" -m pip install prometheus-pve-exporter

View File

@@ -41,7 +41,7 @@ function update_script() {
# Always ensure venv exists # Always ensure venv exists
if [[ ! -d /opt/sabnzbd/venv ]]; then if [[ ! -d /opt/sabnzbd/venv ]]; then
msg_info "Migrating SABnzbd to uv virtual environment" msg_info "Migrating SABnzbd to uv virtual environment"
$STD uv venv --clear /opt/sabnzbd/venv $STD uv venv /opt/sabnzbd/venv
msg_ok "Created uv venv at /opt/sabnzbd/venv" msg_ok "Created uv venv at /opt/sabnzbd/venv"
fi fi

View File

@@ -29,7 +29,7 @@ function update_script() {
exit exit
fi fi
if check_for_gh_release "Scanopy" "scanopy/scanopy"; then if check_for_gh_release "scanopy" "scanopy/scanopy"; then
msg_info "Stopping services" msg_info "Stopping services"
systemctl stop scanopy-server systemctl stop scanopy-server
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl stop scanopy-daemon [[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl stop scanopy-daemon
@@ -40,7 +40,7 @@ function update_script() {
[[ -f /opt/scanopy/oidc.toml ]] && cp /opt/scanopy/oidc.toml /opt/scanopy.oidc.toml [[ -f /opt/scanopy/oidc.toml ]] && cp /opt/scanopy/oidc.toml /opt/scanopy.oidc.toml
msg_ok "Backed up configurations" msg_ok "Backed up configurations"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy"
ensure_dependencies pkg-config libssl-dev ensure_dependencies pkg-config libssl-dev
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')" TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
@@ -61,22 +61,19 @@ function update_script() {
$STD npm run build $STD npm run build
msg_ok "Created frontend UI" msg_ok "Created frontend UI"
msg_info "Building Scanopy Server (patience)" msg_info "Building scanopy-server (patience)"
cd /opt/scanopy/backend cd /opt/scanopy/backend
$STD cargo build --release --bin server $STD cargo build --release --bin server
mv ./target/release/server /usr/bin/scanopy-server mv ./target/release/server /usr/bin/scanopy-server
msg_ok "Built Scanopy Server" msg_ok "Built scanopy-server"
if [[ -f /etc/systemd/system/scanopy-daemon.service ]]; then [[ -f /etc/systemd/system/scanopy-daemon.service ]] &&
fetch_and_deploy_gh_release "Scanopy Daemon" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-amd64" fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-amd64" &&
mv "/usr/local/bin/Scanopy Daemon" /usr/local/bin/scanopy-daemon rm -f /usr/bin/scanopy-daemon ~/configure_daemon.sh &&
rm -f /usr/bin/scanopy-daemon ~/configure_daemon.sh
sed -i -e 's|usr/bin|usr/local/bin|' \ sed -i -e 's|usr/bin|usr/local/bin|' \
-e 's/push/daemon_poll/' \ -e 's/push/daemon_poll/' \
-e 's/pull/server_poll/' /etc/systemd/system/scanopy-daemon.service -e 's/pull/server_poll/' /etc/systemd/system/scanopy-daemon.service &&
systemctl daemon-reload systemctl daemon-reload
msg_ok "Updated Scanopy Daemon"
fi
msg_info "Starting services" msg_info "Starting services"
systemctl start scanopy-server systemctl start scanopy-server

View File

@@ -38,7 +38,7 @@ function update_script() {
msg_info "Updating Scraparr" msg_info "Updating Scraparr"
cd /opt/scraparr cd /opt/scraparr
$STD uv venv --clear /opt/scraparr/.venv $STD uv venv /opt/scraparr/.venv
$STD /opt/scraparr/.venv/bin/python -m ensurepip --upgrade $STD /opt/scraparr/.venv/bin/python -m ensurepip --upgrade
$STD /opt/scraparr/.venv/bin/python -m pip install --upgrade pip $STD /opt/scraparr/.venv/bin/python -m pip install --upgrade pip
$STD /opt/scraparr/.venv/bin/python -m pip install -r /opt/scraparr/src/scraparr/requirements.txt $STD /opt/scraparr/.venv/bin/python -m pip install -r /opt/scraparr/src/scraparr/requirements.txt

View File

@@ -10,8 +10,8 @@ var_tags="${var_tags:-dev_ops}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-2048}"
var_disk="${var_disk:-4}" var_disk="${var_disk:-4}"
var_os="${var_os:-ubuntu}" var_os="${var_os:-debian}"
var_version="${var_version:-24.04}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"

View File

@@ -42,19 +42,16 @@ function update_script() {
msg_info "Stopping FlareSolverr service" msg_info "Stopping FlareSolverr service"
systemctl stop flaresolverr systemctl stop flaresolverr
msg_ok "Stopped FlareSolverr service" msg_ok "Stopped FlareSolverr service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "flaresolverr" "FlareSolverr/FlareSolverr" "prebuild" "latest" "/opt/flaresolverr" "flaresolverr_linux_x64.tar.gz" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "flaresolverr" "FlareSolverr/FlareSolverr" "prebuild" "latest" "/opt/flaresolverr" "flaresolverr_linux_x64.tar.gz"
msg_info "Starting FlareSolverr Service" msg_info "Starting FlareSolverr Service"
systemctl start flaresolverr systemctl start flaresolverr
msg_ok "Started FlareSolverr Service" msg_ok "Started FlareSolverr Service"
msg_ok "Updated FlareSolverr" msg_ok "Updated FlareSolverr"
fi fi
cp /opt/shelfmark/start.sh /opt/start.sh.bak cp /opt/shelfmark/start.sh /opt/start.sh.bak
if command -v chromedriver &>/dev/null; then
$STD apt remove -y chromium-driver
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shelfmark" "calibrain/shelfmark" "tarball" "latest" "/opt/shelfmark" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shelfmark" "calibrain/shelfmark" "tarball" "latest" "/opt/shelfmark"
RELEASE_VERSION=$(cat "$HOME/.shelfmark") RELEASE_VERSION=$(cat "$HOME/.shelfmark")

View File

@@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Copyright (c) 2021-2026 community-scripts ORG # Copyright (c) 2021-2026 community-scripts ORG
# Author: vhsdream # Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/slskd/slskd, https://github.com/mrusse/soularr # Source: https://github.com/slskd/slskd, https://soularr.net
APP="slskd" APP="slskd"
var_tags="${var_tags:-arr;p2p}" var_tags="${var_tags:-arr;p2p}"
@@ -24,65 +24,50 @@ function update_script() {
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /opt/slskd ]]; then if [[ ! -d /opt/slskd ]] || [[ ! -d /opt/soularr ]]; then
msg_error "No Slskd Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
if check_for_gh_release "Slskd" "slskd/slskd"; then RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
msg_info "Stopping Service(s)" if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
systemctl stop slskd msg_info "Stopping Service"
[[ -f /etc/systemd/system/soularr.service ]] && systemctl stop soularr.timer soularr.service systemctl stop slskd soularr.timer soularr.service
msg_ok "Stopped Service(s)" msg_info "Stopped Service"
msg_info "Backing up config" msg_info "Updating $APP to v${RELEASE}"
cp /opt/slskd/config/slskd.yml /opt/slskd.yml.bak tmp_file=$(mktemp)
msg_ok "Backed up config" curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -o $tmp_file
$STD unzip -oj $tmp_file slskd -d /opt/${APP}
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated $APP to v${RELEASE}"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Slskd" "slskd/slskd" "prebuild" "latest" "/opt/slskd" "slskd-*-linux-x64.zip" msg_info "Starting Service"
msg_info "Restoring config"
mv /opt/slskd.yml.bak /opt/slskd/config/slskd.yml
msg_ok "Restored config"
msg_info "Starting Service(s)"
systemctl start slskd systemctl start slskd
[[ -f /etc/systemd/system/soularr.service ]] && systemctl start soularr.timer msg_ok "Started Service"
msg_ok "Started Service(s)" rm -rf $tmp_file
msg_ok "Updated Slskd successfully!" else
msg_ok "No ${APP} update required. ${APP} is already at v${RELEASE}"
fi fi
[[ -d /opt/soularr ]] && if check_for_gh_release "Soularr" "mrusse/soularr"; then msg_info "Updating Soularr"
if systemctl is-active soularr.timer >/dev/null; then cp /opt/soularr/config.ini /opt/config.ini.bak
msg_info "Stopping Timer and Service" cp /opt/soularr/run.sh /opt/run.sh.bak
systemctl stop soularr.timer soularr.service cd /tmp
msg_ok "Stopped Timer and Service" rm -rf /opt/soularr
fi curl -fsSL -o main.zip https://github.com/mrusse/soularr/archive/refs/heads/main.zip
$STD unzip main.zip
mv soularr-main /opt/soularr
cd /opt/soularr
$STD pip install -r requirements.txt
mv /opt/config.ini.bak /opt/soularr/config.ini
mv /opt/run.sh.bak /opt/soularr/run.sh
rm -rf /tmp/main.zip
msg_ok "Updated soularr"
msg_info "Backing up Soularr config" msg_info "Starting soularr timer"
cp /opt/soularr/config.ini /opt/soularr_config.ini.bak systemctl start soularr.timer
cp /opt/soularr/run.sh /opt/soularr_run.sh.bak msg_ok "Started soularr timer"
msg_ok "Backed up Soularr config" exit
PYTHON_VERSION="3.11" setup_uv
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Soularr" "mrusse/soularr" "tarball" "latest" "/opt/soularr"
msg_info "Updating Soularr"
cd /opt/soularr
$STD uv venv -c venv
$STD source venv/bin/activate
$STD uv pip install -r requirements.txt
deactivate
msg_ok "Updated Soularr"
msg_info "Restoring Soularr config"
mv /opt/soularr_config.ini.bak /opt/soularr/config.ini
mv /opt/soularr_run.sh.bak /opt/soularr/run.sh
msg_ok "Restored Soularr config"
msg_info "Starting Soularr Timer"
systemctl restart soularr.timer
msg_ok "Started Soularr Timer"
msg_ok "Updated Soularr successfully!"
fi
} }
start start

View File

@@ -33,15 +33,7 @@ function update_script() {
systemctl stop snowshare systemctl stop snowshare
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up uploads" fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" "tarball"
[ -d /opt/snowshare/uploads ] && cp -a /opt/snowshare/uploads /opt/.snowshare_uploads_backup
msg_ok "Uploads backed up"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" "tarball"
msg_info "Restoring uploads"
[ -d /opt/.snowshare_uploads_backup ] && rm -rf /opt/snowshare/uploads && cp -a /opt/.snowshare_uploads_backup /opt/snowshare/uploads
msg_ok "Uploads restored"
msg_info "Updating Snowshare" msg_info "Updating Snowshare"
cd /opt/snowshare cd /opt/snowshare

View File

@@ -39,7 +39,7 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "streamlink-webui" "CrazyWolf13/streamlink-webui" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "streamlink-webui" "CrazyWolf13/streamlink-webui" "tarball"
msg_info "Updating streamlink-webui" msg_info "Updating streamlink-webui"
$STD uv venv --clear /opt/streamlink-webui/backend/src/.venv $STD uv venv /opt/streamlink-webui/backend/src/.venv
source /opt/streamlink-webui/backend/src/.venv/bin/activate source /opt/streamlink-webui/backend/src/.venv/bin/activate
$STD uv pip install -r /opt/streamlink-webui/backend/src/requirements.txt --python=/opt/streamlink-webui/backend/src/.venv $STD uv pip install -r /opt/streamlink-webui/backend/src/requirements.txt --python=/opt/streamlink-webui/backend/src/.venv
cd /opt/streamlink-webui/frontend/src cd /opt/streamlink-webui/frontend/src

View File

@@ -50,7 +50,7 @@ function update_script() {
cp -r /opt/tandoor.bak/{config,api,mediafiles,staticfiles} /opt/tandoor/ cp -r /opt/tandoor.bak/{config,api,mediafiles,staticfiles} /opt/tandoor/
mv /opt/tandoor.bak/.env /opt/tandoor/.env mv /opt/tandoor.bak/.env /opt/tandoor/.env
cd /opt/tandoor cd /opt/tandoor
$STD uv venv --clear .venv --python=python3 $STD uv venv .venv --python=python3
$STD uv pip install -r requirements.txt --python .venv/bin/python $STD uv pip install -r requirements.txt --python .venv/bin/python
cd /opt/tandoor/vue3 cd /opt/tandoor/vue3
$STD yarn install $STD yarn install

View File

@@ -105,7 +105,6 @@ EOF
cp -rf pnpm-lock.yaml /opt/tracearr/ cp -rf pnpm-lock.yaml /opt/tracearr/
cp -rf apps/server/package.json /opt/tracearr/apps/server/ cp -rf apps/server/package.json /opt/tracearr/apps/server/
cp -rf apps/server/dist /opt/tracearr/apps/server/dist cp -rf apps/server/dist /opt/tracearr/apps/server/dist
cp -rf apps/server/scripts /opt/tracearr/apps/server/scripts
cp -rf apps/web/dist /opt/tracearr/apps/web/dist cp -rf apps/web/dist /opt/tracearr/apps/web/dist
cp -rf packages/shared/package.json /opt/tracearr/packages/shared/ cp -rf packages/shared/package.json /opt/tracearr/packages/shared/
cp -rf packages/shared/dist /opt/tracearr/packages/shared/dist cp -rf packages/shared/dist /opt/tracearr/packages/shared/dist

View File

@@ -33,9 +33,7 @@ function update_script() {
systemctl stop umlautadaptarr systemctl stop umlautadaptarr
msg_ok "Stopped Service" msg_ok "Stopped Service"
cp /opt/UmlautAdaptarr/appsettings.json /opt/UmlautAdaptarr/appsettings.json.bak
fetch_and_deploy_gh_release "UmlautAdaptarr" "PCJones/Umlautadaptarr" "prebuild" "latest" "/opt/UmlautAdaptarr" "linux-x64.zip" fetch_and_deploy_gh_release "UmlautAdaptarr" "PCJones/Umlautadaptarr" "prebuild" "latest" "/opt/UmlautAdaptarr" "linux-x64.zip"
cp /opt/UmlautAdaptarr/appsettings.json.bak /opt/UmlautAdaptarr/appsettings.json
msg_info "Starting Service" msg_info "Starting Service"
systemctl start umlautadaptarr systemctl start umlautadaptarr

View File

@@ -31,9 +31,11 @@ function update_script() {
VAULT=$(get_latest_github_release "dani-garcia/vaultwarden") VAULT=$(get_latest_github_release "dani-garcia/vaultwarden")
WVRELEASE=$(get_latest_github_release "dani-garcia/bw_web_builds") WVRELEASE=$(get_latest_github_release "dani-garcia/bw_web_builds")
UPD=$(msg_menu "Vaultwarden Update Options" \ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \
"1" "Update VaultWarden + Web-Vault" \ "1" "VaultWarden $VAULT" ON \
"2" "Set Admin Token") "2" "Web-Vault $WVRELEASE" OFF \
"3" "Set Admin Token" OFF \
3>&1 1>&2 2>&3)
if [ "$UPD" == "1" ]; then if [ "$UPD" == "1" ]; then
if check_for_gh_release "vaultwarden" "dani-garcia/vaultwarden"; then if check_for_gh_release "vaultwarden" "dani-garcia/vaultwarden"; then
@@ -57,10 +59,14 @@ function update_script() {
msg_info "Starting Service" msg_info "Starting Service"
systemctl start vaultwarden systemctl start vaultwarden
msg_ok "Started Service" msg_ok "Started Service"
msg_ok "Updated successfully!"
else else
msg_ok "VaultWarden is already up-to-date" msg_ok "VaultWarden is already up-to-date"
fi fi
exit
fi
if [ "$UPD" == "2" ]; then
if check_for_gh_release "vaultwarden_webvault" "dani-garcia/bw_web_builds"; then if check_for_gh_release "vaultwarden_webvault" "dani-garcia/bw_web_builds"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop vaultwarden systemctl stop vaultwarden
@@ -78,22 +84,16 @@ function update_script() {
msg_info "Starting Service" msg_info "Starting Service"
systemctl start vaultwarden systemctl start vaultwarden
msg_ok "Started Service" msg_ok "Started Service"
msg_ok "Updated successfully!"
else else
msg_ok "Web-Vault is already up-to-date" msg_ok "Web-Vault is already up-to-date"
fi fi
msg_ok "Updated successfully!"
exit exit
fi fi
if [ "$UPD" == "2" ]; then if [ "$UPD" == "3" ]; then
if [[ "${PHS_SILENT:-0}" == "1" ]]; then if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then
msg_warn "Set Admin Token requires interactive mode, skipping." if [[ -z "$NEWTOKEN" ]]; then exit; fi
exit
fi
read -r -s -p "Set the ADMIN_TOKEN: " NEWTOKEN
echo ""
if [[ -n "$NEWTOKEN" ]]; then
ensure_dependencies argon2 ensure_dependencies argon2
TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e)
sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env

View File

@@ -20,50 +20,50 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -f /opt/wanderer/start.sh ]]; then if [[ ! -f /opt/wanderer/start.sh ]]; then
msg_error "No wanderer Installation Found!" msg_error "No wanderer Installation Found!"
exit
fi
if check_for_gh_release "wanderer" "Flomp/wanderer"; then
msg_info "Stopping service"
systemctl stop wanderer-web
msg_ok "Stopped service"
fetch_and_deploy_gh_release "wanderer" "Flomp/wanderer" "tarball" "latest" "/opt/wanderer/source"
msg_info "Updating wanderer"
cd /opt/wanderer/source/db
$STD go mod tidy
$STD go build
cd /opt/wanderer/source/web
$STD npm ci --omit=dev
$STD npm run build
msg_ok "Updated wanderer"
msg_info "Starting service"
systemctl start wanderer-web
msg_ok "Started service"
msg_ok "Update Successful"
fi
if check_for_gh_release "meilisearch" "meilisearch/meilisearch"; then
msg_info "Stopping service"
systemctl stop wanderer-web
msg_ok "Stopped service"
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" "latest" "/opt/wanderer/source/search"
grep -q -- '--experimental-dumpless-upgrade' /opt/wanderer/start.sh || sed -i 's|meilisearch --master-key|meilisearch --experimental-dumpless-upgrade --master-key|' /opt/wanderer/start.sh
msg_info "Starting service"
systemctl start wanderer-web
msg_ok "Started service"
msg_ok "Update Successful"
fi
exit exit
fi
if check_for_gh_release "wanderer" "Flomp/wanderer"; then
msg_info "Stopping service"
systemctl stop wanderer-web
msg_ok "Stopped service"
fetch_and_deploy_gh_release "wanderer" "open-wanderer/wanderer" "tarball" "latest" "/opt/wanderer/source"
msg_info "Updating wanderer"
cd /opt/wanderer/source/db
$STD go mod tidy
$STD go build
cd /opt/wanderer/source/web
$STD npm ci --omit=dev
$STD npm run build
msg_ok "Updated wanderer"
msg_info "Starting service"
systemctl start wanderer-web
msg_ok "Started service"
msg_ok "Update Successful"
fi
if check_for_gh_release "meilisearch" "meilisearch/meilisearch"; then
msg_info "Stopping service"
systemctl stop wanderer-web
msg_ok "Stopped service"
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" "latest" "/opt/wanderer/source/search"
grep -q -- '--experimental-dumpless-upgrade' /opt/wanderer/start.sh || sed -i 's|meilisearch --master-key|meilisearch --experimental-dumpless-upgrade --master-key|' /opt/wanderer/start.sh
msg_info "Starting service"
systemctl start wanderer-web
msg_ok "Started service"
msg_ok "Update Successful"
fi
exit
} }
start start

View File

@@ -39,7 +39,7 @@ function update_script() {
msg_info "Updating Warracker" msg_info "Updating Warracker"
cd /opt/warracker/backend cd /opt/warracker/backend
$STD uv venv --clear .venv $STD uv venv .venv
$STD source .venv/bin/activate $STD source .venv/bin/activate
$STD uv pip install -r requirements.txt $STD uv pip install -r requirements.txt
msg_ok "Updated Warracker" msg_ok "Updated Warracker"

View File

@@ -7,9 +7,9 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="wger" APP="wger"
var_tags="${var_tags:-management;fitness}" var_tags="${var_tags:-management;fitness}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-1024}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-6}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-13}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
@@ -23,44 +23,38 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /home/wger ]]; then
if [[ ! -d /opt/wger ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
RELEASE=$(curl -fsSL https://api.github.com/repos/wger-project/wger/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
if check_for_gh_release "wger" "wger-project/wger"; then if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop redis-server nginx celery celery-beat wger systemctl stop wger
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Backing up Data" msg_info "Updating $APP to v${RELEASE}"
cp -r /opt/wger/media /opt/wger_media_backup temp_file=$(mktemp)
cp /opt/wger/.env /opt/wger_env_backup curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -o "$temp_file"
msg_ok "Backed up Data" tar xzf "$temp_file"
cp -rf wger-"$RELEASE"/* /home/wger/src
cd /home/wger/src
$STD pip install -r requirements_prod.txt --ignore-installed
$STD pip install -e .
$STD python3 manage.py migrate
$STD python3 manage.py collectstatic --no-input
$STD yarn install
$STD yarn build:css:sass
rm -rf "$temp_file"
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated $APP to v${RELEASE}"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wger" "wger-project/wger" "tarball" msg_info "Starting Service"
systemctl start wger
msg_info "Restoring Data" msg_ok "Started Service"
cp -r /opt/wger_media_backup/. /opt/wger/media msg_ok "Updated successfully!"
cp /opt/wger_env_backup /opt/wger/.env else
rm -rf /opt/wger_media_backup /opt/wger_env_backup msg_ok "No update required. ${APP} is already at v${RELEASE}"
msg_ok "Restored Data"
msg_info "Updating wger"
cd /opt/wger
set -a && source /opt/wger/.env && set +a
export DJANGO_SETTINGS_MODULE=settings.main
$STD uv pip install .
$STD uv run python manage.py migrate
$STD uv run python manage.py collectstatic --no-input
msg_ok "Updated wger"
msg_info "Starting Services"
systemctl start redis-server nginx celery celery-beat wger
msg_ok "Started Services"
msg_ok "Updated Successfully"
fi fi
exit exit
} }
@@ -69,7 +63,7 @@ start
build_container build_container
description description
msg_ok "Completed Successfully!\n" msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

View File

@@ -1,868 +0,0 @@
# 🤖 AI Contribution Guidelines for ProxmoxVE
> **This documentation is intended for all AI assistants (GitHub Copilot, Claude, ChatGPT, etc.) contributing to this project.**
## 🎯 Core Principles
### 1. **Maximum Use of `tools.func` Functions**
We have an extensive library of helper functions. **NEVER** implement your own solutions when a function already exists!
### 2. **No Pointless Variables**
Only create variables when they:
- Are used multiple times
- Improve readability
- Are intended for configuration
### 3. **Consistent Script Structure**
All scripts follow an identical structure. Deviations are not acceptable.
### 4. **Bare-Metal Installation**
We do **NOT use Docker** for our installation scripts. All applications are installed directly on the system.
---
## 📁 Script Types and Their Structure
### CT Script (`ct/AppName.sh`)
```bash
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: AuthorName (GitHubUsername)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://application-url.com
APP="AppName"
var_tags="${var_tags:-tag1;tag2;tag3}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/appname ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "appname" "YourUsername/YourRepo"; then
msg_info "Stopping Service"
systemctl stop appname
msg_ok "Stopped Service"
msg_info "Backing up Data"
cp -r /opt/appname/data /opt/appname_data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "latest" "/opt/appname"
# Build steps...
msg_info "Restoring Data"
cp -r /opt/appname_data_backup/. /opt/appname/data
rm -rf /opt/appname_data_backup
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start appname
msg_ok "Started Service"
msg_ok "Updated successfully!"
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}http://${IP}:PORT${CL}"
```
### Install Script (`install/AppName-install.sh`)
```bash
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: AuthorName (GitHubUsername)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://application-url.com
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 \
dependency1 \
dependency2
msg_ok "Installed Dependencies"
# Runtime Setup (ALWAYS use our functions!)
NODE_VERSION="22" setup_nodejs
# or
PG_VERSION="16" setup_postgresql
# or
setup_uv
# etc.
fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "latest" "/opt/appname"
msg_info "Setting up Application"
cd /opt/appname
# Build/Setup Schritte...
msg_ok "Set up Application"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/appname.service
[Unit]
Description=AppName Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/appname
ExecStart=/path/to/executable
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now appname
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
```
---
## 🔧 Available Helper Functions
### Release Management
| Function | Description | Example |
| ----------------------------- | ----------------------------------- | ------------------------------------------------------------- |
| `fetch_and_deploy_gh_release` | Fetches and installs GitHub Release | `fetch_and_deploy_gh_release "app" "owner/repo"` |
| `check_for_gh_release` | Checks for new version | `if check_for_gh_release "app" "YourUsername/YourRepo"; then` |
**Modes for `fetch_and_deploy_gh_release`:**
```bash
# Tarball/Source (Standard)
fetch_and_deploy_gh_release "appname" "owner/repo"
# Binary (.deb)
fetch_and_deploy_gh_release "appname" "owner/repo" "binary"
# Prebuilt Archive
fetch_and_deploy_gh_release "appname" "owner/repo" "prebuild" "latest" "/opt/appname" "filename.tar.gz"
# Single Binary
fetch_and_deploy_gh_release "appname" "owner/repo" "singlefile" "latest" "/opt/appname" "binary-linux-amd64"
```
**Clean Install Flag:**
```bash
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "appname" "owner/repo"
```
### Runtime/Language Setup
| Function | Variable(s) | Example |
| -------------- | ----------------------------- | ---------------------------------------------------- |
| `setup_nodejs` | `NODE_VERSION`, `NODE_MODULE` | `NODE_VERSION="22" setup_nodejs` |
| `setup_uv` | `PYTHON_VERSION` | `PYTHON_VERSION="3.12" setup_uv` |
| `setup_go` | `GO_VERSION` | `GO_VERSION="1.22" setup_go` |
| `setup_rust` | `RUST_VERSION`, `RUST_CRATES` | `RUST_CRATES="monolith" setup_rust` |
| `setup_ruby` | `RUBY_VERSION` | `RUBY_VERSION="3.3" setup_ruby` |
| `setup_java` | `JAVA_VERSION` | `JAVA_VERSION="21" setup_java` |
| `setup_php` | `PHP_VERSION`, `PHP_MODULES` | `PHP_VERSION="8.3" PHP_MODULES="redis,gd" setup_php` |
### Database Setup
| Function | Variable(s) | Example |
| --------------------- | ------------------------------------ | ----------------------------------------------------------- |
| `setup_postgresql` | `PG_VERSION`, `PG_MODULES` | `PG_VERSION="16" setup_postgresql` |
| `setup_postgresql_db` | `PG_DB_NAME`, `PG_DB_USER` | `PG_DB_NAME="mydb" PG_DB_USER="myuser" setup_postgresql_db` |
| `setup_mariadb_db` | `MARIADB_DB_NAME`, `MARIADB_DB_USER` | `MARIADB_DB_NAME="mydb" setup_mariadb_db` |
| `setup_mysql` | `MYSQL_VERSION` | `setup_mysql` |
| `setup_mongodb` | `MONGO_VERSION` | `setup_mongodb` |
| `setup_clickhouse` | - | `setup_clickhouse` |
### Tools & Utilities
| Function | Description |
| ------------------- | ---------------------------------- |
| `setup_adminer` | Installs Adminer for DB management |
| `setup_composer` | Install PHP Composer |
| `setup_ffmpeg` | Install FFmpeg |
| `setup_imagemagick` | Install ImageMagick |
| `setup_gs` | Install Ghostscript |
| `setup_hwaccel` | Configure hardware acceleration |
### Helper Utilities
| Function | Description | Example |
| ----------------------------- | ---------------------------- | ----------------------------------------- |
| `import_local_ip` | Sets `$LOCAL_IP` variable | `import_local_ip` |
| `ensure_dependencies` | Checks/installs dependencies | `ensure_dependencies curl jq` |
| `install_packages_with_retry` | APT install with retry | `install_packages_with_retry nginx redis` |
---
## ❌ Anti-Patterns (NEVER use!)
### 1. Pointless Variables
```bash
# ❌ WRONG - unnecessary variables
APP_NAME="myapp"
APP_DIR="/opt/${APP_NAME}"
APP_USER="root"
APP_PORT="3000"
cd $APP_DIR
# ✅ CORRECT - use directly
cd /opt/myapp
```
### 2. Custom Download Logic
```bash
# ❌ WRONG - custom wget/curl logic
RELEASE=$(curl -s https://api.github.com/repos/YourUsername/YourRepo/releases/latest | jq -r '.tag_name')
wget https://github.com/YourUsername/YourRepo/archive/${RELEASE}.tar.gz
tar -xzf ${RELEASE}.tar.gz
mv repo-${RELEASE} /opt/myapp
# ✅ CORRECT - use our function
fetch_and_deploy_gh_release "myapp" "YourUsername/YourRepo" "tarball" "latest" "/opt/myapp"
```
### 3. Custom Version-Check Logic
```bash
# ❌ WRONG - custom version check
CURRENT=$(cat /opt/myapp/version.txt)
LATEST=$(curl -s https://api.github.com/repos/YourUsername/YourRepo/releases/latest | jq -r '.tag_name')
if [[ "$CURRENT" != "$LATEST" ]]; then
# update...
fi
# ✅ CORRECT - use our function
if check_for_gh_release "myapp" "YourUsername/YourRepo"; then
# update...
fi
```
### 4. Docker-based Installation
```bash
# ❌ WRONG - using Docker
docker pull myapp/myapp:latest
docker run -d --name myapp myapp/myapp:latest
# ✅ CORRECT - Bare-Metal Installation
fetch_and_deploy_gh_release "myapp" "YourUsername/YourRepo"
npm install && npm run build
```
### 5. Custom Runtime Installation
```bash
# ❌ WRONG - custom Node.js installation
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
# ✅ CORRECT - use our function
NODE_VERSION="22" setup_nodejs
```
### 6. Redundant echo Statements
```bash
# ❌ WRONG - custom logging messages
echo "Installing dependencies..."
apt install -y curl
echo "Done!"
# ✅ CORRECT - use msg_info/msg_ok
msg_info "Installing Dependencies"
$STD apt install -y curl
msg_ok "Installed Dependencies"
```
### 7. Missing $STD Usage
```bash
# ❌ WRONG - apt without $STD
apt install -y nginx
# ✅ CORRECT - with $STD for silent output
$STD apt install -y nginx
```
### 8. Wrapping `tools.func` Functions in msg Blocks
```bash
# ❌ WRONG - tools.func functions have their own msg_info/msg_ok!
msg_info "Installing Node.js"
NODE_VERSION="22" setup_nodejs
msg_ok "Installed Node.js"
msg_info "Updating Application"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "latest" "/opt/appname"
msg_ok "Updated Application"
# ✅ CORRECT - call directly without msg wrapper
NODE_VERSION="22" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "latest" "/opt/appname"
```
**Functions with built-in messages (NEVER wrap in msg blocks):**
- `fetch_and_deploy_gh_release`
- `check_for_gh_release`
- `setup_nodejs`
- `setup_postgresql` / `setup_postgresql_db`
- `setup_mariadb` / `setup_mariadb_db`
- `setup_mongodb`
- `setup_mysql`
- `setup_ruby`
- `setup_go`
- `setup_java`
- `setup_php`
- `setup_uv`
- `setup_rust`
- `setup_composer`
- `setup_ffmpeg`
- `setup_imagemagick`
- `setup_gs`
- `setup_adminer`
- `setup_hwaccel`
### 9. Creating Unnecessary System Users
```bash
# ❌ WRONG - LXC containers run as root, no separate user needed
useradd -m -s /usr/bin/bash appuser
chown -R appuser:appuser /opt/appname
sudo -u appuser npm install
# ✅ CORRECT - run directly as root
cd /opt/appname
$STD npm install
```
### 10. Using `export` in .env Files
```bash
# ❌ WRONG - export is unnecessary in .env files
cat <<EOF >/opt/appname/.env
export DATABASE_URL=postgres://...
export SECRET_KEY=abc123
export NODE_ENV=production
EOF
# ✅ CORRECT - simple KEY=VALUE format (files are sourced with set -a)
cat <<EOF >/opt/appname/.env
DATABASE_URL=postgres://...
SECRET_KEY=abc123
NODE_ENV=production
EOF
```
### 11. Using External Shell Scripts
```bash
# ❌ WRONG - external script that gets executed
cat <<'EOF' >/opt/appname/install_script.sh
#!/bin/bash
cd /opt/appname
npm install
npm run build
EOF
chmod +x /opt/appname/install_script.sh
$STD bash /opt/appname/install_script.sh
rm -f /opt/appname/install_script.sh
# ✅ CORRECT - run commands directly
cd /opt/appname
$STD npm install
$STD npm run build
```
### 12. Using `sudo` in LXC Containers
```bash
# ❌ WRONG - sudo is unnecessary in LXC (already root)
sudo -u postgres psql -c "CREATE DATABASE mydb;"
sudo -u appuser npm install
# ✅ CORRECT - use functions or run directly as root
PG_DB_NAME="mydb" PG_DB_USER="myuser" setup_postgresql_db
cd /opt/appname
$STD npm install
```
### 13. Unnecessary `systemctl daemon-reload`
```bash
# ❌ WRONG - daemon-reload is only needed when MODIFYING existing services
cat <<EOF >/etc/systemd/system/appname.service
# ... service config ...
EOF
systemctl daemon-reload # Unnecessary for new services!
systemctl enable -q --now appname
# ✅ CORRECT - new services don't need daemon-reload
cat <<EOF >/etc/systemd/system/appname.service
# ... service config ...
EOF
systemctl enable -q --now appname
```
### 14. Creating Custom Credentials Files
```bash
# ❌ WRONG - custom credentials file is not part of the standard template
msg_info "Saving Credentials"
cat <<EOF >~/appname.creds
Database User: ${DB_USER}
Database Pass: ${DB_PASS}
EOF
msg_ok "Saved Credentials"
# ✅ CORRECT - credentials are stored in .env or shown in final message only
# If you use setup_postgresql_db / setup_mariadb_db, a standard ~/[appname].creds is created automatically
```
### 15. Wrong Footer Pattern
```bash
# ❌ WRONG - old cleanup pattern with msg blocks
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
# ✅ CORRECT - use cleanup_lxc function
motd_ssh
customize
cleanup_lxc
```
### 16. Manual Database Creation Instead of Functions
```bash
# ❌ WRONG - manual database creation
DB_USER="myuser"
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE mydb WITH OWNER $DB_USER;"
$STD sudo -u postgres psql -d mydb -c "CREATE EXTENSION IF NOT EXISTS postgis;"
# ✅ CORRECT - use setup_postgresql_db function
# This sets PG_DB_USER, PG_DB_PASS, PG_DB_NAME automatically
PG_DB_NAME="mydb" PG_DB_USER="myuser" PG_DB_EXTENSIONS="postgis" setup_postgresql_db
```
### 17. Writing Files Without Heredocs
```bash
# ❌ WRONG - echo / printf / tee
echo "# Config" > /opt/app/config.yml
echo "port: 3000" >> /opt/app/config.yml
printf "# Config\nport: 3000\n" > /opt/app/config.yml
cat config.yml | tee /opt/app/config.yml
```
```bash
# ✅ CORRECT - always use a single heredoc
cat <<EOF >/opt/app/config.yml
# Config
port: 3000
EOF
```
---
## 📝 Important Rules
### Variable Declarations (CT Script)
```bash
# Standard declarations (ALWAYS present)
APP="AppName"
var_tags="${var_tags:-tag1;tag2}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
```
### Update-Script Pattern
```bash
function update_script() {
header_info
check_container_storage
check_container_resources
# 1. Check if installation exists
if [[ ! -d /opt/appname ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
# 2. Check for update
if check_for_gh_release "appname" "YourUsername/YourRepo"; then
# 3. Stop service
msg_info "Stopping Service"
systemctl stop appname
msg_ok "Stopped Service"
# 4. Backup data (if present)
msg_info "Backing up Data"
cp -r /opt/appname/data /opt/appname_data_backup
msg_ok "Backed up Data"
# 5. Perform clean install
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "latest" "/opt/appname"
# 6. Rebuild (if needed)
cd /opt/appname
$STD npm install
$STD npm run build
# 7. Restore data
msg_info "Restoring Data"
cp -r /opt/appname_data_backup/. /opt/appname/data
rm -rf /opt/appname_data_backup
msg_ok "Restored Data"
# 8. Start service
msg_info "Starting Service"
systemctl start appname
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
exit # IMPORTANT: Always end with exit!
}
```
### Systemd Service Pattern
```bash
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/appname.service
[Unit]
Description=AppName Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/appname
Environment=NODE_ENV=production
ExecStart=/usr/bin/node /opt/appname/server.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now appname
msg_ok "Created Service"
```
### Installation Script Footer
```bash
# ALWAYS at the end of the install script:
motd_ssh
customize
cleanup_lxc
```
---
## 📖 Reference: Good Example Scripts
Look at these recent well-implemented applications as reference:
### Container Scripts (Latest 10)
- [ct/thingsboard.sh](../ct/thingsboard.sh) - IoT platform with proper update_script
- [ct/unifi-os-server.sh](../ct/unifi-os-server.sh) - Complex setup with podman
- [ct/trip.sh](../ct/trip.sh) - Simple Ruby app
- [ct/fladder.sh](../ct/fladder.sh) - Media app with database
- [ct/qui.sh](../ct/qui.sh) - Lightweight utility
- [ct/kutt.sh](../ct/kutt.sh) - Node.js with PostgreSQL
- [ct/flatnotes.sh](../ct/flatnotes.sh) - Python notes app
- [ct/investbrain.sh](../ct/investbrain.sh) - Finance app
- [ct/gwn-manager.sh](../ct/gwn-manager.sh) - Network management
- [ct/sportarr.sh](../ct/sportarr.sh) - Specialized \*Arr variant
### Install Scripts (Latest)
- [install/unifi-os-server-install.sh](../install/unifi-os-server-install.sh) - Complex setup with API integration
- [install/trip-install.sh](../install/trip-install.sh) - Rails application setup
- [install/mail-archiver-install.sh](../install/mail-archiver-install.sh) - Email-related service
**Key things to notice:**
- Proper error handling with `catch_errors`
- Use of `check_for_gh_release` and `fetch_and_deploy_gh_release`
- Correct backup/restore patterns in `update_script`
- Footer always ends with `motd_ssh`, `customize`, `cleanup_lxc`
- JSON metadata files created for each app
---
## <20> JSON Metadata Files
Every application requires a JSON metadata file in `frontend/public/json/<appname>.json`.
### JSON Structure
```json
{
"name": "AppName",
"slug": "appname",
"categories": [1],
"date_created": "2026-01-16",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://docs.appname.com/",
"website": "https://appname.com/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/appname.webp",
"config_path": "/opt/appname/.env",
"description": "Short description of the application and its purpose.",
"install_methods": [
{
"type": "default",
"script": "ct/appname.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}
```
### Required Fields
| Field | Type | Description |
| --------------------- | ------- | -------------------------------------------------- |
| `name` | string | Display name of the application |
| `slug` | string | Lowercase, no spaces, used for filenames |
| `categories` | array | Category ID(s) - see category list below |
| `date_created` | string | Creation date (YYYY-MM-DD) |
| `type` | string | `ct` for container, `vm` for virtual machine |
| `updateable` | boolean | Whether update_script is implemented |
| `privileged` | boolean | Whether container needs privileged mode |
| `interface_port` | number | Primary web interface port (or `null`) |
| `documentation` | string | Link to official docs |
| `website` | string | Link to official website |
| `logo` | string | URL to application logo (preferably selfhst icons) |
| `config_path` | string | Path to main config file (or empty string) |
| `description` | string | Brief description of the application |
| `install_methods` | array | Installation configurations |
| `default_credentials` | object | Default username/password (or null) |
| `notes` | array | Additional notes/warnings |
### Categories
| ID | Category |
| --- | ------------------------- |
| 0 | Miscellaneous |
| 1 | Proxmox & Virtualization |
| 2 | Operating Systems |
| 3 | Containers & Docker |
| 4 | Network & Firewall |
| 5 | Adblock & DNS |
| 6 | Authentication & Security |
| 7 | Backup & Recovery |
| 8 | Databases |
| 9 | Monitoring & Analytics |
| 10 | Dashboards & Frontends |
| 11 | Files & Downloads |
| 12 | Documents & Notes |
| 13 | Media & Streaming |
| 14 | \*Arr Suite |
| 15 | NVR & Cameras |
| 16 | IoT & Smart Home |
| 17 | ZigBee, Z-Wave & Matter |
| 18 | MQTT & Messaging |
| 19 | Automation & Scheduling |
| 20 | AI / Coding & Dev-Tools |
| 21 | Webservers & Proxies |
| 22 | Bots & ChatOps |
| 23 | Finance & Budgeting |
| 24 | Gaming & Leisure |
| 25 | Business & ERP |
### Notes Format
```json
"notes": [
{
"text": "Change the default password after first login!",
"type": "warning"
},
{
"text": "Requires at least 4GB RAM for optimal performance.",
"type": "info"
}
]
```
**Note types:** `info`, `warning`, `error`
### Examples with Credentials
```json
"default_credentials": {
"username": "admin",
"password": "admin"
}
```
Or no credentials:
```json
"default_credentials": {
"username": null,
"password": null
}
```
---
## 🔍 Checklist Before PR Creation
- [ ] No Docker installation used
- [ ] `fetch_and_deploy_gh_release` used for GitHub releases
- [ ] `check_for_gh_release` used for update checks
- [ ] `setup_*` functions used for runtimes (nodejs, postgresql, etc.)
- [ ] **`tools.func` functions NOT wrapped in msg_info/msg_ok blocks**
- [ ] No redundant variables (only when used multiple times)
- [ ] `$STD` before all apt/npm/build commands
- [ ] `msg_info`/`msg_ok`/`msg_error` for logging (only for custom code)
- [ ] Correct script structure followed (see templates)
- [ ] Update function present and functional (CT scripts)
- [ ] Data backup implemented in update function (if applicable)
- [ ] `motd_ssh`, `customize`, `cleanup_lxc` at the end of install scripts
- [ ] No custom download/version-check logic
- [ ] All links point to `community-scripts/ProxmoxVE` (not `ProxmoxVED`!)
- [ ] JSON metadata file created in `frontend/public/json/<appname>.json`
- [ ] Category IDs are valid (0-25)
- [ ] Default OS version is Debian 13 or newer (unless special requirement)
- [ ] Default resources are reasonable for the application
---
## 💡 Tips for AI Assistants
1. **ALWAYS search `tools.func` first** before implementing custom solutions
2. **Use recent scripts as reference** (Thingsboard, UniFi OS, Trip, Flatnotes, etc.)
3. **Ask when uncertain** instead of introducing wrong patterns
4. **Test via GitHub** - push to your fork and test with curl (not local bash)
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"
# Wait 10-30 seconds after pushing - GitHub takes time to update files
```
5. **Consistency > Creativity** - follow established patterns strictly
6. **Check the templates** - they show the correct structure
7. **Don't wrap tools.func functions** - they handle their own msg_info/msg_ok output
8. **Minimal variables** - only create variables that are truly reused multiple times
9. **Always use $STD** - ensures silent/non-interactive execution
10. **Reference good examples** - look at recent additions in each category
---
## 🍒 Important: Cherry-Picking Your Files for PR Submission
⚠️ **CRITICAL**: When you submit your PR, you must use git cherry-pick to send ONLY your 3-4 files!
Why? Because `setup-fork.sh` modifies 600+ files to update links. If you commit all changes, your PR will be impossible to merge.
**See**: [README.md - Cherry-Pick Section](README.md#-cherry-pick-submitting-only-your-changes) for complete instructions on:
- Creating a clean submission branch
- Cherry-picking only your files (ct/myapp.sh, install/myapp-install.sh, frontend/public/json/myapp.json)
- Verifying your PR has only 3 file changes (not 600+)
**Quick reference**:
```bash
# Create clean branch from upstream
git fetch upstream
git checkout -b submit/myapp upstream/main
# Cherry-pick your commit(s) or manually add your 3-4 files
# Then push to your fork and create PR
```
---
## 📚 Further Documentation
- [CONTRIBUTING.md](CONTRIBUTING.md) - General contribution guidelines
- [GUIDE.md](GUIDE.md) - Detailed developer documentation
- [HELPER_FUNCTIONS.md](HELPER_FUNCTIONS.md) - Complete tools.func reference
- [README.md](README.md) - Cherry-pick guide and workflow instructions
- [../TECHNICAL_REFERENCE.md](../TECHNICAL_REFERENCE.md) - Technical deep dive
- [../EXIT_CODES.md](../EXIT_CODES.md) - Exit code reference
- [templates_ct/](templates_ct/) - CT script templates
- [templates_install/](templates_install/) - Install script templates
- [templates_json/](templates_json/) - JSON metadata templates

View File

@@ -1,41 +1,14 @@
# 🧪 Code Audit: LXC Script Flow <div align="center">
<img src="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo.png" height="100px" />
</div>
<h2><div align="center">Exploring the Scripts and Steps Involved in an Application LXC Installation</div></h2>
This guide explains the current execution flow and what to verify during reviews. 1) [adguard.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/ct/adguard.sh): This script collects system parameters. (Also holds the function to update the application.)
2) [build.func](https://github.com/community-scripts/ProxmoxVE/blob/main/misc/build.func): Adds user settings and integrates collected information.
3) [create_lxc.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/misc/create_lxc.sh): Constructs the LXC container.
4) [adguard-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/install/adguard-install.sh): Executes functions from [install.func](https://github.com/community-scripts/ProxmoxVE/blob/main/misc/install.func), and installs the application.
5) [adguard.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/ct/adguard.sh) (again): To display the completion message.
## Execution Flow (CT + Install) The installation process uses reusable scripts: [build.func](https://github.com/community-scripts/ProxmoxVE/blob/main/misc/build.func), [create_lxc.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/misc/create_lxc.sh), and [install.func](https://github.com/community-scripts/ProxmoxVE/blob/main/misc/install.func), which are not specific to any particular application.
1. `ct/appname.sh` runs on the Proxmox host and sources `misc/build.func`. To gain a better understanding, focus on reviewing [adguard-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/install/adguard-install.sh). This script contains the commands and configurations for installing and configuring AdGuard Home within the LXC container.
2. `build.func` orchestrates prompts, container creation, and invokes the install script.
3. Inside the container, `misc/install.func` exposes helper functions via `$FUNCTIONS_FILE_PATH`.
4. `install/appname-install.sh` performs the application install.
5. The CT script prints the completion message.
## Audit Checklist
### CT Script (ct/)
- Sources `misc/build.func` from `community-scripts/ProxmoxVE/main` (setup-fork.sh updates for forks).
- Uses `check_for_gh_release` + `fetch_and_deploy_gh_release` for updates.
- No Docker-based installs.
### Install Script (install/)
- Sources `$FUNCTIONS_FILE_PATH`.
- Uses `tools.func` helpers (setup\_\*).
- Ends with `motd_ssh`, `customize`, `cleanup_lxc`.
### JSON Metadata
- File in `frontend/public/json/<appname>.json` matches template schema.
### Testing
- Test via curl from your fork (CT script only).
- Wait 10-30 seconds after push.
## References
- `docs/contribution/templates_ct/AppName.sh`
- `docs/contribution/templates_install/AppName-install.sh`
- `docs/contribution/templates_json/AppName.json`
- `docs/contribution/GUIDE.md`

View File

@@ -81,22 +81,11 @@ git clone https://github.com/yourUserName/ForkName
git switch -c your-feature-branch git switch -c your-feature-branch
``` ```
### 4. Run setup-fork.sh to auto-configure your fork ### 4. Change paths in build.func install.func and AppName.sh
```bash To be able to develop from your own branch you need to change `https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main` to `https://raw.githubusercontent.com/[USER]/[REPOSITORY]/refs/heads/[BRANCH]`. You need to make this change atleast in misc/build.func misc/install.func and in your ct/AppName.sh. This change is only for testing. Before opening a Pull Request you should change this line change all this back to point to `https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main`.
bash docs/contribution/setup-fork.sh --full
```
This script automatically: ### 4. Commit changes (without build.func and install.func!)
- Detects your GitHub username
- Updates ALL curl URLs to point to your fork (for testing)
- Creates `.git-setup-info` with your config
- Backs up all modified files (\*.backup)
**IMPORTANT**: This modifies 600+ files! Use cherry-pick when submitting your PR (see below).
### 5. Commit ONLY your new application files
```bash ```bash
git commit -m "Your commit message" git commit -m "Your commit message"
@@ -108,66 +97,9 @@ git commit -m "Your commit message"
git push origin your-feature-branch git push origin your-feature-branch
``` ```
### 6. Cherry-Pick: Submit Only Your Files for PR ### 6. Create a Pull Request
⚠️ **IMPORTANT**: setup-fork.sh modified 600+ files. You MUST only submit your 3 new files! Open a Pull Request from your feature branch to the main repository branch. You must only include your **$AppName.sh**, **$AppName-install.sh** and **$AppName.json** files in the pull request.
See [README.md - Cherry-Pick Guide](README.md#-cherry-pick-submitting-only-your-changes) for step-by-step instructions.
Quick version:
```bash
# Create clean branch from upstream
git fetch upstream
git checkout -b submit/myapp upstream/main
# Copy only your files
cp ../your-work-branch/ct/myapp.sh ct/myapp.sh
cp ../your-work-branch/install/myapp-install.sh install/myapp-install.sh
cp ../your-work-branch/frontend/public/json/myapp.json frontend/public/json/myapp.json
# Commit and verify
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git commit -m "feat: add MyApp"
git diff upstream/main --name-only # Should show ONLY your 3 files
# Push and create PR
git push origin submit/myapp
```
### 7. Create a Pull Request
Open a Pull Request from `submit/myapp``community-scripts/ProxmoxVE/main`.
Verify the PR shows ONLY these 3 files:
- `ct/myapp.sh`
- `install/myapp-install.sh`
- `frontend/public/json/myapp.json`
---
# 🛠️ Developer Mode & Debugging
When building or testing scripts, you can use the `dev_mode` variable to enable powerful debugging features. These flags can be combined (comma-separated).
**Usage**:
```bash
# Example: Run with trace and keep the container even if it fails
dev_mode="trace,keep" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/myapp.sh)"
```
### Available Flags:
| Flag | Description |
| :--- | :--- |
| `trace` | Enables `set -x` for maximum verbosity during execution. |
| `keep` | Prevents the container from being deleted if the build fails. |
| `pause` | Pauses execution at key points (e.g., before customization). |
| `breakpoint` | Allows hardcoded `breakpoint` calls in scripts to drop to a shell. |
| `logs` | Saves detailed build logs to `/var/log/community-scripts/`. |
| `dryrun` | Bypasses actual container creation (limited support). |
| `motd` | Forces an update of the Message of the Day (MOTD). |
--- ---

View File

@@ -10,7 +10,7 @@ git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git
cd ProxmoxVE cd ProxmoxVE
# Run setup script (auto-detects your username from git) # Run setup script (auto-detects your username from git)
bash docs/contribution/setup-fork.sh --full bash setup-fork.sh
``` ```
That's it! ✅ That's it! ✅
@@ -22,101 +22,64 @@ That's it! ✅
The `setup-fork.sh` script automatically: The `setup-fork.sh` script automatically:
1. **Detects** your GitHub username from git config 1. **Detects** your GitHub username from git config
2. **Updates ALL hardcoded links** to point to your fork: 2. **Updates** 22 hardcoded links in documentation to point to your fork
- Documentation links pointing to `community-scripts/ProxmoxVE` 3. **Creates** `.git-setup-info` with recommended git workflows
- **Curl download URLs** in scripts (e.g., `curl ... github.com/community-scripts/ProxmoxVE/main/...`) 4. **Backs up** all modified files (*.backup)
3. **Creates** `.git-setup-info` with your configuration details
4. **Backs up** all modified files (\*.backup for safety)
### Why Updating Curl Links Matters
Your scripts contain `curl` commands that download dependencies from GitHub (build.func, tools.func, etc.):
```bash
# First line of ct/myapp.sh
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
```
**WITHOUT setup-fork.sh:**
- Script URLs still point to `community-scripts/ProxmoxVE/main`
- If you test locally with `bash ct/myapp.sh`, you're testing local files, but the script's curl commands would download from **upstream** repo
- Your modifications aren't actually being tested via the curl commands! ❌
**AFTER setup-fork.sh:**
- Script URLs are updated to `YourUsername/ProxmoxVE/main`
- When you test via curl from GitHub: `bash -c "$(curl ... YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"`, it downloads from **your fork**
- The script's curl commands also point to your fork, so you're actually testing your changes! ✅
- ⏱️ **Important:** GitHub takes 10-30 seconds to recognize pushed files - wait before testing!
```bash
# Example: What setup-fork.sh changes
# BEFORE (points to upstream):
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# AFTER (points to your fork):
source <(curl -fsSL https://raw.githubusercontent.com/john/ProxmoxVE/main/misc/build.func)
```
--- ---
## Usage ## Usage
### Auto-Detect (Recommended) ### Auto-Detect (Recommended)
```bash ```bash
bash docs/contribution/setup-fork.sh --full bash setup-fork.sh
``` ```
Automatically reads your GitHub username from `git remote origin url` Automatically reads your GitHub username from `git remote origin url`
### Specify Username ### Specify Username
```bash ```bash
bash docs/contribution/setup-fork.sh --full john bash setup-fork.sh john
``` ```
Updates links to `github.com/john/ProxmoxVE` Updates links to `github.com/john/ProxmoxVE`
### Custom Repository Name ### Custom Repository Name
```bash ```bash
bash docs/contribution/setup-fork.sh --full john my-fork bash setup-fork.sh john my-fork
``` ```
Updates links to `github.com/john/my-fork` Updates links to `github.com/john/my-fork`
--- ---
## What Gets Updated? ## What Gets Updated?
The script updates hardcoded links in these areas when using `--full`: The script updates these documentation files:
- `docs/CONTRIBUTION_GUIDE.md` (4 links)
- `ct/`, `install/`, `vm/` scripts - `docs/README.md` (1 link)
- `misc/` function libraries - `docs/INDEX.md` (3 links)
- `docs/` (including `docs/contribution/`) - `docs/EXIT_CODES.md` (2 links)
- Code examples in documentation - `docs/DEFAULTS_SYSTEM_GUIDE.md` (2 links)
- `docs/api/README.md` (1 link)
- `docs/APP-ct.md` (1 link)
- `docs/APP-install.md` (1 link)
- `docs/alpine-install.func.md` (2 links)
- `docs/install.func.md` (1 link)
- And code examples in documentation
--- ---
## After Setup ## After Setup
1. **Review changes** 1. **Review changes**
```bash ```bash
git diff docs/ git diff docs/
``` ```
2. **Read git workflow tips** 2. **Read git workflow tips**
```bash ```bash
cat .git-setup-info cat .git-setup-info
``` ```
3. **Start contributing** 3. **Start contributing**
```bash ```bash
git checkout -b feature/my-app git checkout -b feature/my-app
# Make your changes... # Make your changes...
@@ -125,7 +88,7 @@ The script updates hardcoded links in these areas when using `--full`:
4. **Follow the guide** 4. **Follow the guide**
```bash ```bash
cat docs/contribution/GUIDE.md cat docs/CONTRIBUTION_GUIDE.md
``` ```
--- ---
@@ -133,7 +96,6 @@ The script updates hardcoded links in these areas when using `--full`:
## Common Workflows ## Common Workflows
### Keep Your Fork Updated ### Keep Your Fork Updated
```bash ```bash
# Add upstream if you haven't already # Add upstream if you haven't already
git remote add upstream https://github.com/community-scripts/ProxmoxVE.git git remote add upstream https://github.com/community-scripts/ProxmoxVE.git
@@ -145,7 +107,6 @@ git push origin main
``` ```
### Create a Feature Branch ### Create a Feature Branch
```bash ```bash
git checkout -b feature/docker-improvements git checkout -b feature/docker-improvements
# Make changes... # Make changes...
@@ -154,7 +115,6 @@ git push origin feature/docker-improvements
``` ```
### Sync Before Contributing ### Sync Before Contributing
```bash ```bash
git fetch upstream git fetch upstream
git rebase upstream/main git rebase upstream/main
@@ -167,16 +127,14 @@ git checkout -b feature/my-feature
## Troubleshooting ## Troubleshooting
### "Git is not installed" or "not a git repository" ### "Git is not installed" or "not a git repository"
```bash ```bash
# Make sure you cloned the repo first # Make sure you cloned the repo first
git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git
cd ProxmoxVE cd ProxmoxVE
bash docs/contribution/setup-fork.sh --full bash setup-fork.sh
``` ```
### "Could not auto-detect GitHub username" ### "Could not auto-detect GitHub username"
```bash ```bash
# Your git origin URL isn't set up correctly # Your git origin URL isn't set up correctly
git remote -v git remote -v
@@ -184,32 +142,29 @@ git remote -v
# Fix it: # Fix it:
git remote set-url origin https://github.com/YOUR_USERNAME/ProxmoxVE.git git remote set-url origin https://github.com/YOUR_USERNAME/ProxmoxVE.git
bash docs/contribution/setup-fork.sh --full bash setup-fork.sh
``` ```
### "Permission denied" ### "Permission denied"
```bash ```bash
# Make script executable # Make script executable
chmod +x docs/contribution/setup-fork.sh chmod +x setup-fork.sh
bash docs/contribution/setup-fork.sh --full bash setup-fork.sh
``` ```
### Reverted Changes by Accident? ### Reverted Changes by Accident?
```bash ```bash
# Backups are created automatically # Backups are created automatically
git checkout docs/*.backup git checkout docs/*.backup
# Or just re-run setup-fork.sh # Or just re-run setup-fork.sh
bash docs/contribution/setup-fork.sh --full
``` ```
--- ---
## Next Steps ## Next Steps
1. ✅ Run `bash docs/contribution/setup-fork.sh --full` 1. ✅ Run `bash setup-fork.sh`
2. 📖 Read [docs/contribution/GUIDE.md](GUIDE.md) 2. 📖 Read [docs/CONTRIBUTION_GUIDE.md](docs/CONTRIBUTION_GUIDE.md)
3. 🍴 Choose your contribution path: 3. 🍴 Choose your contribution path:
- **Containers** → [docs/ct/README.md](docs/ct/README.md) - **Containers** → [docs/ct/README.md](docs/ct/README.md)
- **Installation** → [docs/install/README.md](docs/install/README.md) - **Installation** → [docs/install/README.md](docs/install/README.md)
@@ -222,10 +177,10 @@ bash docs/contribution/setup-fork.sh --full
## Questions? ## Questions?
- **Fork Setup Issues?** → See [Troubleshooting](#troubleshooting) above - **Fork Setup Issues?** → See [Troubleshooting](#troubleshooting) above
- **How to Contribute?** → [docs/contribution/GUIDE.md](GUIDE.md) - **How to Contribute?** → [docs/CONTRIBUTION_GUIDE.md](docs/CONTRIBUTION_GUIDE.md)
- **Git Workflows?** → `cat .git-setup-info` - **Git Workflows?** → `cat .git-setup-info`
- **Project Structure?** → [docs/README.md](docs/README.md) - **Project Structure?** → [docs/README.md](docs/README.md)
--- ---
## Happy Contributing! 🚀 **Happy Contributing! 🚀**

View File

@@ -38,8 +38,8 @@ git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git
cd ProxmoxVE cd ProxmoxVE
# 3. Run fork setup script (automatically configures everything) # 3. Run fork setup script (automatically configures everything)
bash docs/contribution/setup-fork.sh --full bash setup-fork.sh
# --full updates ct/, install/, vm/, docs/, misc/ links for fork testing # This auto-detects your username and updates all documentation links
# 4. Read the git workflow tips # 4. Read the git workflow tips
cat .git-setup-info cat .git-setup-info
@@ -51,29 +51,28 @@ cat .git-setup-info
# 1. Create feature branch # 1. Create feature branch
git checkout -b add/my-awesome-app git checkout -b add/my-awesome-app
# 2. Create application scripts from templates # 2. Create application scripts
cp docs/contribution/templates_ct/AppName.sh ct/myapp.sh cp ct/example.sh ct/myapp.sh
cp docs/contribution/templates_install/AppName-install.sh install/myapp-install.sh cp install/example-install.sh install/myapp-install.sh
cp docs/contribution/templates_json/AppName.json frontend/public/json/myapp.json
# 3. Edit your scripts # 3. Edit your scripts
nano ct/myapp.sh nano ct/myapp.sh
nano install/myapp-install.sh nano install/myapp-install.sh
nano frontend/public/json/myapp.json
# 4. Commit and push to your fork # 4. Test locally
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json bash ct/myapp.sh # Will prompt for container creation
git commit -m "feat: add MyApp container and install scripts"
# 5. Commit and push
git add ct/myapp.sh install/myapp-install.sh
git commit -m "feat: add MyApp container"
git push origin add/my-awesome-app git push origin add/my-awesome-app
# 5. Test via curl from your fork (GitHub may take 10-30 seconds) # 6. Open Pull Request on GitHub
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)" # Click: New Pull Request (GitHub will show this automatically)
# 6. Use cherry-pick to submit only your files (see Cherry-Pick section) # 7. Keep your fork updated
# DO NOT submit the 600+ files modified by setup-fork.sh! git fetch upstream
git rebase upstream/main
# 7. Open Pull Request on GitHub
# Create PR from: your-fork/add/my-awesome-app → community-scripts/ProxmoxVE/main
``` ```
**💡 Tip**: See `../FORK_SETUP.md` for detailed fork setup and troubleshooting **💡 Tip**: See `../FORK_SETUP.md` for detailed fork setup and troubleshooting
@@ -113,9 +112,9 @@ ProxmoxVE/
│ └── alpine-tools.func # Alpine tools │ └── alpine-tools.func # Alpine tools
├── docs/ # 📚 Documentation ├── docs/ # 📚 Documentation
│ ├── ct/DETAILED_GUIDE.md # Container script guide │ ├── UPDATED_APP-ct.md # Container script guide
│ ├── install/DETAILED_GUIDE.md # Install script guide │ ├── UPDATED_APP-install.md # Install script guide
│ └── contribution/README.md # Contribution overview │ └── CONTRIBUTING.md # (This file!)
├── tools/ # 🔧 Proxmox management tools ├── tools/ # 🔧 Proxmox management tools
│ └── pve/ │ └── pve/
@@ -138,7 +137,6 @@ Examples:
``` ```
**Rules**: **Rules**:
- Container script name: **Title Case** (PiHole, Docker, NextCloud) - Container script name: **Title Case** (PiHole, Docker, NextCloud)
- Install script name: **lowercase** with **hyphens** (pihole-install, docker-install) - Install script name: **lowercase** with **hyphens** (pihole-install, docker-install)
- Must match: `ct/AppName.sh``install/appname-install.sh` - Must match: `ct/AppName.sh``install/appname-install.sh`
@@ -158,7 +156,6 @@ Examples:
- Ubuntu 20.04 / Debian 11+ on host - Ubuntu 20.04 / Debian 11+ on host
2. **Git** installed 2. **Git** installed
```bash ```bash
apt-get install -y git apt-get install -y git
``` ```
@@ -201,33 +198,32 @@ git rebase upstream/main
git push origin feat/add-myapp git push origin feat/add-myapp
``` ```
#### Option B: Testing on a Proxmox Host (still via curl) #### Option B: Local Testing on Proxmox Host
```bash ```bash
# 1. SSH into Proxmox host # 1. SSH into Proxmox host
ssh root@192.168.1.100 ssh root@192.168.1.100
# 2. Test via curl from your fork (CT script only) # 2. Download your script
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)" curl -O https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/feat/myapp/ct/myapp.sh
# ⏱️ Wait 10-30 seconds after pushing - GitHub takes time to update
# 3. Make it executable
chmod +x myapp.sh
# 4. Update URLs to your fork
# Edit: curl -s https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/feat/myapp/...
# 5. Run and test
bash myapp.sh
# 6. If container created successfully, script is working!
``` ```
> **Note:** Do not edit URLs manually or run install scripts directly. The CT script calls the install script inside the container. #### Option C: Docker Testing (Without Proxmox)
#### Option C: Using Curl (Recommended for Real Testing)
```bash ```bash
# Always test via curl from your fork (GitHub takes 10-30 seconds after push) # You can test script syntax/functionality locally
git push origin feature/myapp # Note: Won't fully test (no Proxmox, no actual container)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"
# This tests the actual GitHub URLs, not local files
```
#### Option D: Static Checks (Without Proxmox)
```bash
# You can validate syntax and linting locally (limited)
# Note: This does NOT replace real Proxmox testing
# Run ShellCheck # Run ShellCheck
shellcheck ct/myapp.sh shellcheck ct/myapp.sh
@@ -245,18 +241,18 @@ bash -n install/myapp-install.sh
### Step 1: Choose Your Template ### Step 1: Choose Your Template
**For Simple Web Apps** (Node.js, Python, PHP): **For Simple Web Apps** (Node.js, Python, PHP):
```bash ```bash
cp ct/example.sh ct/myapp.sh cp ct/example.sh ct/myapp.sh
cp install/example-install.sh install/myapp-install.sh cp install/example-install.sh install/myapp-install.sh
``` ```
**For Database Apps** (PostgreSQL, MariaDB, MongoDB): **For Database Apps** (PostgreSQL, MongoDB):
```bash
Use the standard templates and the database helpers from `tools.func` (no Docker). cp ct/docker.sh ct/myapp.sh # Use Docker container
# OR manual setup for more control
```
**For Alpine Linux Apps** (lightweight): **For Alpine Linux Apps** (lightweight):
```bash ```bash
# Use ct/alpine.sh as reference # Use ct/alpine.sh as reference
# Edit install script to use Alpine packages (apk not apt) # Edit install script to use Alpine packages (apk not apt)
@@ -268,7 +264,7 @@ Use the standard templates and the database helpers from `tools.func` (no Docker
```bash ```bash
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/misc/build.func) source <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/feat/myapp/misc/build.func)
# Update these: # Update these:
APP="MyAwesomeApp" # Display name APP="MyAwesomeApp" # Display name
@@ -295,19 +291,17 @@ function update_script() {
exit exit
fi fi
if check_for_gh_release "myapp" "owner/repo"; then # Get latest version
msg_info "Stopping Service" RELEASE=$(curl -fsSL https://api.github.com/repos/user/repo/releases/latest | \
systemctl stop myapp grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "myapp" "owner/repo" "tarball" "latest" "/opt/myapp" if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to v${RELEASE}"
# ... update logic (migrations, rebuilds, etc.) ... # ... update logic ...
echo "${RELEASE}" > /opt/${APP}_version.txt
msg_info "Starting Service" msg_ok "Updated ${APP}"
systemctl start myapp else
msg_ok "Started Service" msg_ok "No update required. ${APP} is already at v${RELEASE}."
msg_ok "Updated successfully!"
fi fi
exit exit
} }
@@ -323,7 +317,6 @@ echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:PORT${CL}"
``` ```
**Checklist**: **Checklist**:
- [ ] APP variable matches filename - [ ] APP variable matches filename
- [ ] var_tags semicolon-separated (no spaces) - [ ] var_tags semicolon-separated (no spaces)
- [ ] Realistic CPU/RAM/disk values - [ ] Realistic CPU/RAM/disk values
@@ -352,12 +345,24 @@ update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt-get install -y \
curl \
wget \
git \
build-essential build-essential
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setting up Node.js"
NODE_VERSION="22" setup_nodejs NODE_VERSION="22" setup_nodejs
msg_ok "Node.js installed"
fetch_and_deploy_gh_release "myapp" "owner/repo" "tarball" "latest" "/opt/myapp" msg_info "Downloading Application"
cd /opt
wget -q "https://github.com/user/repo/releases/download/v1.0.0/myapp.tar.gz"
tar -xzf myapp.tar.gz
rm -f myapp.tar.gz
msg_ok "Application installed"
echo "1.0.0" > /opt/${APP}_version.txt
motd_ssh motd_ssh
customize customize
@@ -365,7 +370,6 @@ cleanup_lxc
``` ```
**Checklist**: **Checklist**:
- [ ] Functions loaded from `$FUNCTIONS_FILE_PATH` - [ ] Functions loaded from `$FUNCTIONS_FILE_PATH`
- [ ] All installation phases present (deps, tools, app, config, cleanup) - [ ] All installation phases present (deps, tools, app, config, cleanup)
- [ ] Using `$STD` for output suppression - [ ] Using `$STD` for output suppression
@@ -433,44 +437,26 @@ $STD apt-get install -y newdependency
# 4. Test thoroughly before committing # 4. Test thoroughly before committing
``` ```
### Step 3: The Standard Update Pattern ### Step 3: Update Update Function (if applicable)
The `update_script()` function in `ct/appname.sh` should follow a robust pattern:
1. **Check for updates**: Use `check_for_gh_release` to skip logic if no new version exists.
2. **Stop services**: Stop all relevant services (`systemctl stop appname`).
3. **Backup existing installation**: Move the old folder (e.g., `mv /opt/app /opt/app_bak`).
4. **Deploy new version**: Use `CLEAN_INSTALL=1 fetch_and_deploy_gh_release`.
5. **Restore configuration**: Copy `.env` or config files back from the backup.
6. **Rebuild/Migrate**: Run `npm install`, `composer install`, or DB migrations.
7. **Start services**: Restart services and cleanup the backup.
**Example from `ct/bookstack.sh`**:
```bash ```bash
function update_script() { # Edit: ct/existingapp.sh → update_script()
if check_for_gh_release "bookstack" "BookStackApp/BookStack"; then
msg_info "Stopping Services" # 1. Update GitHub API URL if repo changed
systemctl stop apache2 RELEASE=$(curl -fsSL https://api.github.com/repos/user/repo/releases/latest | ...)
msg_info "Backing up data" # 2. Update backup/restore logic (if structure changed)
mv /opt/bookstack /opt/bookstack-backup # 3. Update cleanup paths
fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack" "tarball" # 4. Test update on existing installation
```
msg_info "Restoring backup"
cp /opt/bookstack-backup/.env /opt/bookstack/.env ### Step 4: Document Your Changes
# ... restore uploads ...
```bash
msg_info "Configuring" # Add comment at top of script
cd /opt/bookstack # Co-Author: YourUsername
$STD composer install --no-dev # Updated: YYYY-MM-DD - Description of changes
$STD php artisan migrate --force
systemctl start apache2
rm -rf /opt/bookstack-backup
msg_ok "Updated successfully!"
fi
}
``` ```
--- ---
@@ -670,19 +656,27 @@ shellcheck install/myapp-install.sh
# 1. SSH into Proxmox host # 1. SSH into Proxmox host
ssh root@YOUR_PROXMOX_IP ssh root@YOUR_PROXMOX_IP
# 2. Test via curl from your fork (CT script only) # 2. Download your script
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)" curl -O https://raw.githubusercontent.com/YOUR_USER/ProxmoxVE/feat/myapp/ct/myapp.sh
# ⏱️ Wait 10-30 seconds after pushing - GitHub takes time to update
# 3. Test interaction: # 3. Make executable
chmod +x myapp.sh
# 4. UPDATE URLS IN SCRIPT to point to your fork
sed -i 's|community-scripts|YOUR_USER|g' myapp.sh
# 5. Run script
bash myapp.sh
# 6. Test interaction:
# - Select installation mode # - Select installation mode
# - Confirm settings # - Confirm settings
# - Monitor installation # - Monitor installation
# 4. Verify container created # 7. Verify container created
pct list | grep myapp pct list | grep myapp
# 5. Log into container and verify app # 8. Log into container and verify app
pct exec 100 bash pct exec 100 bash
``` ```
@@ -703,9 +697,9 @@ pct exec 100 bash
# Verify script handles gracefully # Verify script handles gracefully
# Test 4: Update function # Test 4: Update function
# Create initial container (via curl from fork) # Create initial container
# Wait for new release # Wait for new release
# Test update: bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)" # Run update: bash ct/myapp.sh
# Verify it detects and applies update # Verify it detects and applies update
``` ```
@@ -780,19 +774,16 @@ Use this template:
```markdown ```markdown
## Description ## Description
Brief description of what this PR adds/fixes Brief description of what this PR adds/fixes
## Type of Change ## Type of Change
- [ ] New application (ct/AppName.sh + install/appname-install.sh) - [ ] New application (ct/AppName.sh + install/appname-install.sh)
- [ ] Update existing application - [ ] Update existing application
- [ ] Bug fix - [ ] Bug fix
- [ ] Documentation update - [ ] Documentation update
- [ ] Other: **\_\_\_** - [ ] Other: _______
## Testing ## Testing
- [ ] Tested on Proxmox VE 8.x - [ ] Tested on Proxmox VE 8.x
- [ ] Container creation successful - [ ] Container creation successful
- [ ] Application installation successful - [ ] Application installation successful
@@ -801,7 +792,6 @@ Brief description of what this PR adds/fixes
- [ ] No temporary files left after installation - [ ] No temporary files left after installation
## Application Details (for new apps only) ## Application Details (for new apps only)
- **App Name**: MyApp - **App Name**: MyApp
- **Source**: https://github.com/app/repo - **Source**: https://github.com/app/repo
- **Default OS**: Debian 12 - **Default OS**: Debian 12
@@ -810,11 +800,9 @@ Brief description of what this PR adds/fixes
- **Access URL**: http://IP:PORT/path - **Access URL**: http://IP:PORT/path
## Checklist ## Checklist
- [ ] My code follows the style guidelines - [ ] My code follows the style guidelines
- [ ] I have performed a self-review - [ ] I have performed a self-review
- [ ] I have tested the script via curl from my fork (after git push) - [ ] I have tested the script locally
- [ ] GitHub had time to update (waited 10-30 seconds)
- [ ] ShellCheck shows no critical warnings - [ ] ShellCheck shows no critical warnings
- [ ] Documentation is accurate and complete - [ ] Documentation is accurate and complete
- [ ] I have added/updated relevant documentation - [ ] I have added/updated relevant documentation
@@ -823,7 +811,6 @@ Brief description of what this PR adds/fixes
### Step 5: Respond to Review Comments ### Step 5: Respond to Review Comments
**Maintainers may request changes**: **Maintainers may request changes**:
- Fix syntax/style issues - Fix syntax/style issues
- Add better error handling - Add better error handling
- Optimize resource usage - Optimize resource usage
@@ -935,7 +922,6 @@ pct exec CTID netstat -tlnp | grep LISTEN
### Q: Can I test without a Proxmox system? ### Q: Can I test without a Proxmox system?
**A**: Partially. You can verify syntax and ShellCheck compliance locally, but real container testing requires Proxmox. Consider using: **A**: Partially. You can verify syntax and ShellCheck compliance locally, but real container testing requires Proxmox. Consider using:
- Proxmox in a VM (VirtualBox/KVM) - Proxmox in a VM (VirtualBox/KVM)
- Test instances on Hetzner/DigitalOcean - Test instances on Hetzner/DigitalOcean
- Ask maintainers to test for you - Ask maintainers to test for you
@@ -943,7 +929,6 @@ pct exec CTID netstat -tlnp | grep LISTEN
### Q: My update function is very complex - is that OK? ### Q: My update function is very complex - is that OK?
**A**: Yes! Update functions can be complex if needed. Just ensure: **A**: Yes! Update functions can be complex if needed. Just ensure:
- Backup user data before updating - Backup user data before updating
- Restore user data after update - Restore user data after update
- Test thoroughly before submitting - Test thoroughly before submitting
@@ -952,7 +937,6 @@ pct exec CTID netstat -tlnp | grep LISTEN
### Q: Can I add new dependencies to build.func? ### Q: Can I add new dependencies to build.func?
**A**: Generally no. build.func is the orchestrator and should remain stable. New functions should go in: **A**: Generally no. build.func is the orchestrator and should remain stable. New functions should go in:
- `tools.func` - Tool installation - `tools.func` - Tool installation
- `core.func` - Utility functions - `core.func` - Utility functions
- `install.func` - Container setup - `install.func` - Container setup
@@ -964,13 +948,11 @@ Ask in an issue first if you're unsure.
**A**: You have options: **A**: You have options:
**Option 1**: Use Advanced mode (19-step wizard) **Option 1**: Use Advanced mode (19-step wizard)
```bash ```bash
# Extend advanced_settings() if app needs special vars # Extend advanced_settings() if app needs special vars
``` ```
**Option 2**: Create custom setup menu **Option 2**: Create custom setup menu
```bash ```bash
function custom_config() { function custom_config() {
OPTION=$(whiptail --inputbox "Enter database name:" 8 60) OPTION=$(whiptail --inputbox "Enter database name:" 8 60)
@@ -979,7 +961,6 @@ function custom_config() {
``` ```
**Option 3**: Leave as defaults + documentation **Option 3**: Leave as defaults + documentation
```bash ```bash
# In success message: # In success message:
echo "Edit /opt/myapp/config.json to customize settings" echo "Edit /opt/myapp/config.json to customize settings"
@@ -988,10 +969,9 @@ echo "Edit /opt/myapp/config.json to customize settings"
### Q: Can I contribute Windows/macOS/ARM support? ### Q: Can I contribute Windows/macOS/ARM support?
**A**: **A**:
- **Windows**: Not planned (ProxmoxVE is Linux/Proxmox focused) - **Windows**: Not planned (ProxmoxVE is Linux/Proxmox focused)
- **macOS**: Can contribute Docker-based alternatives - **macOS**: Can contribute Docker-based alternatives
- **ARM**: Yes! Many apps work on ARM. Add to vm/pimox-\*.sh scripts - **ARM**: Yes! Many apps work on ARM. Add to vm/pimox-*.sh scripts
--- ---
@@ -1015,7 +995,6 @@ echo "Edit /opt/myapp/config.json to customize settings"
### Report Bugs ### Report Bugs
When reporting bugs, include: When reporting bugs, include:
- Which application - Which application
- What happened (error message) - What happened (error message)
- What you expected - What you expected
@@ -1023,7 +1002,6 @@ When reporting bugs, include:
- Container OS and version - Container OS and version
Example: Example:
``` ```
Title: pihole-install.sh fails on Alpine 3.20 Title: pihole-install.sh fails on Alpine 3.20
@@ -1047,7 +1025,6 @@ Error Output:
## Contribution Statistics ## Contribution Statistics
**ProxmoxVE by the Numbers**: **ProxmoxVE by the Numbers**:
- 🎯 40+ applications supported - 🎯 40+ applications supported
- 👥 100+ contributors - 👥 100+ contributors
- 📊 10,000+ GitHub stars - 📊 10,000+ GitHub stars
@@ -1061,7 +1038,6 @@ Error Output:
## Code of Conduct ## Code of Conduct
By contributing, you agree to: By contributing, you agree to:
- ✅ Be respectful and inclusive - ✅ Be respectful and inclusive
- ✅ Follow the style guidelines - ✅ Follow the style guidelines
- ✅ Test your changes thoroughly - ✅ Test your changes thoroughly

View File

@@ -30,79 +30,61 @@
> ⚠️ **Both files are ALWAYS required!** The CT script calls the install script automatically during container creation. > ⚠️ **Both files are ALWAYS required!** The CT script calls the install script automatically during container creation.
Install scripts are **not** run directly by users; they are invoked by the CT script inside the container.
### Node.js + PostgreSQL ### Node.js + PostgreSQL
**Koel** - Music streaming with PHP + Node.js + PostgreSQL **Koel** - Music streaming with PHP + Node.js + PostgreSQL
| File | Link | | File | Link |
| ----------------- | -------------------------------------------------------- | | ----------------- | -------------------------------------------------------- |
| CT (update logic) | [ct/koel.sh](../../ct/koel.sh) | | CT (update logic) | [ct/koel.sh](../../ct/koel.sh) |
| Install | [install/koel-install.sh](../../install/koel-install.sh) | | Install | [install/koel-install.sh](../../install/koel-install.sh) |
**Actual Budget** - Finance app with npm global install **Actual Budget** - Finance app with npm global install
| File | Link | | File | Link |
| ----------------- | ------------------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------------------ |
| CT (update logic) | [ct/actualbudget.sh](../../ct/actualbudget.sh) | | CT (update logic) | [ct/actualbudget.sh](../../ct/actualbudget.sh) |
| Install | [install/actualbudget-install.sh](../../install/actualbudget-install.sh) | | Install | [install/actualbudget-install.sh](../../install/actualbudget-install.sh) |
### Python + uv ### Python + uv
**MeTube** - YouTube downloader with Python uv + Node.js + Deno **MeTube** - YouTube downloader with Python uv + Node.js + Deno
| File | Link | | File | Link |
| ----------------- | ------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------ |
| CT (update logic) | [ct/metube.sh](../../ct/metube.sh) | | CT (update logic) | [ct/metube.sh](../../ct/metube.sh) |
| Install | [install/metube-install.sh](../../install/metube-install.sh) | | Install | [install/metube-install.sh](../../install/metube-install.sh) |
**Endurain** - Fitness tracker with Python uv + PostgreSQL/PostGIS **Endurain** - Fitness tracker with Python uv + PostgreSQL/PostGIS
| File | Link | | File | Link |
| ----------------- | ---------------------------------------------------------------- | | ----------------- | ---------------------------------------------------------------- |
| CT (update logic) | [ct/endurain.sh](../../ct/endurain.sh) | | CT (update logic) | [ct/endurain.sh](../../ct/endurain.sh) |
| Install | [install/endurain-install.sh](../../install/endurain-install.sh) | | Install | [install/endurain-install.sh](../../install/endurain-install.sh) |
### Java + Gradle
**BookLore** - Book management with Java 21 + Gradle + MariaDB + Nginx
| File | Link |
| ----------------- | -------------------------------------------------------------- |
| CT (update logic) | [ct/booklore.sh](../../ct/booklore.sh) |
| Install | [install/booklore-install.sh](../../install/booklore-install.sh) |
### Pnpm + Meilisearch
**KaraKeep** - Bookmark manager with Pnpm + Meilisearch + Puppeteer
| File | Link |
| ----------------- | -------------------------------------------------------------- |
| CT (update logic) | [ct/karakeep.sh](../../ct/karakeep.sh) |
| Install | [install/karakeep-install.sh](../../install/karakeep-install.sh) |
### PHP + MariaDB/MySQL ### PHP + MariaDB/MySQL
**Wallabag** - Read-it-later with PHP + MariaDB + Redis + Nginx **Wallabag** - Read-it-later with PHP + MariaDB + Redis + Nginx
| File | Link | | File | Link |
| ----------------- | ---------------------------------------------------------------- | | ----------------- | ---------------------------------------------------------------- |
| CT (update logic) | [ct/wallabag.sh](../../ct/wallabag.sh) | | CT (update logic) | [ct/wallabag.sh](../../ct/wallabag.sh) |
| Install | [install/wallabag-install.sh](../../install/wallabag-install.sh) | | Install | [install/wallabag-install.sh](../../install/wallabag-install.sh) |
**InvoiceNinja** - Invoicing with PHP + MariaDB + Supervisor **InvoiceNinja** - Invoicing with PHP + MariaDB + Supervisor
| File | Link | | File | Link |
| ----------------- | ------------------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------------------ |
| CT (update logic) | [ct/invoiceninja.sh](../../ct/invoiceninja.sh) | | CT (update logic) | [ct/invoiceninja.sh](../../ct/invoiceninja.sh) |
| Install | [install/invoiceninja-install.sh](../../install/invoiceninja-install.sh) | | Install | [install/invoiceninja-install.sh](../../install/invoiceninja-install.sh) |
**BookStack** - Wiki/Docs with PHP + MariaDB + Apache **BookStack** - Wiki/Docs with PHP + MariaDB + Apache
| File | Link | | File | Link |
| ----------------- | ------------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------------ |
| CT (update logic) | [ct/bookstack.sh](../../ct/bookstack.sh) | | CT (update logic) | [ct/bookstack.sh](../../ct/bookstack.sh) |
| Install | [install/bookstack-install.sh](../../install/bookstack-install.sh) | | Install | [install/bookstack-install.sh](../../install/bookstack-install.sh) |
### PHP + SQLite (Simple) ### PHP + SQLite (Simple)
**Speedtest Tracker** - Speedtest with PHP + SQLite + Nginx **Speedtest Tracker** - Speedtest with PHP + SQLite + Nginx
| File | Link | | File | Link |
| ----------------- | ---------------------------------------------------------------------------------- | | ----------------- | ---------------------------------------------------------------------------------- |
| CT (update logic) | [ct/speedtest-tracker.sh](../../ct/speedtest-tracker.sh) | | CT (update logic) | [ct/speedtest-tracker.sh](../../ct/speedtest-tracker.sh) |
| Install | [install/speedtest-tracker-install.sh](../../install/speedtest-tracker-install.sh) | | Install | [install/speedtest-tracker-install.sh](../../install/speedtest-tracker-install.sh) |
--- ---
@@ -113,7 +95,7 @@ Install scripts are **not** run directly by users; they are invoked by the CT sc
Install Node.js from NodeSource repository. Install Node.js from NodeSource repository.
```bash ```bash
# Default (Node.js 24) # Default (Node.js 22)
setup_nodejs setup_nodejs
# Specific version # Specific version
@@ -153,12 +135,8 @@ $STD cargo build --release
Install Python uv package manager (fast pip/venv replacement). Install Python uv package manager (fast pip/venv replacement).
```bash ```bash
# Default
setup_uv setup_uv
# Install a specific Python version
PYTHON_VERSION="3.12" setup_uv
# Use in script # Use in script
setup_uv setup_uv
cd /opt/myapp cd /opt/myapp
@@ -182,7 +160,7 @@ Install PHP with configurable modules and FPM/Apache support.
setup_php setup_php
# Full configuration # Full configuration
PHP_VERSION="8.4" \ PHP_VERSION="8.3" \
PHP_MODULE="mysqli,gd,curl,mbstring,xml,zip,ldap" \ PHP_MODULE="mysqli,gd,curl,mbstring,xml,zip,ldap" \
PHP_FPM="YES" \ PHP_FPM="YES" \
PHP_APACHE="YES" \ PHP_APACHE="YES" \
@@ -190,12 +168,12 @@ setup_php
``` ```
**Environment Variables:** **Environment Variables:**
| Variable | Default | Description | | Variable | Default | Description |
| ------------- | ------- | ------------------------------- | | ------------- | ------- | ------------------------------- |
| `PHP_VERSION` | `8.4` | PHP version to install | | `PHP_VERSION` | `8.3` | PHP version to install |
| `PHP_MODULE` | `""` | Comma-separated list of modules | | `PHP_MODULE` | `""` | Comma-separated list of modules |
| `PHP_FPM` | `NO` | Install PHP-FPM | | `PHP_FPM` | `NO` | Install PHP-FPM |
| `PHP_APACHE` | `NO` | Install Apache module | | `PHP_APACHE` | `NO` | Install Apache module |
### `setup_composer` ### `setup_composer`
@@ -261,12 +239,12 @@ setup_mysql
Install PostgreSQL server. Install PostgreSQL server.
```bash ```bash
# Default (PostgreSQL 16) # Default (PostgreSQL 17)
setup_postgresql setup_postgresql
# Specific version # Specific version
PG_VERSION="16" setup_postgresql PG_VERSION="16" setup_postgresql
PG_VERSION="16" setup_postgresql PG_VERSION="17" setup_postgresql
``` ```
### `setup_postgresql_db` ### `setup_postgresql_db`
@@ -301,43 +279,6 @@ setup_clickhouse
--- ---
## Advanced Repository Management
### `setup_deb822_repo`
The modern standard (Debian 12+) for adding external repositories. Automatically handles GPG keys and sources.
```bash
setup_deb822_repo \
"nodejs" \
"https://deb.nodesource.com/gpgkey/nodesource.gpg.key" \
"https://deb.nodesource.com/node_22.x" \
"bookworm" \
"main"
```
### `prepare_repository_setup`
A high-level helper that performs three critical tasks before adding a new repo:
1. Cleans up old repo files matching the names provided.
2. Removes old GPG keyrings from all standard locations.
3. Ensures APT is in a working state (fixes locks, runs update).
```bash
# Clean up old mysql/mariadb artifacts before setup
prepare_repository_setup "mariadb" "mysql"
```
### `cleanup_tool_keyrings`
Force-removes GPG keys for specific tools from `/usr/share/keyrings/`, `/etc/apt/keyrings/`, and `/etc/apt/trusted.gpg.d/`.
```bash
cleanup_tool_keyrings "docker" "kubernetes"
```
---
## GitHub Release Helpers ## GitHub Release Helpers
> **Note**: `fetch_and_deploy_gh_release` is the **preferred method** for downloading GitHub releases. It handles version tracking automatically. Only use `get_latest_github_release` if you need the version number separately. > **Note**: `fetch_and_deploy_gh_release` is the **preferred method** for downloading GitHub releases. It handles version tracking automatically. Only use `get_latest_github_release` if you need the version number separately.
@@ -361,17 +302,17 @@ CLEAN_INSTALL=1 fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "la
``` ```
**Parameters:** **Parameters:**
| Parameter | Default | Description | | Parameter | Default | Description |
| --------------- | ------------- | ----------------------------------------------------------------- | | --------------- | ------------- | ----------------------------------------------------------------- |
| `name` | required | App name (for version tracking) | | `name` | required | App name (for version tracking) |
| `repo` | required | GitHub repo (`owner/repo`) | | `repo` | required | GitHub repo (`owner/repo`) |
| `type` | `tarball` | Release type: `tarball`, `zipball`, `prebuild`, `binary` | | `type` | `tarball` | Release type: `tarball`, `zipball`, `prebuild`, `binary` |
| `version` | `latest` | Version tag or `latest` | | `version` | `latest` | Version tag or `latest` |
| `dest` | `/opt/[name]` | Destination directory | | `dest` | `/opt/[name]` | Destination directory |
| `asset_pattern` | `""` | For `prebuild`: glob pattern to match asset (e.g. `app-*.tar.gz`) | | `asset_pattern` | `""` | For `prebuild`: glob pattern to match asset (e.g. `app-*.tar.gz`) |
**Environment Variables:** **Environment Variables:**
| Variable | Description | | Variable | Description |
| ----------------- | ------------------------------------------------------------ | | ----------------- | ------------------------------------------------------------ |
| `CLEAN_INSTALL=1` | Remove destination directory before extracting (for updates) | | `CLEAN_INSTALL=1` | Remove destination directory before extracting (for updates) |
@@ -398,21 +339,26 @@ RELEASE=$(get_latest_github_release "owner/repo")
echo "Latest version: $RELEASE" echo "Latest version: $RELEASE"
``` ```
# Examples
fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack"
fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "latest" "/opt/myapp"
````
**Parameters:**
| Parameter | Default | Description |
| --------- | ------------- | -------------------------------------------- |
| `name` | required | App name (for version tracking) |
| `repo` | required | GitHub repo (`owner/repo`) |
| `type` | `tarball` | Release type: `tarball`, `zipball`, `binary` |
| `version` | `latest` | Version tag or `latest` |
| `dest` | `/opt/[name]` | Destination directory |
--- ---
## Tools & Utilities ## Tools & Utilities
### `setup_meilisearch`
Install Meilisearch, a lightning-fast search engine.
```bash
setup_meilisearch
# Use in script
$STD php artisan scout:sync-index-settings
```
### `setup_yq` ### `setup_yq`
Install yq YAML processor. Install yq YAML processor.
@@ -488,15 +434,6 @@ create_self_signed_cert
## Utility Functions ## Utility Functions
### `verify_tool_version`
Validate that the installed major version matches the expected version. Useful during upgrades or troubleshooting.
```bash
# Verify Node.js is version 22
verify_tool_version "nodejs" "22" "$(node -v | grep -oP '^v\K[0-9]+')"
```
### `get_lxc_ip` ### `get_lxc_ip`
Set the `$LOCAL_IP` variable with the container's IP address. Set the `$LOCAL_IP` variable with the container's IP address.
@@ -589,7 +526,7 @@ msg_ok "Installed Dependencies"
# Setup runtimes and databases FIRST # Setup runtimes and databases FIRST
NODE_VERSION="22" setup_nodejs NODE_VERSION="22" setup_nodejs
PG_VERSION="16" setup_postgresql PG_VERSION="17" setup_postgresql
PG_DB_NAME="myapp" PG_DB_USER="myapp" setup_postgresql_db PG_DB_NAME="myapp" PG_DB_USER="myapp" setup_postgresql_db
get_lxc_ip get_lxc_ip

View File

@@ -17,9 +17,7 @@ Complete guide to contributing to the ProxmoxVE project - from your first fork t
## 🚀 Quick Start ## 🚀 Quick Start
### 60 Seconds to Contributing (Development) ### 60 Seconds to Contributing
When developing and testing **in your fork**:
```bash ```bash
# 1. Fork on GitHub # 1. Fork on GitHub
@@ -29,8 +27,8 @@ When developing and testing **in your fork**:
git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git
cd ProxmoxVE cd ProxmoxVE
# 3. Auto-configure your fork (IMPORTANT - updates all links!) # 3. Auto-configure your fork
bash docs/contribution/setup-fork.sh --full bash docs/contribution/setup-fork.sh
# 4. Create a feature branch # 4. Create a feature branch
git checkout -b feature/my-awesome-app git checkout -b feature/my-awesome-app
@@ -41,73 +39,19 @@ cat docs/ct/DETAILED_GUIDE.md # For container scripts
cat docs/install/DETAILED_GUIDE.md # For install scripts cat docs/install/DETAILED_GUIDE.md # For install scripts
# 6. Create your contribution # 6. Create your contribution
cp docs/contribution/templates_ct/AppName.sh ct/myapp.sh cp ct/example.sh ct/myapp.sh
cp docs/contribution/templates_install/AppName-install.sh install/myapp-install.sh cp install/example-install.sh install/myapp-install.sh
# ... edit files ... # ... edit files ...
# 7. Push to your fork and test via GitHub # 7. Test and commit
git push origin feature/my-awesome-app bash ct/myapp.sh
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)" git add ct/myapp.sh install/myapp-install.sh
# ⏱️ GitHub may take 10-30 seconds to update files - be patient! git commit -m "feat: add MyApp"
# 8. Create your JSON metadata file
cp docs/contribution/templates_json/AppName.json frontend/public/json/myapp.json
# Edit metadata: name, slug, categories, description, resources, etc.
# 9. No direct install-script test
# Install scripts are executed by the CT script inside the container
# 10. Commit ONLY your new files (see Cherry-Pick section below!)
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git commit -m "feat: add MyApp container and install scripts"
git push origin feature/my-awesome-app git push origin feature/my-awesome-app
# 11. Create Pull Request on GitHub # 8. Create Pull Request on GitHub
``` ```
⚠️ **IMPORTANT: After setup-fork.sh, many files are modified!**
See the **Cherry-Pick: Submitting Only Your Changes** section below to learn how to push ONLY your 3-4 files instead of 600+ modified files!
### How Users Run Scripts (After Merged)
Once your script is merged to the main repository, users download and run it from GitHub like this:
```bash
# ✅ Users run from GitHub (normal usage after PR merged)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/myapp.sh)"
# Install scripts are called by the CT script and are not run directly by users
```
### Development vs. Production Execution
**During Development (you, in your fork):**
```bash
# You MUST test via curl from your GitHub fork (not local files!)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"
# The script's curl commands are updated by setup-fork.sh to point to YOUR fork
# This ensures you're testing your actual changes
# ⏱️ Wait 10-30 seconds after pushing - GitHub updates slowly
```
**After Merge (users, from GitHub):**
```bash
# Users download the script from upstream via curl
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/myapp.sh)"
# The script's curl commands now point back to upstream (community-scripts)
# This is the stable, tested version
```
**Summary:**
- **Development**: Push to fork, test via curl → setup-fork.sh changes curl URLs to your fork
- **Production**: curl | bash from upstream → curl URLs point to community-scripts repo
--- ---
## 🍴 Setting Up Your Fork ## 🍴 Setting Up Your Fork
@@ -117,35 +61,14 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/Proxmo
When you clone your fork, run the setup script to automatically configure everything: When you clone your fork, run the setup script to automatically configure everything:
```bash ```bash
bash docs/contribution/setup-fork.sh --full bash docs/contribution/setup-fork.sh
``` ```
**What it does:** This will:
- Auto-detects your GitHub username from git config - Auto-detect your GitHub username
- Auto-detects your fork repository name - Update all documentation links to point to your fork
- Updates **ALL** hardcoded links to point to your fork instead of the main repo (`--full`) - Create `.git-setup-info` with recommended git workflows
- Creates `.git-setup-info` with your configuration
- Allows you to develop and test independently in your fork
**Why this matters:**
Without running this script, all links in your fork will still point to the upstream repository (community-scripts). This is a problem when testing because:
- Installation links will pull from upstream, not your fork
- Updates will target the wrong repository
- Your contributions won't be properly tested
**After running setup-fork.sh:**
Your fork is fully configured and ready to develop. You can:
- Push changes to your fork
- Test via curl: `bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"`
- All links will reference your fork for development
- ⏱️ Wait 10-30 seconds after pushing - GitHub takes time to update
- Commit and push with confidence
- Create a PR to merge into upstream
**See**: [FORK_SETUP.md](FORK_SETUP.md) for detailed instructions **See**: [FORK_SETUP.md](FORK_SETUP.md) for detailed instructions
@@ -158,12 +81,11 @@ If the script doesn't work, manually configure:
git config user.name "Your Name" git config user.name "Your Name"
git config user.email "your.email@example.com" git config user.email "your.email@example.com"
# Add upstream remote for syncing with main repo # Add upstream remote for syncing
git remote add upstream https://github.com/community-scripts/ProxmoxVE.git git remote add upstream https://github.com/community-scripts/ProxmoxVE.git
# Verify remotes # Verify remotes
git remote -v git remote -v
# Should show: origin (your fork) and upstream (main repo)
``` ```
--- ---
@@ -180,7 +102,7 @@ All scripts and configurations must follow our coding standards to ensure consis
- **[HELPER_FUNCTIONS.md](HELPER_FUNCTIONS.md)** - Reference for all tools.func helper functions - **[HELPER_FUNCTIONS.md](HELPER_FUNCTIONS.md)** - Reference for all tools.func helper functions
- **Container Scripts** - `/ct/` templates and guidelines - **Container Scripts** - `/ct/` templates and guidelines
- **Install Scripts** - `/install/` templates and guidelines - **Install Scripts** - `/install/` templates and guidelines
- **JSON Configurations** - `frontend/public/json/` structure and format - **JSON Configurations** - `/json/` structure and format
### Quick Checklist ### Quick Checklist
@@ -190,7 +112,7 @@ All scripts and configurations must follow our coding standards to ensure consis
- ✅ Include proper shebang: `#!/usr/bin/env bash` - ✅ Include proper shebang: `#!/usr/bin/env bash`
- ✅ Add copyright header with author - ✅ Add copyright header with author
- ✅ Handle errors properly with `msg_error`, `msg_ok`, etc. - ✅ Handle errors properly with `msg_error`, `msg_ok`, etc.
- ✅ Test before submitting PR (via curl from your fork, not local bash) - ✅ Test before submitting PR
- ✅ Update documentation if needed - ✅ Update documentation if needed
--- ---
@@ -211,172 +133,7 @@ Key points:
--- ---
## 🍒 Cherry-Pick: Submitting Only Your Changes ## 📚 Guides & Resources
**Problem**: `setup-fork.sh` modifies 600+ files to update links. You don't want to submit all of those changes - only your new 3-4 files!
**Solution**: Use git cherry-pick to select only YOUR files.
### Step-by-Step Cherry-Pick Guide
#### 1. Check what changed
```bash
# See all modified files
git status
# Verify your files are there
git status | grep -E "ct/myapp|install/myapp|json/myapp"
```
#### 2. Create a clean feature branch for submission
```bash
# Go back to upstream main (clean slate)
git fetch upstream
git checkout -b submit/myapp upstream/main
# Don't use your modified main branch!
```
#### 3. Cherry-pick ONLY your files
Cherry-picking extracts specific changes from commits:
```bash
# Option A: Cherry-pick commits that added your files
# (if you committed your files separately)
git cherry-pick <commit-hash-of-your-files>
# Option B: Manually copy and commit only your files
# From your work branch, get the file contents
git show feature/my-awesome-app:ct/myapp.sh > /tmp/myapp.sh
git show feature/my-awesome-app:install/myapp-install.sh > /tmp/myapp-install.sh
git show feature/my-awesome-app:frontend/public/json/myapp.json > /tmp/myapp.json
# Add them to the clean branch
cp /tmp/myapp.sh ct/myapp.sh
cp /tmp/myapp-install.sh install/myapp-install.sh
cp /tmp/myapp.json frontend/public/json/myapp.json
# Commit
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git commit -m "feat: add MyApp"
```
#### 4. Verify only your files are in the PR
```bash
# Check git diff against upstream
git diff upstream/main --name-only
# Should show ONLY:
# ct/myapp.sh
# install/myapp-install.sh
# frontend/public/json/myapp.json
```
#### 5. Push and create PR
```bash
# Push your clean submission branch
git push origin submit/myapp
# Create PR on GitHub from: submit/myapp → main
```
### Why This Matters
- ✅ Clean PR with only your changes
- ✅ Easier for maintainers to review
- ✅ Faster merge without conflicts
- ❌ Without cherry-pick: PR has 600+ file changes (won't merge!)
### If You Made a Mistake
```bash
# Delete the messy branch
git branch -D submit/myapp
# Go back to clean branch
git checkout -b submit/myapp upstream/main
# Try cherry-picking again
```
---
If you're using **Visual Studio Code** with an AI assistant, you can leverage our detailed guidelines to generate high-quality contributions automatically.
### How to Use AI Assistance
1. **Open the AI Guidelines**
```
docs/contribution/AI.md
```
This file contains all requirements, patterns, and examples for writing proper scripts.
2. **Prepare Your Information**
Before asking the AI to generate code, gather:
- **Repository URL**: e.g., `https://github.com/owner/myapp`
- **Dockerfile/Script**: Paste the app's installation instructions (if available)
- **Dependencies**: What packages does it need? (Node, Python, Java, PostgreSQL, etc.)
- **Ports**: What port does it listen on? (e.g., 3000, 8080, 5000)
- **Configuration**: Any environment variables or config files?
3. **Tell the AI Assistant**
Share with the AI:
- The repository URL
- The Dockerfile or install instructions
- Link to [docs/contribution/AI.md](AI.md) with instructions to follow
**Example prompt:**
```
I want to contribute a container script for MyApp to ProxmoxVE.
Repository: https://github.com/owner/myapp
Here's the Dockerfile:
[paste Dockerfile content]
Please follow the guidelines in docs/contribution/AI.md to create:
1. ct/myapp.sh (container script)
2. install/myapp-install.sh (installation script)
3. frontend/public/json/myapp.json (metadata)
```
4. **AI Will Generate**
The AI will produce scripts that:
- Follow all ProxmoxVE patterns and conventions
- Use helper functions from `tools.func` correctly
- Include proper error handling and messages
- Have correct update mechanisms
- Are ready to submit as a PR
### Key Points for AI Assistants
- **Templates Location**: `docs/contribution/templates_ct/AppName.sh`, `templates_install/`, `templates_json/`
- **Guidelines**: Must follow `docs/contribution/AI.md` exactly
- **Helper Functions**: Use only functions from `misc/tools.func` - never write custom ones
- **Testing**: Always test before submission via curl from your fork
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"
# Wait 10-30 seconds after pushing changes
```
- **No Docker**: Container scripts must be bare-metal, not Docker-based
### Benefits
- **Speed**: AI generates boilerplate in seconds
- **Consistency**: Follows same patterns as 200+ existing scripts
- **Quality**: Less bugs and more maintainable code
- **Learning**: See how your app should be structured
---
### Documentation ### Documentation
@@ -464,15 +221,15 @@ git push origin feature/my-feature
git rebase upstream/main git rebase upstream/main
``` ```
2. **Test your changes** (via curl from your fork) 2. **Test your changes**
```bash ```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/my-app.sh)" bash ct/my-app.sh
# Follow prompts and test the container # Follow prompts and test the container
# ⏱️ Wait 10-30 seconds after pushing - GitHub takes time to update
``` ```
3. **Check code standards** 3. **Check code standards**
- [ ] Follows template structure - [ ] Follows template structure
- [ ] Proper error handling - [ ] Proper error handling
- [ ] Documentation updated (if needed) - [ ] Documentation updated (if needed)
@@ -503,66 +260,23 @@ Before opening a PR:
## ❓ FAQ ## ❓ FAQ
### ❌ Why can't I test with `bash ct/myapp.sh` locally? ### How do I test my changes?
You might try:
```bash ```bash
# ❌ WRONG - This won't test your actual changes! # For container scripts
bash ct/myapp.sh bash ct/my-app.sh
./ct/myapp.sh
sh ct/myapp.sh # For install scripts (runs inside container)
# The ct script will call it automatically
# For advanced debugging
VERBOSE=yes bash ct/my-app.sh
``` ```
**Why this fails:**
- `bash ct/myapp.sh` uses the LOCAL clone file
- The LOCAL file doesn't execute the curl commands - it's already on disk
- The curl URLs INSIDE the script are modified by setup-fork.sh, but they're not executed
- So you can't verify if your curl URLs actually work
- Users will get the curl URL version (which may be broken)
**Solution:** Always test via curl from GitHub:
```bash
# ✅ CORRECT - Tests the actual GitHub URLs
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"
```
### ❓ How do I test my changes?
You **cannot** test locally with `bash ct/myapp.sh` from your cloned directory!
You **must** push to GitHub and test via curl from your fork:
```bash
# 1. Push your changes to your fork
git push origin feature/my-awesome-app
# 2. Test via curl (this loads the script from GitHub, not local files)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/my-app.sh)"
# 3. For verbose/debug output, pass environment variables
VERBOSE=yes bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/my-app.sh)"
DEV_MODE_LOGS=true bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/my-app.sh)"
```
**Why?**
- Local `bash ct/myapp.sh` uses local files from your clone
- But the script's INTERNAL curl commands have been modified by setup-fork.sh to point to your fork
- This discrepancy means you're not actually testing the curl URLs
- Testing via curl ensures the script downloads from YOUR fork GitHub URLs
- ⏱️ **Important:** GitHub takes 10-30 seconds to recognize newly pushed files. Wait before testing!
**What if local bash worked?**
You'd be testing local files only, not the actual GitHub URLs that users will download. This means broken curl links wouldn't be caught during testing.
### What if my PR has conflicts? ### What if my PR has conflicts?
```bash ```bash
# Sync with upstream main repository # Sync with upstream
git fetch upstream git fetch upstream
git rebase upstream/main git rebase upstream/main
@@ -574,27 +288,17 @@ git push -f origin your-branch
### How do I keep my fork updated? ### How do I keep my fork updated?
Two ways: See "Keep Your Fork Updated" section above, or run:
**Option 1: Run setup script again**
```bash ```bash
bash docs/contribution/setup-fork.sh --full bash docs/contribution/setup-fork.sh
```
**Option 2: Manual sync**
```bash
git fetch upstream
git rebase upstream/main
git push -f origin main
``` ```
### Where do I ask questions? ### Where do I ask questions?
- **GitHub Issues**: For bugs and feature requests - **GitHub Issues**: For bugs and feature requests
- **GitHub Discussions**: For general questions and ideas - **GitHub Discussions**: For general questions
- **Discord**: Community-scripts server for real-time chat - **Discord**: Community-scripts server
--- ---
@@ -603,7 +307,7 @@ git push -f origin main
### For First-Time Contributors ### For First-Time Contributors
1. Read: [docs/README.md](../README.md) - Documentation overview 1. Read: [docs/README.md](../README.md) - Documentation overview
2. Read: [CONTRIBUTING.md](CONTRIBUTING.md) - Essential coding standards 2. Read: [docs/contribution/FORK_SETUP.md](FORK_SETUP.md) - Fork setup guide
3. Choose your path: 3. Choose your path:
- Containers → [docs/ct/DETAILED_GUIDE.md](../ct/DETAILED_GUIDE.md) - Containers → [docs/ct/DETAILED_GUIDE.md](../ct/DETAILED_GUIDE.md)
- Installation → [docs/install/DETAILED_GUIDE.md](../install/DETAILED_GUIDE.md) - Installation → [docs/install/DETAILED_GUIDE.md](../install/DETAILED_GUIDE.md)
@@ -614,24 +318,21 @@ git push -f origin main
1. Review [CONTRIBUTING.md](CONTRIBUTING.md) - Coding standards 1. Review [CONTRIBUTING.md](CONTRIBUTING.md) - Coding standards
2. Review [CODE_AUDIT.md](CODE_AUDIT.md) - Audit checklist 2. Review [CODE_AUDIT.md](CODE_AUDIT.md) - Audit checklist
3. Check templates in `/docs/contribution/templates_*/` 3. Check templates in `/ct/` and `/install/`
4. Use AI assistants with [AI.md](AI.md) for code generation 4. Submit PR with confidence
5. Submit PR with confidence
### For Using AI Assistants ### For Reviewers/Maintainers
See "Using AI Assistants" section above for: 1. Use [CODE_AUDIT.md](CODE_AUDIT.md) as review guide
2. Reference [docs/TECHNICAL_REFERENCE.md](../TECHNICAL_REFERENCE.md) for architecture
- How to structure prompts 3. Check [docs/EXIT_CODES.md](../EXIT_CODES.md) for error handling
- What information to provide
- How to validate AI output
--- ---
## 🚀 Ready to Contribute? ## 🚀 Ready to Contribute?
1. **Fork** the repository 1. **Fork** the repository
2. **Clone** your fork and **setup** with `bash docs/contribution/setup-fork.sh --full` 2. **Clone** your fork and **setup** with `bash docs/contribution/setup-fork.sh`
3. **Choose** your contribution type (container, installation, tools, etc.) 3. **Choose** your contribution type (container, installation, tools, etc.)
4. **Read** the appropriate detailed guide 4. **Read** the appropriate detailed guide
5. **Create** your feature branch 5. **Create** your feature branch
@@ -644,9 +345,9 @@ See "Using AI Assistants" section above for:
## 📞 Contact & Support ## 📞 Contact & Support
- **GitHub**: [community-scripts/ProxmoxVE](https://github.com/community-scripts/ProxmoxVE) - **GitHub**: https://github.com/community-scripts/ProxmoxVE
- **Issues**: [GitHub Issues](https://github.com/community-scripts/ProxmoxVE/issues) - **Issues**: https://github.com/community-scripts/ProxmoxVE/issues
- **Discussions**: [GitHub Discussions](https://github.com/community-scripts/ProxmoxVE/discussions) - **Discussions**: https://github.com/community-scripts/ProxmoxVE/discussions
- **Discord**: [Join Server](https://discord.gg/UHrpNWGwkH) - **Discord**: [Join Server](https://discord.gg/UHrpNWGwkH)
--- ---

View File

@@ -8,15 +8,13 @@
# Updates all hardcoded links to point to your fork # Updates all hardcoded links to point to your fork
# #
# Usage: # Usage:
# ./setup-fork.sh # Auto-detect from git config (updates misc/ only) # ./setup-fork.sh # Auto-detect from git config
# ./setup-fork.sh YOUR_USERNAME # Specify username (updates misc/ only) # ./setup-fork.sh YOUR_USERNAME # Specify username
# ./setup-fork.sh YOUR_USERNAME REPO_NAME # Specify both (updates misc/ only) # ./setup-fork.sh YOUR_USERNAME REPO_NAME # Specify both
# ./setup-fork.sh --full # Update all files including ct/, install/, vm/, etc.
# #
# Examples: # Examples:
# ./setup-fork.sh john # Uses john/ProxmoxVE, updates misc/ only # ./setup-fork.sh john # Uses john/ProxmoxVE
# ./setup-fork.sh john my-fork # Uses john/my-fork, updates misc/ only # ./setup-fork.sh john my-fork # Uses john/my-fork
# ./setup-fork.sh --full # Auto-detect + update all files
################################################################################ ################################################################################
set -e set -e
@@ -32,136 +30,131 @@ NC='\033[0m' # No Color
REPO_NAME="ProxmoxVE" REPO_NAME="ProxmoxVE"
USERNAME="" USERNAME=""
AUTO_DETECT=true AUTO_DETECT=true
UPDATE_ALL=false
################################################################################ ################################################################################
# FUNCTIONS # FUNCTIONS
################################################################################ ################################################################################
print_header() { print_header() {
echo -e "\n${BLUE}╔════════════════════════════════════════════════════════════╗${NC}" echo -e "\n${BLUE}╔════════════════════════════════════════════════════════════╗${NC}"
echo -e "${BLUE}${NC} ProxmoxVE Fork Setup Script" echo -e "${BLUE}${NC} ProxmoxVE Fork Setup Script"
echo -e "${BLUE}${NC} Configuring for your fork..." echo -e "${BLUE}${NC} Configuring for your fork..."
echo -e "${BLUE}╚════════════════════════════════════════════════════════════╝${NC}\n" echo -e "${BLUE}╚════════════════════════════════════════════════════════════╝${NC}\n"
} }
print_info() { print_info() {
echo -e "${BLUE}${NC} $1" echo -e "${BLUE}${NC} $1"
} }
print_success() { print_success() {
echo -e "${GREEN}${NC} $1" echo -e "${GREEN}${NC} $1"
} }
print_warning() { print_warning() {
echo -e "${YELLOW}${NC} $1" echo -e "${YELLOW}${NC} $1"
} }
print_error() { print_error() {
echo -e "${RED}${NC} $1" echo -e "${RED}${NC} $1"
} }
# Detect username from git remote # Detect username from git remote
detect_username() { detect_username() {
local remote_url local remote_url
# Try to get from origin # Try to get from origin
if ! remote_url=$(git config --get remote.origin.url 2>/dev/null); then if ! remote_url=$(git config --get remote.origin.url 2>/dev/null); then
return 1 return 1
fi fi
# Extract username from SSH or HTTPS URL # Extract username from SSH or HTTPS URL
if [[ $remote_url =~ git@github.com:([^/]+) ]]; then if [[ $remote_url =~ git@github.com:([^/]+) ]]; then
echo "${BASH_REMATCH[1]}" echo "${BASH_REMATCH[1]}"
elif [[ $remote_url =~ github.com/([^/]+) ]]; then elif [[ $remote_url =~ github.com/([^/]+) ]]; then
echo "${BASH_REMATCH[1]}" echo "${BASH_REMATCH[1]}"
else else
return 1 return 1
fi fi
} }
# Detect repo name from git remote # Detect repo name from git remote
detect_repo_name() { detect_repo_name() {
local remote_url local remote_url
if ! remote_url=$(git config --get remote.origin.url 2>/dev/null); then if ! remote_url=$(git config --get remote.origin.url 2>/dev/null); then
return 1 return 1
fi fi
# Extract repo name (remove .git if present) # Extract repo name (remove .git if present)
if [[ $remote_url =~ /([^/]+?)(.git)?$ ]]; then if [[ $remote_url =~ /([^/]+?)(.git)?$ ]]; then
local repo="${BASH_REMATCH[1]}" local repo="${BASH_REMATCH[1]}"
echo "${repo%.git}" echo "${repo%.git}"
else else
return 1 return 1
fi fi
} }
# Ask user for confirmation # Ask user for confirmation
confirm() { confirm() {
local prompt="$1" local prompt="$1"
local response local response
echo -ne "${YELLOW}${prompt} (y/n)${NC} " read -p "$(echo -e ${YELLOW})$prompt (y/n)${NC} " -r response
read -r response [[ $response =~ ^[Yy]$ ]]
[[ $response =~ ^[Yy]$ ]]
} }
# Update links in files # Update links in files
update_links() { update_links() {
local old_repo="community-scripts" local old_repo="community-scripts"
local old_name="ProxmoxVE" local old_name="ProxmoxVE"
local new_owner="$1" local new_owner="$1"
local new_repo="$2" local new_repo="$2"
local files_updated=0 local files_updated=0
print_info "Scanning for hardcoded links..." print_info "Scanning for hardcoded links..."
# Change to repo root # Find all markdown and shell files
local repo_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd) local -a files_to_update=(
"docs/DEFAULTS_SYSTEM_GUIDE.md"
"docs/alpine-install.func.md"
"docs/install.func.md"
"docs/APP-install.md"
"docs/APP-ct.md"
"docs/CONTRIBUTION_GUIDE.md"
"docs/INDEX.md"
"docs/README.md"
"docs/EXIT_CODES.md"
"docs/api/README.md"
)
# Determine search path echo ""
local search_path="$repo_root/misc"
if [[ "$UPDATE_ALL" == "true" ]]; then
search_path="$repo_root"
print_info "Searching all files (--full mode)"
else
print_info "Searching misc/ directory only (core functions)"
fi
echo "" for file in "${files_to_update[@]}"; do
if [[ -f "$file" ]]; then
# Count occurrences
local count=$(grep -c "github.com/$old_repo/$old_name" "$file" 2>/dev/null || echo 0)
# Find all files containing the old repo reference if [[ $count -gt 0 ]]; then
while IFS= read -r file; do # Backup original
# Count occurrences cp "$file" "$file.backup"
local count=$(grep -c "github.com/$old_repo/$old_name" "$file" 2>/dev/null || echo 0)
if [[ $count -gt 0 ]]; then # Replace links
# Backup original sed -i "s|github.com/$old_repo/$old_name|github.com/$new_owner/$new_repo|g" "$file"
cp "$file" "$file.backup"
# Replace links - use different sed syntax for BSD/macOS vs GNU sed ((files_updated++))
if sed --version &>/dev/null 2>&1; then print_success "Updated $file ($count links)"
# GNU sed fi
sed -i "s|github.com/$old_repo/$old_name|github.com/$new_owner/$new_repo|g" "$file" fi
else done
# BSD sed (macOS)
sed -i '' "s|github.com/$old_repo/$old_name|github.com/$new_owner/$new_repo|g" "$file"
fi
((files_updated++)) return $files_updated
print_success "Updated $file ($count links)"
fi
done < <(find "$search_path" -type f \( -name "*.md" -o -name "*.sh" -o -name "*.func" -o -name "*.json" \) -not -path "*/.git/*" 2>/dev/null | xargs grep -l "github.com/$old_repo/$old_name" 2>/dev/null)
return $files_updated
} }
# Create user git config setup info # Create user git config setup info
create_git_setup_info() { create_git_setup_info() {
local username="$1" local username="$1"
cat >.git-setup-info <<'EOF' cat >.git-setup-info <<'EOF'
# Git Configuration for ProxmoxVE Development # Git Configuration for ProxmoxVE Development
## Recommended Git Configuration ## Recommended Git Configuration
@@ -220,10 +213,10 @@ git merge upstream/main
--- ---
For more help, see: docs/contribution/README.md For more help, see: docs/CONTRIBUTION_GUIDE.md
EOF EOF
print_success "Created .git-setup-info file" print_success "Created .git-setup-info file"
} }
################################################################################ ################################################################################
@@ -234,81 +227,65 @@ print_header
# Parse command line arguments # Parse command line arguments
if [[ $# -gt 0 ]]; then if [[ $# -gt 0 ]]; then
# Check for --full flag
if [[ "$1" == "--full" ]]; then
UPDATE_ALL=true
shift # Remove --full from arguments
fi
# Process remaining arguments
if [[ $# -gt 0 ]]; then
USERNAME="$1" USERNAME="$1"
AUTO_DETECT=false AUTO_DETECT=false
if [[ $# -gt 1 ]]; then if [[ $# -gt 1 ]]; then
REPO_NAME="$2" REPO_NAME="$2"
fi
else
# Try auto-detection
if username=$(detect_username); then
USERNAME="$username"
print_success "Detected GitHub username: $USERNAME"
else
print_error "Could not auto-detect GitHub username from git config"
echo -e "${YELLOW}Please run:${NC}"
echo " ./setup-fork.sh YOUR_USERNAME"
exit 1
fi fi
fi
fi
# Try auto-detection if repo_name=$(detect_repo_name); then
if [[ -z "$USERNAME" ]]; then REPO_NAME="$repo_name"
if username=$(detect_username); then if [[ "$REPO_NAME" != "ProxmoxVE" ]]; then
USERNAME="$username" print_info "Detected custom repo name: $REPO_NAME"
print_success "Detected GitHub username: $USERNAME" else
else print_success "Using default repo name: ProxmoxVE"
print_error "Could not auto-detect GitHub username from git config" fi
echo -e "${YELLOW}Please run:${NC}" fi
echo " ./setup-fork.sh YOUR_USERNAME"
exit 1
fi
fi
# Auto-detect repo name if needed
if repo_name=$(detect_repo_name); then
REPO_NAME="$repo_name"
if [[ "$REPO_NAME" != "ProxmoxVE" ]]; then
print_info "Detected custom repo name: $REPO_NAME"
else
print_success "Using default repo name: ProxmoxVE"
fi
fi fi
# Validate inputs # Validate inputs
if [[ -z "$USERNAME" ]]; then if [[ -z "$USERNAME" ]]; then
print_error "Username cannot be empty" print_error "Username cannot be empty"
exit 1 exit 1
fi fi
if [[ -z "$REPO_NAME" ]]; then if [[ -z "$REPO_NAME" ]]; then
print_error "Repository name cannot be empty" print_error "Repository name cannot be empty"
exit 1 exit 1
fi fi
# Show what we'll do # Show what we'll do
echo -e "${BLUE}Configuration Summary:${NC}" echo -e "${BLUE}Configuration Summary:${NC}"
echo " Repository URL: https://github.com/$USERNAME/$REPO_NAME" echo " Repository URL: https://github.com/$USERNAME/$REPO_NAME"
if [[ "$UPDATE_ALL" == "true" ]]; then echo " Files to update: 10 files with documentation"
echo " Files to update: ALL files (ct/, install/, vm/, misc/, docs/, etc.)"
else
echo " Files to update: misc/ directory only (core functions)"
fi
echo "" echo ""
# Ask for confirmation # Ask for confirmation
if ! confirm "Apply these changes?"; then if ! confirm "Apply these changes?"; then
print_warning "Setup cancelled" print_warning "Setup cancelled"
exit 0 exit 0
fi fi
echo "" echo ""
# Update all links # Update all links
if update_links "$USERNAME" "$REPO_NAME"; then if update_links "$USERNAME" "$REPO_NAME"; then
links_changed=$? links_changed=$?
print_success "Updated $links_changed files" print_success "Updated $links_changed files"
else else
print_warning "No links needed updating or some files not found" print_warning "No links needed updating or some files not found"
fi fi
# Create git setup info file # Create git setup info file
@@ -330,7 +307,7 @@ echo -e "${BLUE}Next Steps:${NC}"
echo " 1. Review the changes: git diff" echo " 1. Review the changes: git diff"
echo " 2. Check .git-setup-info for recommended git workflow" echo " 2. Check .git-setup-info for recommended git workflow"
echo " 3. Start developing: git checkout -b feature/my-app" echo " 3. Start developing: git checkout -b feature/my-app"
echo " 4. Read: docs/contribution/README.md" echo " 4. Read: docs/CONTRIBUTION_GUIDE.md"
echo "" echo ""
print_success "Happy contributing! 🚀" print_success "Happy contributing! 🚀"

View File

@@ -1,189 +1,197 @@
# CT Container Scripts - Quick Reference # **AppName<span></span>.sh Scripts**
> [!WARNING] `AppName.sh` scripts found in the `/ct` directory. These scripts are responsible for the installation of the desired application. For this guide we take `/ct/snipeit.sh` as example.
> **This is legacy documentation.** Refer to the **modern template** at [templates_ct/AppName.sh](AppName.sh) for best practices.
>
> Current templates use:
>
> - `tools.func` helpers instead of manual patterns
> - `check_for_gh_release` and `fetch_and_deploy_gh_release` from build.func
> - Automatic setup-fork.sh configuration
--- ## Table of Contents
## Before Creating a Script - [**AppName.sh Scripts**](#appnamesh-scripts)
- [Table of Contents](#table-of-contents)
- [1. **File Header**](#1-file-header)
- [1.1 **Shebang**](#11-shebang)
- [1.2 **Import Functions**](#12-import-functions)
- [1.3 **Metadata**](#13-metadata)
- [2 **Variables and function import**](#2-variables-and-function-import)
- [2.1 **Default Values**](#21-default-values)
- [2.2 **📋 App output \& base settings**](#22--app-output--base-settings)
- [2.3 **🛠 Core functions**](#23--core-functions)
- [3 **Update function**](#3-update-function)
- [3.1 **Function Header**](#31-function-header)
- [3.2 **Check APP**](#32-check-app)
- [3.3 **Check version**](#33-check-version)
- [3.4 **Verbosity**](#34-verbosity)
- [3.5 **Backups**](#35-backups)
- [3.6 **Cleanup**](#36-cleanup)
- [3.7 **No update function**](#37-no-update-function)
- [4 **End of the script**](#4-end-of-the-script)
- [5. **Contribution checklist**](#5-contribution-checklist)
1. **Fork & Clone:** ## 1. **File Header**
```bash ### 1.1 **Shebang**
git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git
cd ProxmoxVE
```
2. **Run setup-fork.sh** (updates all curl URLs to your fork): - Use `#!/usr/bin/env bash` as the shebang.
```bash
bash docs/contribution/setup-fork.sh
```
3. **Copy the Modern Template:**
```bash
cp templates_ct/AppName.sh ct/MyApp.sh
# Edit ct/MyApp.sh with your app details
```
4. **Test Your Script (via GitHub):**
⚠️ **Important:** You must push to GitHub and test via curl, not `bash ct/MyApp.sh`!
```bash
# Push your changes to your fork first
git push origin feature/my-awesome-app
# Then test via curl (this loads from YOUR fork, not local files)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/MyApp.sh)"
```
> 💡 **Why?** The script's curl commands are modified by setup-fork.sh, but local execution uses local files, not the updated GitHub URLs. Testing via curl ensures your script actually works.
>
> ⏱️ **Note:** GitHub sometimes takes 10-30 seconds to update files. If you don't see your changes, wait and try again.
5. **Cherry-Pick for PR** (submit ONLY your 3-4 files):
- See [Cherry-Pick Guide](../README.md) for step-by-step git commands
---
## Template Structure
The modern template includes:
### Header
```bash ```bash
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# (Note: setup-fork.sh changes this URL to point to YOUR fork during development)
``` ```
### Metadata ### 1.2 **Import Functions**
- Import the build.func file.
- When developing your own script, change the URL to your own repository.
> [!IMPORTANT]
> You also need to change all apperances of this URL in `misc/build.func` and `misc/install.func`
Example for development:
```bash
source <(curl -fsSL https://raw.githubusercontent.com/[USER]/[REPO]/refs/heads/[BRANCH]/misc/build.func)
```
Final script:
```bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
```
> [!CAUTION]
> Before opening a Pull Request, change the URLs to point to the community-scripts repo.
### 1.3 **Metadata**
- Add clear comments for script metadata, including author, copyright, and license information.
Example:
```bash ```bash
# Copyright (c) 2021-2026 community-scripts ORG # Copyright (c) 2021-2026 community-scripts ORG
# Author: YourUsername # Author: [YourUserName]
# License: MIT # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
APP="MyApp" # Source: [SOURCE_URL]
var_tags="app-category;foss" ```
> [!NOTE]:
>
> - Add your username and source URL
> - For existing scripts, add "| Co-Author [YourUserName]" after the current author
---
## 2 **Variables and function import**
>
> [!NOTE]
> You need to have all this set in your script, otherwise it will not work!
### 2.1 **Default Values**
- This section sets the default values for the container.
- `APP` needs to be set to the application name and must be equal to the filenames of your scripts.
- `var_tags`: You can set Tags for the CT wich show up in the Proxmox UI. Don´t overdo it!
>[!NOTE]
>Description for all Default Values
>
>| Variable | Description | Notes |
>|----------|-------------|-------|
>| `APP` | Application name | Must match ct\AppName.sh |
>| `var_tags` | Proxmox display tags without Spaces, only ; | Limit the number |
>| `var_cpu` | CPU cores | Number of cores |
>| `var_ram` | RAM | In MB |
>| `var_disk` | Disk capacity | In GB |
>| `var_os` | Operating system | alpine, debian, ubuntu |
>| `var_version` | OS version | e.g., 3.20, 11, 12, 20.04 |
>| `var_unprivileged` | Container type | 1 = Unprivileged, 0 = Privileged |
Example:
```bash
APP="SnipeIT"
var_tags="asset-management;foss"
var_cpu="2" var_cpu="2"
var_ram="2048" var_ram="2048"
var_disk="4" var_disk="4"
var_os="alpine" var_os="debian"
var_version="3.20" var_version="12"
var_unprivileged="1" var_unprivileged="1"
``` ```
### Core Setup ## 2.2 **📋 App output & base settings**
```bash ```bash
header_info "$APP" header_info "$APP"
```
- `header_info`: Generates ASCII header for APP
## 2.3 **🛠 Core functions**
```bash
variables variables
color color
catch_errors catch_errors
``` ```
### Update Function - `variables`: Processes input and prepares variables
- `color`: Sets icons, colors, and formatting
- `catch_errors`: Enables error handling
The modern template provides a standard update pattern: ---
## 3 **Update function**
### 3.1 **Function Header**
- If applicable write a function that updates the application and the OS in the container.
- Each update function starts with the same code:
```bash ```bash
function update_script() { function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
```
# Use tools.func helpers: ### 3.2 **Check APP**
check_for_gh_release "myapp" "owner/repo"
fetch_and_deploy_gh_release "myapp" "owner/repo" "tarball" "latest" "/opt/myapp" - Before doing anything update-wise, check if the app is installed in the container.
Example:
```bash
if [[ ! -d /opt/snipe-it ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
```
### 3.3 **Check version**
- Before updating, check if a new version exists.
- We use the `${APPLICATION}_version.txt` file created in `/opt` during the install to compare new versions against the currently installed version.
Example with a Github Release:
```bash
RELEASE=$(curl -fsSL https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to v${RELEASE}"
#DO UPDATE
else
msg_ok "No update required. ${APP} is already at v${RELEASE}."
fi
exit
} }
``` ```
---
## Key Patterns
### Check for Updates (App Repository)
Use `check_for_gh_release` with the **app repo**:
```bash
check_for_gh_release "myapp" "owner/repo"
```
### Deploy External App
Use `fetch_and_deploy_gh_release` with the **app repo**:
```bash
fetch_and_deploy_gh_release "myapp" "owner/repo"
```
### Avoid Manual Version Checking
❌ OLD (manual):
```bash
RELEASE=$(curl -fsSL https://api.github.com/repos/myapp/myapp/releases/latest | grep tag_name)
```
✅ NEW (use tools.func):
```bash
fetch_and_deploy_gh_release "myapp" "owner/repo"
```
---
## Best Practices
1. **Use tools.func helpers** - Don't manually curl for versions
2. **Only add app-specific dependencies** - Don't add ca-certificates, curl, gnupg (handled by build.func)
3. **Test via curl from your fork** - Push first, then: `bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/MyApp.sh)"`
4. **Wait for GitHub to update** - Takes 10-30 seconds after git push
5. **Cherry-pick only YOUR files** - Submit only ct/MyApp.sh, install/MyApp-install.sh, frontend/public/json/myapp.json (3 files)
6. **Verify before PR** - Run `git diff upstream/main --name-only` to confirm only your files changed
---
## Common Update Patterns
See the [modern template](AppName.sh) and [AI.md](../AI.md) for complete working examples.
Recent reference scripts with good update functions:
- [Trip](https://github.com/community-scripts/ProxmoxVE/blob/main/ct/trip.sh)
- [Thingsboard](https://github.com/community-scripts/ProxmoxVE/blob/main/ct/thingsboard.sh)
- [UniFi](https://github.com/community-scripts/ProxmoxVE/blob/main/ct/unifi.sh)
---
## Need Help?
- **[README.md](../README.md)** - Full contribution workflow
- **[AI.md](../AI.md)** - AI-generated script guidelines
- **[FORK_SETUP.md](../FORK_SETUP.md)** - Why setup-fork.sh is important
- **[Slack Community](https://discord.gg/your-link)** - Ask questions
````
### 3.4 **Verbosity** ### 3.4 **Verbosity**
- Use the appropriate flag (**-q** in the examples) for a command to suppress its output. - Use the appropriate flag (**-q** in the examples) for a command to suppress its output.
Example: Example:
```bash ```bash
curl -fsSL curl -fsSL
unzip -q unzip -q
```` ```
- If a command does not come with this functionality use `$STD` to suppress it's output. - If a command does not come with this functionality use `$STD` to suppress it's output.
@@ -199,8 +207,8 @@ $STD php artisan config:clear
- Backup user data if necessary. - Backup user data if necessary.
- Move all user data back in the directory when the update is finished. - Move all user data back in the directory when the update is finished.
> [!NOTE] >[!NOTE]
> This is not meant to be a permanent backup >This is not meant to be a permanent backup
Example backup: Example backup:
@@ -219,7 +227,7 @@ Example config restore:
### 3.6 **Cleanup** ### 3.6 **Cleanup**
- Do not forget to remove any temporary files/folders such as zip-files or temporary backups. - Do not forget to remove any temporary files/folders such as zip-files or temporary backups.
Example: Example:
```bash ```bash
rm -rf /opt/v${RELEASE}.zip rm -rf /opt/v${RELEASE}.zip
@@ -269,7 +277,7 @@ echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
## 5. **Contribution checklist** ## 5. **Contribution checklist**
- [ ] Shebang is correctly set (`#!/usr/bin/env bash`). - [ ] Shebang is correctly set (`#!/usr/bin/env bash`).
- [ ] Correct link to _build.func_ - [ ] Correct link to *build.func*
- [ ] Metadata (author, license) is included at the top. - [ ] Metadata (author, license) is included at the top.
- [ ] Variables follow naming conventions. - [ ] Variables follow naming conventions.
- [ ] Update function exists. - [ ] Update function exists.

View File

@@ -5,133 +5,89 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: [SOURCE_URL e.g. https://github.com/example/app] # Source: [SOURCE_URL e.g. https://github.com/example/app]
# ============================================================================ # App Default Values
# APP CONFIGURATION
# ============================================================================
# These values are sent to build.func and define default container resources.
# Users can customize these during installation via the interactive prompts.
# ============================================================================
APP="[AppName]" APP="[AppName]"
var_tags="${var_tags:-[category1];[category2]}" # Max 2 tags, semicolon-separated var_tags="${var_tags:-[category]}"
var_cpu="${var_cpu:-2}" # CPU cores: 1-4 typical var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" # RAM in MB: 512, 1024, 2048, etc. var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}" # Disk in GB: 6, 8, 10, 20 typical var_disk="${var_disk:-4}"
var_os="${var_os:-debian}" # OS: debian, ubuntu, alpine var_os="${var_os:-debian}"
var_version="${var_version:-13}" # OS Version: 13 (Debian), 24.04 (Ubuntu), 3.21 (Alpine) var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}" # 1=unprivileged (secure), 0=privileged (for Docker/Podman) var_unprivileged="${var_unprivileged:-1}"
# ============================================================================ # =============================================================================
# INITIALIZATION - These are required in all CT scripts # CONFIGURATION GUIDE
# ============================================================================ # =============================================================================
header_info "$APP" # Display app name and setup header # APP - Display name, title case (e.g. "Koel", "Wallabag", "Actual Budget")
variables # Initialize build.func variables # var_tags - Max 2 tags, semicolon separated (e.g. "music;streaming", "finance")
color # Load color variables for output # var_cpu - CPU cores: 1-4 typical
catch_errors # Enable error handling with automatic exit on failure # var_ram - RAM in MB: 512, 1024, 2048, 4096 typical
# var_disk - Disk in GB: 4, 6, 8, 10, 20 typical
# var_os - OS: debian, ubuntu, alpine
# var_version - OS version: 12/13 (debian), 22.04/24.04 (ubuntu), 3.20/3.21 (alpine)
# var_unprivileged - 1 = unprivileged (secure, default), 0 = privileged (for docker etc.)
# ============================================================================ header_info "$APP"
# UPDATE SCRIPT - Called when user selects "Update" from web interface variables
# ============================================================================ color
# This function is triggered by the web interface to update the application. catch_errors
# It should:
# 1. Check if installation exists
# 2. Check for new GitHub releases
# 3. Stop running services
# 4. Backup critical data
# 5. Deploy new version
# 6. Run post-update commands (migrations, config updates, etc.)
# 7. Restore data if needed
# 8. Start services
#
# Exit with `exit` at the end to prevent container restart.
# ============================================================================
function update_script() { function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
# Step 1: Verify installation exists # Check if installation exists
if [[ ! -d /opt/[appname] ]]; then if [[ ! -d /opt/[appname] ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
# Step 2: Check if update is available # check_for_gh_release returns 0 (true) if update available, 1 (false) if not
if check_for_gh_release "[appname]" "YourUsername/YourRepo"; then if check_for_gh_release "[appname]" "[owner/repo]"; then
msg_info "Stopping Services"
# Step 3: Stop services before update
msg_info "Stopping Service"
systemctl stop [appname] systemctl stop [appname]
msg_ok "Stopped Service" msg_ok "Stopped Services"
# Step 4: Backup critical data before overwriting # Optional: Backup important data before update
msg_info "Backing up Data" msg_info "Creating Backup"
cp -r /opt/[appname]/data /opt/[appname]_data_backup 2>/dev/null || true mkdir -p /tmp/[appname]_backup
msg_ok "Backed up Data" cp /opt/[appname]/.env /tmp/[appname]_backup/ 2>/dev/null || true
cp -r /opt/[appname]/data /tmp/[appname]_backup/ 2>/dev/null || true
msg_ok "Created Backup"
# Step 5: Download and deploy new version # CLEAN_INSTALL=1 removes old directory before extracting new version
# CLEAN_INSTALL=1 removes old directory before extracting CLEAN_INSTALL=1 fetch_and_deploy_gh_release "[appname]" "[owner/repo]" "tarball" "latest" "/opt/[appname]"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "[appname]" "owner/repo" "tarball" "latest" "/opt/[appname]"
# Step 6: Run post-update commands (uncomment as needed) # Restore configuration and data
# These examples show common patterns - use what applies to your app:
#
# For Node.js apps:
# msg_info "Installing Dependencies"
# cd /opt/[appname]
# $STD npm ci --production
# msg_ok "Installed Dependencies"
#
# For Python apps:
# msg_info "Installing Dependencies"
# cd /opt/[appname]
# $STD uv sync --frozen
# msg_ok "Installed Dependencies"
#
# For database migrations:
# msg_info "Running Database Migrations"
# cd /opt/[appname]
# $STD npm run migrate
# msg_ok "Ran Database Migrations"
#
# For PHP apps:
# msg_info "Installing Dependencies"
# cd /opt/[appname]
# $STD composer install --no-dev
# msg_ok "Installed Dependencies"
# Step 7: Restore data from backup
msg_info "Restoring Data" msg_info "Restoring Data"
cp -r /opt/[appname]_data_backup/. /opt/[appname]/data/ 2>/dev/null || true cp /tmp/[appname]_backup/.env /opt/[appname]/ 2>/dev/null || true
rm -rf /opt/[appname]_data_backup cp -r /tmp/[appname]_backup/data/* /opt/[appname]/data/ 2>/dev/null || true
rm -rf /tmp/[appname]_backup
msg_ok "Restored Data" msg_ok "Restored Data"
# Step 8: Restart service with new version # Optional: Run any post-update commands
msg_info "Starting Service" msg_info "Running Post-Update Tasks"
cd /opt/[appname]
# Examples:
# $STD npm ci --production
# $STD php artisan migrate --force
# $STD composer install --no-dev
msg_ok "Ran Post-Update Tasks"
msg_info "Starting Services"
systemctl start [appname] systemctl start [appname]
msg_ok "Started Service" msg_ok "Started Services"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
exit exit
} }
# ============================================================================
# MAIN EXECUTION - Container creation flow
# ============================================================================
# These are called by build.func and handle the full installation process:
# 1. start - Initialize container creation
# 2. build_container - Execute the install script inside container
# 3. description - Display completion info and access details
# ============================================================================
start start
build_container build_container
description description
# ============================================================================
# COMPLETION MESSAGE
# ============================================================================
msg_ok "Completed successfully!\n" msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"

View File

@@ -1,195 +1,54 @@
# Install Scripts - Quick Reference
> [!WARNING] # **AppName<span></span>-install.sh Scripts**
> **This is legacy documentation.** Refer to the **modern template** at [templates_install/AppName-install.sh](AppName-install.sh) for best practices.
>
> Current templates use:
>
> - `tools.func` helpers (setup_nodejs, setup_uv, setup_postgresql_db, etc.)
> - Automatic dependency installation via build.func
> - Standardized environment variable patterns
--- `AppName-install.sh` scripts found in the `/install` directory. These scripts are responsible for the installation of the application. For this guide we take `/install/snipeit-install.sh` as example.
## Before Creating a Script ## Table of Contents
1. **Copy the Modern Template:** - [**AppName-install.sh Scripts**](#appname-installsh-scripts)
- [Table of Contents](#table-of-contents)
- [1. **File header**](#1-file-header)
- [1.1 **Shebang**](#11-shebang)
- [1.2 **Comments**](#12-comments)
- [1.3 **Variables and function import**](#13-variables-and-function-import)
- [2. **Variable naming and management**](#2-variable-naming-and-management)
- [2.1 **Naming conventions**](#21-naming-conventions)
- [3. **Dependencies**](#3-dependencies)
- [3.1 **Install all at once**](#31-install-all-at-once)
- [3.2 **Collapse dependencies**](#32-collapse-dependencies)
- [4. **Paths to application files**](#4-paths-to-application-files)
- [5. **Version management**](#5-version-management)
- [5.1 **Install the latest release**](#51-install-the-latest-release)
- [5.2 **Save the version for update checks**](#52-save-the-version-for-update-checks)
- [6. **Input and output management**](#6-input-and-output-management)
- [6.1 **User feedback**](#61-user-feedback)
- [6.2 **Verbosity**](#62-verbosity)
- [7. **String/File Manipulation**](#7-stringfile-manipulation)
- [7.1 **File Manipulation**](#71-file-manipulation)
- [8. **Security practices**](#8-security-practices)
- [8.1 **Password generation**](#81-password-generation)
- [8.2 **File permissions**](#82-file-permissions)
- [9. **Service Configuration**](#9-service-configuration)
- [9.1 **Configuration files**](#91-configuration-files)
- [9.2 **Credential management**](#92-credential-management)
- [9.3 **Enviroment files**](#93-enviroment-files)
- [9.4 **Services**](#94-services)
- [10. **Cleanup**](#10-cleanup)
- [10.1 **Remove temporary files**](#101-remove-temporary-files)
- [10.2 **Autoremove and autoclean**](#102-autoremove-and-autoclean)
- [11. **Best Practices Checklist**](#11-best-practices-checklist)
- [Example: High-Level Script Flow](#example-high-level-script-flow)
```bash ## 1. **File header**
cp templates_install/AppName-install.sh install/MyApp-install.sh
# Edit install/MyApp-install.sh
```
2. **Key Pattern:** ### 1.1 **Shebang**
- CT scripts source build.func and call the install script
- Install scripts use sourced FUNCTIONS_FILE_PATH (via build.func)
- Both scripts work together in the container
3. **Test via GitHub:** - Use `#!/usr/bin/env bash` as the shebang.
```bash
# Push your changes to your fork first
git push origin feature/my-awesome-app
# Test the CT script via curl (it will call the install script)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/MyApp.sh)"
# ⏱️ Wait 10-30 seconds after pushing - GitHub takes time to update
```
---
## Template Structure
### Header
```bash ```bash
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/install.func)
# (setup-fork.sh modifies this URL to point to YOUR fork during development)
``` ```
### Dependencies (App-Specific Only)
```bash
# Don't add: ca-certificates, curl, gnupg, wget, git, jq
# These are handled by build.func
msg_info "Installing dependencies"
$STD apt-get install -y app-specific-deps
msg_ok "Installed dependencies"
```
### Runtime Setup
Use tools.func helpers instead of manual installation:
```bash
# ✅ NEW (use tools.func):
NODE_VERSION="20"
setup_nodejs
# OR
PYTHON_VERSION="3.12"
setup_uv
# OR
PG_DB_NAME="myapp_db"
PG_DB_USER="myapp"
setup_postgresql_db
```
### Service Configuration
```bash
# Create .env file
msg_info "Configuring MyApp"
cat << EOF > /opt/myapp/.env
DEBUG=false
PORT=8080
DATABASE_URL=postgresql://...
EOF
msg_ok "Configuration complete"
# Create systemd service
msg_info "Creating systemd service"
cat << EOF > /etc/systemd/system/myapp.service
[Unit]
Description=MyApp
[Service]
ExecStart=/usr/bin/node /opt/myapp/app.js
[Install]
WantedBy=multi-user.target
EOF
msg_ok "Service created"
```
### Finalization
```bash
msg_info "Finalizing MyApp installation"
systemctl enable --now myapp
motd_ssh
customize
msg_ok "MyApp installation complete"
cleanup_lxc
```
---
## Key Patterns
### Avoid Manual Version Checking
❌ OLD (manual):
```bash
RELEASE=$(curl -fsSL https://api.github.com/repos/app/repo/releases/latest | grep tag_name)
wget https://github.com/app/repo/releases/download/$RELEASE/app.tar.gz
```
✅ NEW (use tools.func via CT script's fetch_and_deploy_gh_release):
```bash
# In CT script, not install script:
fetch_and_deploy_gh_release "myapp" "app/repo" "app.tar.gz" "latest" "/opt/myapp"
```
### Database Setup
```bash
# Use setup_postgresql_db, setup_mysql_db, etc.
PG_DB_NAME="myapp"
PG_DB_USER="myapp"
setup_postgresql_db
```
### Node.js Setup
```bash
NODE_VERSION="20"
setup_nodejs
npm install --no-save
```
---
## Best Practices
1. **Only add app-specific dependencies**
- Don't add: ca-certificates, curl, gnupg, wget, git, jq
- These are handled by build.func
2. **Use tools.func helpers**
- setup_nodejs, setup_python, setup_uv, setup_postgresql_db, setup_mysql_db, etc.
3. **Don't do version checks in install script**
- Version checking happens in CT script's update_script()
- Install script just installs the latest
4. **Structure:**
- Dependencies
- Runtime setup (tools.func)
- Deployment (fetch from CT script)
- Configuration files
- Systemd service
- Finalization
---
## Reference Scripts
See working examples:
- [Trip](https://github.com/community-scripts/ProxmoxVE/blob/main/install/trip-install.sh)
- [Thingsboard](https://github.com/community-scripts/ProxmoxVE/blob/main/install/thingsboard-install.sh)
- [UniFi](https://github.com/community-scripts/ProxmoxVE/blob/main/install/unifi-install.sh)
---
## Need Help?
- **[Modern Template](AppName-install.sh)** - Start here
- **[CT Template](../templates_ct/AppName.sh)** - How CT scripts work
- **[README.md](../README.md)** - Full contribution workflow
- **[AI.md](../AI.md)** - AI-generated script guidelines
### 1.2 **Comments** ### 1.2 **Comments**
- Add clear comments for script metadata, including author, copyright, and license information. - Add clear comments for script metadata, including author, copyright, and license information.
@@ -330,7 +189,7 @@ msg_ok "Installed Dependencies"
### 6.2 **Verbosity** ### 6.2 **Verbosity**
- Use the appropiate flag (**-q** in the examples) for a command to suppres its output - Use the appropiate flag (**-q** in the examples) for a command to suppres its output
Example: Example:
```bash ```bash
curl -fsSL curl -fsSL

View File

@@ -5,6 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: [SOURCE_URL e.g. https://github.com/example/app] # Source: [SOURCE_URL e.g. https://github.com/example/app]
# Import Functions and Setup
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color color
verb_ip6 verb_ip6
@@ -14,51 +15,48 @@ network_check
update_os update_os
# ============================================================================= # =============================================================================
# DEPENDENCIES - Only add app-specific dependencies here! # DEPENDENCIES
# Don't add: ca-certificates, curl, gnupg, git, build-essential (handled by build.func)
# ============================================================================= # =============================================================================
# Only install what's actually needed - curl/sudo/mc are already in the base image
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt install -y \ $STD apt install -y \
libharfbuzz0b \ nginx \
fontconfig build-essential
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
# ============================================================================= # =============================================================================
# SETUP RUNTIMES & DATABASES (if needed) # HELPER FUNCTIONS FROM tools.func
# ============================================================================= # =============================================================================
# Examples (uncomment as needed): # These functions are available via $FUNCTIONS_FILE_PATH (tools.func)
# Call them with optional environment variables for configuration
# #
# NODE_VERSION="22" setup_nodejs # --- Runtime & Language Setup ---
# NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs # Installs pnpm # NODE_VERSION="22" setup_nodejs # Install Node.js (22, 24)
# PYTHON_VERSION="3.13" setup_uv # NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs # With pnpm
# JAVA_VERSION="21" setup_java # PYTHON_VERSION="3.13" setup_uv # Python with uv package manager
# GO_VERSION="1.22" setup_go # setup_go # Install Go (latest)
# PHP_VERSION="8.4" PHP_FPM="YES" setup_php # setup_rust # Install Rust via rustup
# setup_postgresql # Server only # setup_ruby # Install Ruby
# setup_mariadb # Server only # PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="mysqli,gd" setup_php
# setup_meilisearch # Search engine # PHP_VERSION="8.3" PHP_FPM="YES" PHP_APACHE="YES" PHP_MODULE="bcmath,curl,gd,intl,mbstring,mysql,xml,zip" setup_php
# setup_composer # Install PHP Composer
# JAVA_VERSION="21" setup_java # Install Java (17, 21)
# #
# Then set up DB and user (sets $[DB]_DB_PASS): # --- Database Setup ---
# PG_DB_NAME="myapp" PG_DB_USER="myapp" setup_postgresql_db # setup_mariadb # Install MariaDB server
# MARIADB_DB_NAME="myapp" MARIADB_DB_USER="myapp" setup_mariadb_db # MARIADB_DB_NAME="mydb" MARIADB_DB_USER="myuser" setup_mariadb_db
# setup_mysql # Install MySQL server
# ============================================================================= # PG_VERSION="17" setup_postgresql # Install PostgreSQL (16, 17)
# DOWNLOAD & DEPLOY APPLICATION # PG_VERSION="17" PG_MODULES="postgis" setup_postgresql # With extensions
# ============================================================================= # PG_DB_NAME="mydb" PG_DB_USER="myuser" setup_postgresql_db
# fetch_and_deploy_gh_release modes: # setup_mongodb # Install MongoDB
# "tarball" - Source tarball (default if omitted) #
# "binary" - .deb package (auto-detects amd64/arm64) # --- GitHub Release (PREFERRED METHOD) ---
# "prebuild" - Pre-built archive (.tar.gz) # fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" # Downloads, extracts, tracks version
# "singlefile" - Single binary file # fetch_and_deploy_gh_release "appname" "owner/repo" "tarball" "latest" "/opt/appname"
# fetch_and_deploy_gh_release "appname" "owner/repo" "prebuild" "latest" "/opt/appname" "app-*.tar.gz"
# #
# Examples:
# fetch_and_deploy_gh_release "myapp" "YourUsername/myapp" "tarball" "latest" "/opt/myapp"
# fetch_and_deploy_gh_release "myapp" "YourUsername/myapp" "binary" "latest" "/tmp"
# fetch_and_deploy_gh_release "myapp" "YourUsername/myapp" "prebuild" "latest" "/opt/myapp" "myapp-*.tar.gz"
fetch_and_deploy_gh_release "[appname]" "owner/repo" "tarball" "latest" "/opt/[appname]"
# --- Tools & Utilities --- # --- Tools & Utilities ---
# get_lxc_ip # Sets $LOCAL_IP variable (call early!) # get_lxc_ip # Sets $LOCAL_IP variable (call early!)
# setup_ffmpeg # Install FFmpeg with codecs # setup_ffmpeg # Install FFmpeg with codecs
@@ -69,11 +67,8 @@ fetch_and_deploy_gh_release "[appname]" "owner/repo" "tarball" "latest" "/opt/[a
# create_self_signed_cert # Creates cert in /etc/ssl/[appname]/ # create_self_signed_cert # Creates cert in /etc/ssl/[appname]/
# ============================================================================= # =============================================================================
# EXAMPLES
# =============================================================================
#
# EXAMPLE 1: Node.js Application with PostgreSQL # EXAMPLE 1: Node.js Application with PostgreSQL
# --------------------------------------------- # =============================================================================
# NODE_VERSION="22" setup_nodejs # NODE_VERSION="22" setup_nodejs
# PG_VERSION="17" setup_postgresql # PG_VERSION="17" setup_postgresql
# PG_DB_NAME="myapp" PG_DB_USER="myapp" setup_postgresql_db # PG_DB_NAME="myapp" PG_DB_USER="myapp" setup_postgresql_db
@@ -89,9 +84,10 @@ fetch_and_deploy_gh_release "[appname]" "owner/repo" "tarball" "latest" "/opt/[a
# PORT=3000 # PORT=3000
# EOF # EOF
# msg_ok "Configured MyApp" # msg_ok "Configured MyApp"
#
# =============================================================================
# EXAMPLE 2: Python Application with uv # EXAMPLE 2: Python Application with uv
# ------------------------------------ # =============================================================================
# PYTHON_VERSION="3.13" setup_uv # PYTHON_VERSION="3.13" setup_uv
# get_lxc_ip # get_lxc_ip
# fetch_and_deploy_gh_release "myapp" "owner/myapp" "tarball" "latest" "/opt/myapp" # fetch_and_deploy_gh_release "myapp" "owner/myapp" "tarball" "latest" "/opt/myapp"
@@ -145,7 +141,7 @@ fetch_and_deploy_gh_release "[appname]" "[owner/repo]" "tarball" "latest" "/opt/
msg_info "Setting up [AppName]" msg_info "Setting up [AppName]"
cd /opt/[appname] cd /opt/[appname]
# $STD npm ci $STD npm ci
msg_ok "Setup [AppName]" msg_ok "Setup [AppName]"
# ============================================================================= # =============================================================================
@@ -153,25 +149,14 @@ msg_ok "Setup [AppName]"
# ============================================================================= # =============================================================================
msg_info "Configuring [AppName]" msg_info "Configuring [AppName]"
cd /opt/[appname]
# Install application dependencies (uncomment as needed):
# $STD npm ci --production # Node.js apps
# $STD uv sync --frozen # Python apps
# $STD composer install --no-dev # PHP apps
# $STD cargo build --release # Rust apps
# Create .env file if needed:
cat <<EOF >/opt/[appname]/.env cat <<EOF >/opt/[appname]/.env
# Use import_local_ip to get container IP, or hardcode if building on Proxmox HOST=${LOCAL_IP}
APP_URL=http://localhost
PORT=8080 PORT=8080
EOF EOF
msg_ok "Configured [AppName]" msg_ok "Configured [AppName]"
# ============================================================================= # =============================================================================
# CREATE SYSTEMD SERVICE # SERVICE CREATION
# ============================================================================= # =============================================================================
msg_info "Creating Service" msg_info "Creating Service"
@@ -197,11 +182,9 @@ msg_ok "Created Service"
# ============================================================================= # =============================================================================
# CLEANUP & FINALIZATION # CLEANUP & FINALIZATION
# ============================================================================= # =============================================================================
# These are called automatically, but shown here for clarity:
# motd_ssh - Displays service info on SSH login
# customize - Enables optional customizations
# cleanup_lxc - Removes temp files, bash history, logs
motd_ssh motd_ssh
customize customize
# cleanup_lxc handles: apt autoremove, autoclean, temp files, bash history
cleanup_lxc cleanup_lxc

View File

@@ -4,26 +4,25 @@
"categories": [ "categories": [
0 0
], ],
"date_created": "2026-01-18", "date_created": "DATE CREATED",
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 3000, "interface_port": "DEFAULT-PORT",
"documentation": "https://docs.example.com/", "documentation": null,
"website": "https://example.com/", "website": "LINK TO WEBSITE",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/appname.webp", "logo": "LINK TO LOGO",
"config_path": "/opt/appname/.env", "description": "Description of the app",
"description": "Short description of what AppName does and its main features.",
"install_methods": [ "install_methods": [
{ {
"type": "default", "type": "default",
"script": "ct/appname.sh", "script": "ct/AppName.sh",
"resources": { "resources": {
"cpu": 2, "cpu": 2,
"ram": 2048, "ram": 2048,
"hdd": 8, "hdd": 4,
"os": "Debian", "os": "debian",
"version": "13" "version": "12"
} }
} }
], ],
@@ -31,10 +30,5 @@
"username": null, "username": null,
"password": null "password": null
}, },
"notes": [ "notes": []
{
"text": "Change the default password after first login!",
"type": "warning"
}
]
} }

View File

@@ -1,165 +1,13 @@
# JSON Metadata Files - Quick Reference # **AppName<span></span>.json Files**
The metadata file (`frontend/public/json/myapp.json`) tells the web interface how to display your application. `AppName.json` files found in the `/json` directory. These files are used to provide informations for the website. For this guide we take `/json/snipeit.json` as example.
--- ## Table of Contents
## Quick Start - [**AppName.json Files**](#appnamejson-files)
- [Table of Contents](#table-of-contents)
- [1. JSON Generator](#1-json-generator)
**Use the JSON Generator Tool:** ## 1. JSON Generator
[https://community-scripts.github.io/ProxmoxVE/json-editor](https://community-scripts.github.io/ProxmoxVE/json-editor)
1. Enter application details Use the [JSON Generator](https://community-scripts.github.io/ProxmoxVE/json-editor) to create this file for your application.
2. Generator creates `frontend/public/json/myapp.json`
3. Copy the output to your contribution
---
## File Structure
```json
{
"name": "MyApp",
"slug": "myapp",
"categories": [1],
"date_created": "2026-01-18",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://docs.example.com/",
"website": "https://example.com/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/myapp.webp",
"config_path": "/opt/myapp/.env",
"description": "Brief description of what MyApp does",
"install_methods": [
{
"type": "default",
"script": "ct/myapp.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Change the default password after first login!",
"type": "warning"
}
]
}
```
---
## Field Reference
| Field | Required | Example | Notes |
| --------------------- | -------- | ----------------- | ---------------------------------------------- |
| `name` | Yes | "MyApp" | Display name |
| `slug` | Yes | "myapp" | URL-friendly identifier (lowercase, no spaces) |
| `categories` | Yes | [1] | One or more category IDs |
| `date_created` | Yes | "2026-01-18" | Format: YYYY-MM-DD |
| `type` | Yes | "ct" | Container type: "ct" or "vm" |
| `interface_port` | Yes | 3000 | Default web interface port |
| `logo` | No | "https://..." | Logo URL (64px x 64px PNG) |
| `config_path` | Yes | "/opt/myapp/.env" | Main config file location |
| `description` | Yes | "App description" | Brief description (100 chars) |
| `install_methods` | Yes | See below | Installation resources (array) |
| `default_credentials` | No | See below | Optional default login |
| `notes` | No | See below | Additional notes (array) |
---
## Install Methods
Each installation method specifies resource requirements:
```json
"install_methods": [
{
"type": "default",
"script": "ct/myapp.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "13"
}
}
]
```
**Resource Defaults:**
- CPU: Cores (1-8)
- RAM: Megabytes (256-4096)
- Disk: Gigabytes (4-50)
---
## Common Categories
- `0` Miscellaneous
- `1` Proxmox & Virtualization
- `2` Operating Systems
- `3` Containers & Docker
- `4` Network & Firewall
- `5` Adblock & DNS
- `6` Authentication & Security
- `7` Backup & Recovery
- `8` Databases
- `9` Monitoring & Analytics
- `10` Dashboards & Frontends
- `11` Files & Downloads
- `12` Documents & Notes
- `13` Media & Streaming
- `14` \*Arr Suite
- `15` NVR & Cameras
- `16` IoT & Smart Home
- `17` ZigBee, Z-Wave & Matter
- `18` MQTT & Messaging
- `19` Automation & Scheduling
- `20` AI / Coding & Dev-Tools
- `21` Webservers & Proxies
- `22` Bots & ChatOps
- `23` Finance & Budgeting
- `24` Gaming & Leisure
- `25` Business & ERP
---
## Best Practices
1. **Use the JSON Generator** - It validates structure
2. **Keep descriptions short** - 100 characters max
3. **Use real resource requirements** - Based on your testing
4. **Include sensible defaults** - Pre-filled in install_methods
5. **Slug must be lowercase** - No spaces, use hyphens
---
## Reference Examples
See actual examples in the repo:
- [frontend/public/json/trip.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/trip.json)
- [frontend/public/json/thingsboard.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/thingsboard.json)
- [frontend/public/json/unifi.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/unifi.json)
---
## Need Help?
- **[JSON Generator](https://community-scripts.github.io/ProxmoxVE/json-editor)** - Interactive tool
- **[README.md](../README.md)** - Full contribution workflow
- **[Quick Start](../README.md)** - Step-by-step guide

View File

@@ -539,69 +539,6 @@ var_nesting=0 # Nested containers disabled
--- ---
### var_diagnostics
**Type:** Boolean (yes or no)
**Default:** `yes`
**Description:** Determines if anonymous telemetry and diagnostic data is sent to Community-Scripts API.
```bash
var_diagnostics=yes # Allow telemetry (helps us improve scripts)
var_diagnostics=no # Disable all telemetry
```
**Privacy & Usage:**
- Data is strictly anonymous (random session ID)
- Reports success/failure of installations
- Maps error codes (e.g., APT lock, out of RAM)
- No user-specific data, hostnames, or secret keys are ever sent
---
### var_gpu
**Type:** Boolean/Toggle
**Options:** `yes` or `no`
**Default:** `no`
**Description:** Enable GPU passthrough for the container.
```bash
var_gpu=yes # Enable GPU passthrough (auto-detect)
var_gpu=no # Disable GPU passthrough (default)
```
**Features enabled:**
- Auto-detects Intel (QuickSync), NVIDIA, and AMD GPUs
- Passes through `/dev/dri` and render nodes
- Configures appropriate container permissions
- Crucial for media servers (Plex, Jellyfin, Immich)
**Prerequisites:**
- Host drivers installed correctly
- Hardware present and visible to Proxmox
- IOMMU enabled (for some configurations)
---
### var_tun
**Type:** Boolean/Toggle
**Options:** `yes` or `no`
**Default:** `no`
**Description:** Enable TUN/TAP device support.
```bash
var_tun=yes # Enable TUN/TAP support
var_tun=no # Disable TUN/TAP support (default)
```
**Required for:**
- VPN software (WireGuard, OpenVPN)
- Network tunneling (Tailscale, ZeroTier)
- Custom network bridges
---
### var_keyctl ### var_keyctl
**Type:** Boolean (0 or 1) **Type:** Boolean (0 or 1)
@@ -623,14 +560,13 @@ var_keyctl=0 # Keyctl disabled
### var_fuse ### var_fuse
**Type:** Boolean/Toggle **Type:** Boolean (0 or 1)
**Options:** `yes` or `no` **Default:** `0`
**Default:** `no`
**Description:** Enable FUSE filesystem support. **Description:** Enable FUSE filesystem support.
```bash ```bash
var_fuse=yes # FUSE enabled var_fuse=1 # FUSE enabled
var_fuse=no # FUSE disabled var_fuse=0 # FUSE disabled
``` ```
**Required for:** **Required for:**

View File

@@ -57,7 +57,7 @@ pveversion
### 2. Network Connectivity ### 2. Network Connectivity
```bash ```bash
# Test GitHub access # Test GitHub access
curl -I https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh curl -I https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh
# Test internet connectivity # Test internet connectivity
ping -c 1 1.1.1.1 ping -c 1 1.1.1.1
@@ -108,8 +108,6 @@ var_cpu=4 \
var_ram=4096 \ var_ram=4096 \
var_disk=30 \ var_disk=30 \
var_hostname=production-app \ var_hostname=production-app \
var_os=debian \
var_version=13 \
var_brg=vmbr0 \ var_brg=vmbr0 \
var_net=dhcp \ var_net=dhcp \
var_ipv6_method=none \ var_ipv6_method=none \
@@ -119,7 +117,7 @@ var_nesting=1 \
var_tags=production,automated \ var_tags=production,automated \
var_protection=yes \ var_protection=yes \
var_verbose=no \ var_verbose=no \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
echo "✓ Container deployed successfully" echo "✓ Container deployed successfully"
``` ```
@@ -153,7 +151,7 @@ var_gateway=192.168.1.1 \
**Step 1: Create defaults once (interactive)** **Step 1: Create defaults once (interactive)**
```bash ```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pihole.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/pihole.sh)"
# Select "Advanced Settings" → Configure → Save as "App Defaults" # Select "Advanced Settings" → Configure → Save as "App Defaults"
``` ```
@@ -163,30 +161,10 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/Proxmo
# deploy-with-defaults.sh # deploy-with-defaults.sh
# App defaults are loaded automatically # App defaults are loaded automatically
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pihole.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/pihole.sh)"
# Script will use /usr/local/community-scripts/defaults/pihole.vars # Script will use /usr/local/community-scripts/defaults/pihole.vars
``` ```
### Advanced Configuration Variables
Beyond the basic resource settings, you can control advanced container features:
| Variable | Description | Options |
|----------|-------------|---------|
| `var_os` | Operating system template | `debian`, `ubuntu`, `alpine` |
| `var_version` | OS version | `12`, `13` (Debian), `22.04`, `24.04` (Ubuntu) |
| `var_gpu` | Enable GPU passthrough | `yes`, `no` (Default: `no`) |
| `var_tun` | Enable TUN/TAP device | `yes`, `no` (Default: `no`) |
| `var_nesting` | Enable nesting | `1`, `0` (Default: `1`) |
**Example with GPU and TUN:**
```bash
var_gpu=yes \
var_tun=yes \
var_hostname=transcoder \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/plex.sh)"
```
--- ---
## Batch Deployments ## Batch Deployments
@@ -199,14 +177,14 @@ var_hostname=transcoder \
#!/bin/bash #!/bin/bash
# batch-deploy-simple.sh # batch-deploy-simple.sh
apps=("thingsboard" "qui" "flatnotes") apps=("debian" "ubuntu" "alpine")
for app in "${apps[@]}"; do for app in "${apps[@]}"; do
echo "Deploying $app..." echo "Deploying $app..."
var_hostname="$app-server" \ var_hostname="$app-container" \
var_cpu=2 \ var_cpu=2 \
var_ram=2048 \ var_ram=2048 \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${app}.sh)"
echo "$app deployed" echo "$app deployed"
sleep 5 # Wait between deployments sleep 5 # Wait between deployments
@@ -220,10 +198,10 @@ done
# batch-deploy-advanced.sh - Deploy multiple containers with individual configs # batch-deploy-advanced.sh - Deploy multiple containers with individual configs
declare -A CONTAINERS=( declare -A CONTAINERS=(
["beszel"]="1:512:8:vmbr0:monitoring" ["pihole"]="2:1024:8:vmbr0:dns,network"
["qui"]="2:1024:10:vmbr0:torrent,ui" ["homeassistant"]="4:4096:20:vmbr0:automation,ha"
["thingsboard"]="6:8192:50:vmbr1:iot,industrial" ["docker"]="6:8192:50:vmbr1:containers,docker"
["dockge"]="2:2048:10:vmbr0:docker,management" ["nginx"]="2:2048:10:vmbr0:webserver,proxy"
) )
for app in "${!CONTAINERS[@]}"; do for app in "${!CONTAINERS[@]}"; do
@@ -250,7 +228,7 @@ for app in "${!CONTAINERS[@]}"; do
var_ipv6_method=none \ var_ipv6_method=none \
var_ssh=yes \ var_ssh=yes \
var_tags="$tags,automated" \ var_tags="$tags,automated" \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)" 2>&1 | tee "deploy-${app}.log" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${app}.sh)" 2>&1 | tee "deploy-${app}.log"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "$app deployed successfully" echo "$app deployed successfully"
@@ -285,7 +263,7 @@ deploy_container() {
var_disk="$disk" \ var_disk="$disk" \
var_hostname="$app" \ var_hostname="$app" \
var_net=dhcp \ var_net=dhcp \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)" \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${app}.sh)" \
&> "deploy-${app}.log" &> "deploy-${app}.log"
echo "[$app] ✓ Completed" echo "[$app] ✓ Completed"
@@ -316,7 +294,7 @@ echo "All deployments complete!"
```yaml ```yaml
--- ---
# playbook-proxmox.yml # playbook-proxmox.yml
- name: Deploy ProxmoxVE Containers - name: Deploy ProxmoxVED Containers
hosts: proxmox_hosts hosts: proxmox_hosts
become: yes become: yes
tasks: tasks:
@@ -330,7 +308,7 @@ echo "All deployments complete!"
var_net=dhcp \ var_net=dhcp \
var_ssh=yes \ var_ssh=yes \
var_tags=ansible,automated \ var_tags=ansible,automated \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
args: args:
executable: /bin/bash executable: /bin/bash
register: deploy_result register: deploy_result
@@ -387,7 +365,7 @@ echo "All deployments complete!"
var_ssh=yes \ var_ssh=yes \
var_ssh_authorized_key="{{ ssh_key }}" \ var_ssh_authorized_key="{{ ssh_key }}" \
var_tags="{{ item.tags }},ansible" \ var_tags="{{ item.tags }},ansible" \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/{{ item.name }}.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/{{ item.name }}.sh)"
args: args:
executable: /bin/bash executable: /bin/bash
loop: "{{ containers }}" loop: "{{ containers }}"
@@ -439,7 +417,7 @@ resource "null_resource" "deploy_container" {
"var_disk=${each.value.disk}", "var_disk=${each.value.disk}",
"var_hostname=${each.key}", "var_hostname=${each.key}",
"var_net=dhcp", "var_net=dhcp",
"bash -c \"$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${each.value.template}.sh)\"" "bash -c \"$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${each.value.template}.sh)\""
] ]
connection { connection {
@@ -520,7 +498,7 @@ jobs:
var_net=dhcp \ var_net=dhcp \
var_ssh=yes \ var_ssh=yes \
var_tags=ci-cd,automated \ var_tags=ci-cd,automated \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${{ github.event.inputs.container_type }}.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${{ github.event.inputs.container_type }}.sh)"
- name: Notify deployment status - name: Notify deployment status
if: success() if: success()
@@ -554,7 +532,7 @@ deploy_container:
var_hostname=gitlab-ci-container \ var_hostname=gitlab-ci-container \
var_net=dhcp \ var_net=dhcp \
var_tags=gitlab-ci,automated \ var_tags=gitlab-ci,automated \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
EOF EOF
only: only:
- main - main
@@ -586,7 +564,7 @@ deploy_container() {
var_hostname="$HOSTNAME" \ var_hostname="$HOSTNAME" \
var_net=dhcp \ var_net=dhcp \
var_ssh=yes \ var_ssh=yes \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${APP}.sh)" 2>&1 | tee deploy.log bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${APP}.sh)" 2>&1 | tee deploy.log
return ${PIPESTATUS[0]} return ${PIPESTATUS[0]}
} }
@@ -678,7 +656,7 @@ deploy() {
var_hostname="$HOSTNAME" \ var_hostname="$HOSTNAME" \
var_cpu=4 \ var_cpu=4 \
var_ram=4096 \ var_ram=4096 \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${APP}.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${APP}.sh)"
return $? return $?
} }
@@ -781,7 +759,7 @@ deploy_secure() {
var_protection=yes \ var_protection=yes \
var_tags=production,secure,automated \ var_tags=production,secure,automated \
var_verbose=no \ var_verbose=no \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${APP}.sh)" 2>&1 | tee -a "$LOG_FILE" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${APP}.sh)" 2>&1 | tee -a "$LOG_FILE"
if [ ${PIPESTATUS[0]} -eq 0 ]; then if [ ${PIPESTATUS[0]} -eq 0 ]; then
log "✓ Deployment successful" log "✓ Deployment successful"
@@ -846,7 +824,7 @@ SSH_KEYS=$(load_ssh_keys)
var_ssh=yes \ var_ssh=yes \
var_ssh_authorized_key="$SSH_KEYS" \ var_ssh_authorized_key="$SSH_KEYS" \
var_hostname=multi-key-server \ var_hostname=multi-key-server \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
``` ```
--- ---
@@ -925,7 +903,7 @@ deploy_from_config() {
var_ssh=yes \ var_ssh=yes \
var_tags="$tags,automated" \ var_tags="$tags,automated" \
var_protection=yes \ var_protection=yes \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${app}.sh)"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
log_success "Deployed: $name" log_success "Deployed: $name"

View File

@@ -56,7 +56,7 @@ get_error_description 255 # "Unknown critical error, often due to missing perm
- `DIAGNOSTICS` must be set to "yes" - `DIAGNOSTICS` must be set to "yes"
- `RANDOM_UUID` must be set and not empty - `RANDOM_UUID` must be set and not empty
**API Endpoint**: `https://api.community-scripts.org/dev/upload` **API Endpoint**: `http://api.community-scripts.org/dev/upload`
**JSON Payload Structure**: **JSON Payload Structure**:
```json ```json
@@ -110,7 +110,7 @@ post_to_api
- `curl` command must be available - `curl` command must be available
- `RANDOM_UUID` must be set and not empty - `RANDOM_UUID` must be set and not empty
**API Endpoint**: `https://api.community-scripts.org/dev/upload` **API Endpoint**: `http://api.community-scripts.org/dev/upload`
**JSON Payload Structure**: **JSON Payload Structure**:
```json ```json
@@ -167,7 +167,7 @@ post_to_api_vm
- `RANDOM_UUID` must be set and not empty - `RANDOM_UUID` must be set and not empty
- POST_UPDATE_DONE must be false (prevents duplicates) - POST_UPDATE_DONE must be false (prevents duplicates)
**API Endpoint**: `https://api.community-scripts.org/dev/upload/updatestatus` **API Endpoint**: `http://api.community-scripts.org/dev/upload/updatestatus`
**JSON Payload Structure**: **JSON Payload Structure**:
```json ```json

View File

@@ -461,7 +461,7 @@ check_api_health() {
echo "Error description test: $test_error" echo "Error description test: $test_error"
# Test API connectivity (without sending data) # Test API connectivity (without sending data)
local api_url="https://api.community-scripts.org/dev/upload" local api_url="http://api.community-scripts.org/dev/upload"
if curl -s --head "$api_url" >/dev/null 2>&1; then if curl -s --head "$api_url" >/dev/null 2>&1; then
echo "API endpoint is reachable" echo "API endpoint is reachable"
else else

View File

@@ -438,34 +438,6 @@ default_var_settings() # Save global defaults
maybe_offer_save_app_defaults() # Save app defaults maybe_offer_save_app_defaults() # Save app defaults
``` ```
### Container Resource & ID Management
#### `validate_container_id()`
**Purpose**: Validates if a container ID is available for use.
**Parameters**: `ctid` (Integer)
**Returns**: `0` if available, `1` if already in use or invalid.
**Description**: Checks for existing config files in `/etc/pve/lxc/` or `/etc/pve/qemu-server/`, and verifies LVM logical volumes.
#### `get_valid_container_id()`
**Purpose**: Returns the next available, unused container ID.
**Parameters**: `suggested_id` (Optional)
**Returns**: A valid container ID string.
**Description**: If the suggested ID is taken, it increments until it finds an available one.
#### `maxkeys_check()`
**Purpose**: Ensures host kernel parameters support high numbers of keys (required for some apps).
**Parameters**: None
**Description**: Checks and optionally updates `kernel.keys.maxkeys` and `kernel.keys.maxbytes`.
#### `get_current_ip()`
**Purpose**: Retrieves the current IP address of the container.
**Parameters**: `ctid` (Integer)
**Returns**: IP address string.
#### `update_motd_ip()`
**Purpose**: Updates the Message of the Day (MOTD) file with the container's IP.
**Parameters**: None
## Function Error Handling ## Function Error Handling
### Validation Functions ### Validation Functions

View File

@@ -60,10 +60,10 @@ export var_gateway="192.168.1.1"
export var_ip="192.168.1.101" export var_ip="192.168.1.101"
export var_vlan="100" export var_vlan="100"
export var_mtu="9000" export var_mtu="9000"
export var_template_storage="ssd-storage" export var_template_storage="nfs-storage"
export var_container_storage="ssd-storage" export var_container_storage="ssd-storage"
export var_fuse="yes" export ENABLE_FUSE="true"
export var_tun="yes" export ENABLE_TUN="true"
export SSH="true" export SSH="true"
# Execute build.func # Execute build.func

View File

@@ -20,19 +20,14 @@ Complete alphabetical reference of all functions in tools.func with parameters,
- `setup_nodejs(VERSION)` - Install Node.js and npm - `setup_nodejs(VERSION)` - Install Node.js and npm
- `setup_php(VERSION)` - Install PHP-FPM and CLI - `setup_php(VERSION)` - Install PHP-FPM and CLI
- `setup_python(VERSION)` - Install Python 3 with pip - `setup_python(VERSION)` - Install Python 3 with pip
- `setup_uv()` - Install Python uv (modern & fast)
- `setup_ruby(VERSION)` - Install Ruby with gem - `setup_ruby(VERSION)` - Install Ruby with gem
- `setup_golang(VERSION)` - Install Go programming language - `setup_golang(VERSION)` - Install Go programming language
- `setup_java(VERSION)` - Install OpenJDK (Adoptium)
**Databases**: **Databases**:
- `setup_mariadb()` - Install MariaDB server - `setup_mariadb()` - Install MariaDB server (distro packages by default)
- `setup_mariadb_db()` - Create user/db in MariaDB
- `setup_postgresql(VERSION)` - Install PostgreSQL - `setup_postgresql(VERSION)` - Install PostgreSQL
- `setup_postgresql_db()` - Create user/db in PostgreSQL
- `setup_mongodb(VERSION)` - Install MongoDB - `setup_mongodb(VERSION)` - Install MongoDB
- `setup_redis(VERSION)` - Install Redis cache - `setup_redis(VERSION)` - Install Redis cache
- `setup_meilisearch()` - Install Meilisearch engine
**Web Servers**: **Web Servers**:
- `setup_nginx()` - Install Nginx - `setup_nginx()` - Install Nginx
@@ -49,7 +44,6 @@ Complete alphabetical reference of all functions in tools.func with parameters,
- `setup_docker_compose()` - Install Docker Compose - `setup_docker_compose()` - Install Docker Compose
- `setup_composer()` - Install PHP Composer - `setup_composer()` - Install PHP Composer
- `setup_build_tools()` - Install build-essential - `setup_build_tools()` - Install build-essential
- `setup_yq()` - Install mikefarah/yq processor
**Monitoring**: **Monitoring**:
- `setup_grafana()` - Install Grafana - `setup_grafana()` - Install Grafana
@@ -66,13 +60,13 @@ Complete alphabetical reference of all functions in tools.func with parameters,
## Core Functions ## Core Functions
### install_packages_with_retry() ### pkg_install()
Install one or more packages safely with automatic retry logic (3 attempts), APT refresh, and lock handling. Install one or more packages safely with automatic retry logic and error handling.
**Signature**: **Signature**:
```bash ```bash
install_packages_with_retry PACKAGE1 [PACKAGE2 ...] pkg_install PACKAGE1 [PACKAGE2 ...]
``` ```
**Parameters**: **Parameters**:
@@ -80,122 +74,66 @@ install_packages_with_retry PACKAGE1 [PACKAGE2 ...]
**Returns**: **Returns**:
- `0` - All packages installed successfully - `0` - All packages installed successfully
- `1` - Installation failed after all retries - `1` - Installation failed after retries
**Features**: **Environment Variables**:
- Automatically sets `DEBIAN_FRONTEND=noninteractive` - `$STD` - Output suppression (`silent` or empty)
- Handles DPKG lock errors with `dpkg --configure -a`
- Retries on transient network or APT failures
**Example**: **Example**:
```bash ```bash
install_packages_with_retry curl wget git pkg_install curl wget git
``` ```
--- ---
### upgrade_packages_with_retry() ### pkg_update()
Upgrades installed packages with the same robust retry logic as the installation helper. Update package lists with automatic retry logic for network failures.
**Signature**: **Signature**:
```bash ```bash
upgrade_packages_with_retry pkg_update
``` ```
**Parameters**: None
**Returns**: **Returns**:
- `0` - Upgrade successful - `0` - Package lists updated
- `1` - Upgrade failed - `1` - Failed after 3 retries
---
### fetch_and_deploy_gh_release()
The primary tool for downloading and installing software from GitHub Releases. Supports binaries, tarballs, and Debian packages.
**Signature**:
```bash
fetch_and_deploy_gh_release APPREPO TYPE [VERSION] [DEST] [ASSET_PATTERN]
```
**Environment Variables**:
- `APPREPO`: GitHub repository (e.g., `owner/repo`)
- `TYPE`: Asset type (`binary`, `tarball`, `prebuild`, `singlefile`)
- `VERSION`: Specific tag or `latest` (Default: `latest`)
- `DEST`: Target directory (Default: `/opt/$APP`)
- `ASSET_PATTERN`: Regex or string pattern to match the release asset (Required for `prebuild` and `singlefile`)
**Supported Operation Modes**:
- `tarball`: Downloads and extracts the source tarball.
- `binary`: Detects host architecture and installs a `.deb` package using `apt` or `dpkg`.
- `prebuild`: Downloads and extracts a pre-built binary archive (supports `.tar.gz`, `.zip`, `.tgz`, `.txz`).
- `singlefile`: Downloads a single binary file to the destination.
**Environment Variables**:
- `CLEAN_INSTALL=1`: Removes all contents of the destination directory before extraction.
- `DPKG_FORCE_CONFOLD=1`: Forces `dpkg` to keep old config files during package updates.
- `SYSTEMD_OFFLINE=1`: Used automatically for `.deb` installs to prevent systemd-tmpfiles failures in unprivileged containers.
**Example**: **Example**:
```bash ```bash
fetch_and_deploy_gh_release "muesli/duf" "binary" "latest" "/opt/duf" "duf_.*_linux_amd64.tar.gz" pkg_update
``` ```
--- ---
### check_for_gh_release() ### pkg_remove()
Checks if a newer version is available on GitHub compared to the installed version. Remove packages completely including dependencies.
**Signature**: **Signature**:
```bash ```bash
check_for_gh_release APP REPO pkg_remove PACKAGE1 [PACKAGE2 ...]
``` ```
**Parameters**:
- `PACKAGE1, PACKAGE2, ...` - Package names to remove
**Returns**:
- `0` - Packages removed
- `1` - Removal failed
**Example**: **Example**:
```bash ```bash
if check_for_gh_release "nodejs" "nodesource/distributions"; then pkg_remove old-package outdated-tool
# update logic
fi
```
---
### prepare_repository_setup()
Performs safe repository preparation by cleaning up old files, keyrings, and ensuring the APT system is in a working state.
**Signature**:
```bash
prepare_repository_setup REPO_NAME [REPO_NAME2 ...]
```
**Example**:
```bash
prepare_repository_setup "mariadb" "mysql"
```
---
### verify_tool_version()
Validates if the installed major version matches the expected version.
**Signature**:
```bash
verify_tool_version NAME EXPECTED INSTALLED
```
**Example**:
```bash
verify_tool_version "nodejs" "22" "$(node -v | grep -oP '^v\K[0-9]+')"
``` ```
--- ---
### setup_deb822_repo() ### setup_deb822_repo()
Add repository in modern deb822 format. Add repository in modern deb822 format (recommended over legacy format).
**Signature**: **Signature**:
```bash ```bash
@@ -250,234 +188,12 @@ cleanup_repo_metadata
## Tool Installation Functions ## Tool Installation Functions
### setup_nodejs() ### setup_nodejs(VERSION)
Install Node.js and npm from official repositories. Handles legacy version cleanup (nvm) automatically. Install Node.js and npm from official repositories.
**Signature**: **Signature**:
```bash ```bash
setup_nodejs
```
**Environment Variables**:
- `NODE_VERSION`: Major version to install (e.g. "20", "22", "24"). Default: "24".
- `NODE_MODULE`: Optional npm package to install globally during setup (e.g. "pnpm", "yarn").
**Example**:
```bash
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
```
---
### setup_php()
Install PHP with configurable extensions and FPM/Apache integration.
**Signature**:
```bash
setup_php
```
**Environment Variables**:
- `PHP_VERSION`: Version to install (e.g. "8.3", "8.4"). Default: "8.4".
- `PHP_MODULE`: Comma-separated list of additional extensions.
- `PHP_FPM`: Set to "YES" to install php-fpm.
- `PHP_APACHE`: Set to "YES" to install libapache2-mod-php.
**Example**:
```bash
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="mysql,xml,zip" setup_php
```
---
### setup_mariadb_db()
Creates a new MariaDB database and a dedicated user with all privileges. Automatically generates a password if not provided and saves it to a credentials file.
**Environment Variables**:
- `MARIADB_DB_NAME`: Name of the database (required)
- `MARIADB_DB_USER`: Name of the database user (required)
- `MARIADB_DB_PASS`: User password (optional, auto-generated if omitted)
**Example**:
```bash
MARIADB_DB_NAME="myapp" MARIADB_DB_USER="myapp_user" setup_mariadb_db
```
---
### setup_postgresql_db()
Creates a new PostgreSQL database and a dedicated user/role with all privileges. Automatically generates a password if not provided and saves it to a credentials file.
**Environment Variables**:
- `PG_DB_NAME`: Name of the database (required)
- `PG_DB_USER`: Name of the database user (required)
- `PG_DB_PASS`: User password (optional, auto-generated if omitted)
---
### setup_java()
Installs Temurin JDK.
**Signature**:
```bash
JAVA_VERSION="21" setup_java
```
**Parameters**:
- `JAVA_VERSION` - JDK version (e.g., "17", "21") (default: "21")
**Example**:
```bash
JAVA_VERSION="17" setup_java
```
---
### setup_uv()
Installs `uv` (modern Python package manager).
**Signature**:
```bash
PYTHON_VERSION="3.13" setup_uv
```
**Parameters**:
- `PYTHON_VERSION` - Optional Python version to pre-install via uv (e.g., "3.12", "3.13")
**Example**:
```bash
PYTHON_VERSION="3.13" setup_uv
```
---
### setup_go()
Installs Go programming language.
**Signature**:
```bash
GO_VERSION="1.23" setup_go
```
**Parameters**:
- `GO_VERSION` - Go version to install (default: "1.23")
**Example**:
```bash
GO_VERSION="1.24" setup_go
```
---
### setup_yq()
Installs `yq` (YAML processor).
**Signature**:
```bash
setup_yq
```
**Example**:
```bash
setup_yq
```
---
### setup_composer()
Installs PHP Composer.
**Signature**:
```bash
setup_composer
```
**Example**:
```bash
setup_composer
```
---
### setup_meilisearch()
Install and configure Meilisearch search engine.
**Environment Variables**:
- `MEILISEARCH_BIND`: Address and port to bind to (Default: "127.0.0.1:7700")
- `MEILISEARCH_ENV`: Environment mode (Default: "production")
---
### setup_yq()
Install the `mikefarah/yq` YAML processor. Removes existing non-compliant versions.
**Example**:
```bash
setup_yq
yq eval '.app.version = "1.0.0"' -i config.yaml
```
---
### setup_composer()
Install or update the PHP Composer package manager. Handles `COMPOSER_ALLOW_SUPERUSER` automatically and performs self-updates if already installed.
**Example**:
```bash
setup_php
setup_composer
$STD composer install --no-dev
```
---
### setup_build_tools()
Install the `build-essential` package suite for compiling software.
---
### setup_uv()
Install the modern Python package manager `uv`. Extremely fast replacement for pip/venv.
**Environment Variables**:
- `PYTHON_VERSION`: Major.Minor version to ensure is installed.
**Example**:
```bash
PYTHON_VERSION="3.12" setup_uv
uv sync --locked
```
---
### setup_java()
Install OpenJDK via the Adoptium repository.
**Environment Variables**:
- `JAVA_VERSION`: Major version to install (e.g. "17", "21"). Default: "21".
**Example**:
```bash
JAVA_VERSION="21" setup_java
```
---
```bash
setup_nodejs VERSION setup_nodejs VERSION
``` ```

View File

@@ -40,15 +40,14 @@ vm/OsName-vm.sh (host-side)
See `/vm` directory for all VM creation scripts. Examples: See `/vm` directory for all VM creation scripts. Examples:
- `ubuntu2504-vm.sh` - Ubuntu 25.04 VM (Latest) - `ubuntu2404-vm.sh` - Ubuntu 24.04 VM
- `ubuntu2404-vm.sh` - Ubuntu 24.04 VM (LTS) - `ubuntu2204-vm.sh` - Ubuntu 22.04 VM
- `debian-13-vm.sh` - Debian 13 VM (Trixie) - `debian-vm.sh` - Debian VM
- `archlinux-vm.sh` - Arch Linux VM - `debian-13-vm.sh` - Debian 13 VM
- `haos-vm.sh` - Home Assistant OS
- `mikrotik-routeros.sh` - MikroTik RouterOS
- `openwrt-vm.sh` - OpenWrt VM
- `opnsense-vm.sh` - OPNsense firewall - `opnsense-vm.sh` - OPNsense firewall
- `umbrel-os-vm.sh` - Umbrel OS VM - `haos-vm.sh` - Home Assistant OS
- `unifi-os-vm.sh` - Unifi Dream Machine
- `k3s-vm.sh` - Kubernetes lightweight
- And 10+ more... - And 10+ more...
## VM vs Container ## VM vs Container

View File

@@ -1,44 +0,0 @@
{
"name": "Bichon",
"slug": "bichon",
"categories": [
7
],
"date_created": "2026-02-07",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 15630,
"documentation": "https://github.com/rustmailer/bichon/wiki",
"config_path": "/opt/bichon/bichon.env",
"website": "https://github.com/rustmailer/bichon",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/bichon.webp",
"description": "Bichon is an open-source email archiving system that synchronizes emails from IMAP servers, indexes them for full-text search, and provides a REST API for programmatic access. Unlike email clients, Bichon is designed for archiving and searching rather than sending/receiving emails. It runs as a standalone server application that continuously synchronizes configured email accounts and maintains a searchable local archive.",
"install_methods": [
{
"type": "default",
"script": "ct/bichon.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "admin",
"password": "admin@bichon"
},
"notes": [
{
"text": "The Disk space initially allocated by the script is only a placeholder, as we can't know how much space you will ever need. You should increase it to match your workload.",
"type": "info"
},
{
"text": "Please copy your `BICHON_ENCRYPT_PASSWORD` from `/opt/bichon/bichon.env` to a safe place.",
"type": "warning"
}
]
}

View File

@@ -1,48 +0,0 @@
{
"name": "Checkmate",
"slug": "checkmate",
"categories": [
9
],
"date_created": "2026-02-07",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 5173,
"documentation": "https://github.com/bluewave-labs/Checkmate#readme",
"website": "https://github.com/bluewave-labs/Checkmate",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/checkmate.webp",
"config_path": "/opt/checkmate/server/.env",
"description": "Checkmate is an open source uptime and infrastructure monitoring application that helps you track the availability and performance of your services.",
"install_methods": [
{
"type": "default",
"script": "ct/checkmate.sh",
"resources": {
"cpu": 2,
"ram": 4096,
"hdd": 10,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Create your admin account on first login via the web interface.",
"type": "info"
},
{
"text": "Server API runs on port 52345, Client UI on port 5173.",
"type": "info"
},
{
"text": "For PageSpeed monitoring, add a Google PageSpeed API key to the server .env file.",
"type": "info"
}
]
}

Some files were not shown because too many files have changed in this diff Show More