mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-14 11:13:27 +01:00
Compare commits
171 Commits
2025-12-01
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
| 11cbf1b986 | |||
| 7a1e71af62 | |||
| e3a201db02 | |||
| 721ed4ad1a | |||
| bf6fdb43d9 | |||
| 5cc1eae0d2 | |||
| 1c175eb012 | |||
| f6f131efab | |||
| e4d5ce221b | |||
| 4e182bd5b9 | |||
| 12a7ecd85d | |||
| b658959c7b | |||
| 5eb9d2bcdf | |||
| 7d37743981 | |||
| b0e7cdfe13 | |||
| 31c19bed09 | |||
| bff0650d72 | |||
| d9b05882a3 | |||
| 31dbf2554c | |||
| f95cc5a7ad | |||
| 3fb9d02f36 | |||
| a748be9a1f | |||
| 4d4ced6b63 | |||
| a5d017c83b | |||
| 5378d822f8 | |||
| 243cb34d47 | |||
| 59699425f8 | |||
| 155a8571ba | |||
| 1cae72bdec | |||
| 531ecad4c7 | |||
| 9e8ab9de01 | |||
| 70557798ec | |||
| 4b554900ca | |||
| 9f84eae07f | |||
| ba5bdd94ad | |||
| d18baa2177 | |||
| 779c06f232 | |||
| 9e2b6524c4 | |||
| a328d7b8ba | |||
| dfa4d82951 | |||
| 5e5a8cd104 | |||
| 0da3231d3c | |||
| 5a6a30e594 | |||
| 97ac2520ec | |||
| bd5fe17228 | |||
| f42586c083 | |||
| fab5539c82 | |||
| 1ecb5bbeab | |||
| 64dbd4e9f7 | |||
| 2ba63b28f0 | |||
| 2a3b09b413 | |||
| d6ca5676df | |||
| 478194ba1a | |||
| d241c03b3d | |||
| 8cd037ff88 | |||
| fb15c13833 | |||
| e95541260b | |||
| a37ac14907 | |||
| 74a870bc5c | |||
| e0f65f2db8 | |||
| 01b246f375 | |||
| 53dd0efddd | |||
| f31978a503 | |||
| 4971bc46be | |||
| 28b894db2b | |||
| 6ec4aeb4f0 | |||
| 6409d64b93 | |||
| 08cb3cc76a | |||
| 170d44e2aa | |||
| b436ba548d | |||
| ed435d58d6 | |||
| dd5993d7ab | |||
| 0c2521c05e | |||
| 89595627a6 | |||
| a0e8ee2130 | |||
| e462aba7c2 | |||
| 338762b30b | |||
| bda700a6c3 | |||
| 976b9188a0 | |||
| 2ef2ce0a4b | |||
| 6dc73981d9 | |||
| f64bed06d0 | |||
| ca4de7bbe9 | |||
| 00ccef68bf | |||
| e0dc02a3e7 | |||
| 1c325f6885 | |||
| 64407dfccb | |||
| c7f04f379c | |||
| 86491da8b5 | |||
| 0d6ea7fa59 | |||
| a0c1243c94 | |||
| 2799201cfe | |||
| f971c077d6 | |||
| d2e9997d0d | |||
| 316082eaaa | |||
| a81c074228 | |||
| 33ce3fdbc5 | |||
| e73f35e2c8 | |||
| eb53af44c9 | |||
| 7ce32cc320 | |||
| 0e263ad54e | |||
| 85c20e3b25 | |||
| 268464781e | |||
| 775caae9c9 | |||
| 0f7c201b57 | |||
| 5780dc1532 | |||
| 5333e9f4b6 | |||
| 513e11569b | |||
| 9ed56051b9 | |||
| 4b496ebf2e | |||
| 530438a721 | |||
| 62201a0872 | |||
| 8e93f5cb1d | |||
| 838e663a6d | |||
| a826769899 | |||
| a5e6810872 | |||
| 7c73dac819 | |||
| cf616cbc9f | |||
| 84057a657a | |||
| fc1389ce8f | |||
| 952c35ecc7 | |||
| d41538e1b1 | |||
| 3b84a80f7a | |||
| cb7fb45edb | |||
| 462b68637d | |||
| fb12b1eea6 | |||
| 41329f919a | |||
| 72efc88a96 | |||
| d29a11acda | |||
| 5fd2a7cade | |||
| 3d4e7ea986 | |||
| 7d40b03359 | |||
| 1c9e03d6b7 | |||
| 056d064584 | |||
| 1603d930ae | |||
| 4801aca8aa | |||
| 5d1c6a7460 | |||
| c34a229f02 | |||
| 6944797213 | |||
| 1b1677ab7c | |||
| 833866d097 | |||
| 277abdf0e4 | |||
| 3ab710472c | |||
| a06cab39a9 | |||
| 0f1db8cc8e | |||
| fc2f72b2ac | |||
| 433aafe365 | |||
| 7978c3176c | |||
| e53bb2d825 | |||
| d079ac7d67 | |||
| f513fd09db | |||
| fb118eb0ca | |||
| dd440be505 | |||
| dcbec67b65 | |||
| 34b17c4b18 | |||
| 3bc2c968ab | |||
| 188e33485b | |||
| b55deb69ac | |||
| 787882db51 | |||
| 3e2c9c997c | |||
| 55fed2209d | |||
| b4feb4331d | |||
| 183dc7ac69 | |||
| d52908bd6e | |||
| 327cb37a55 | |||
| d2f86996db | |||
| 8cf12d7f4d | |||
| a2c31c7eaf | |||
| fa5ccdf3f1 | |||
| bd21c9f8ad | |||
| 6341ca0cf7 |
14
.github/CONTRIBUTOR_AND_GUIDES/CODE-AUDIT.md
generated
vendored
14
.github/CONTRIBUTOR_AND_GUIDES/CODE-AUDIT.md
generated
vendored
@ -1,14 +0,0 @@
|
||||
<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>
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
129
.github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md
generated
vendored
129
.github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md
generated
vendored
@ -1,129 +0,0 @@
|
||||
|
||||
# Community Scripts Contribution Guide
|
||||
|
||||
## **Welcome to the communty-scripts Repository!**
|
||||
|
||||
📜 These documents outline the essential coding standards for all our scripts and JSON files. Adhering to these standards ensures that our codebase remains consistent, readable, and maintainable. By following these guidelines, we can improve collaboration, reduce errors, and enhance the overall quality of our project.
|
||||
|
||||
### Why Coding Standards Matter
|
||||
|
||||
Coding standards are crucial for several reasons:
|
||||
|
||||
1. **Consistency**: Consistent code is easier to read, understand, and maintain. It helps new team members quickly get up to speed and reduces the learning curve.
|
||||
2. **Readability**: Clear and well-structured code is easier to debug and extend. It allows developers to quickly identify and fix issues.
|
||||
3. **Maintainability**: Code that follows a standard structure is easier to refactor and update. It ensures that changes can be made with minimal risk of introducing new bugs.
|
||||
4. **Collaboration**: When everyone follows the same standards, it becomes easier to collaborate on code. It reduces friction and misunderstandings during code reviews and merges.
|
||||
|
||||
### Scope of These Documents
|
||||
|
||||
These documents cover the coding standards for the following types of files in our project:
|
||||
|
||||
- **`install/$AppName-install.sh` Scripts**: These scripts are responsible for the installation of applications.
|
||||
- **`ct/$AppName.sh` Scripts**: These scripts handle the creation and updating of containers.
|
||||
- **`frontend/public/json/$AppName.json`**: These files store structured data and are used for the website.
|
||||
|
||||
Each section provides detailed guidelines on various aspects of coding, including shebang usage, comments, variable naming, function naming, indentation, error handling, command substitution, quoting, script structure, and logging. Additionally, examples are provided to illustrate the application of these standards.
|
||||
|
||||
By following the coding standards outlined in this document, we ensure that our scripts and JSON files are of high quality, making our project more robust and easier to manage. Please refer to this guide whenever you create or update scripts and JSON files to maintain a high standard of code quality across the project. 📚🔍
|
||||
|
||||
Let's work together to keep our codebase clean, efficient, and maintainable! 💪🚀
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
Before contributing, please ensure that you have the following setup:
|
||||
|
||||
1. **Visual Studio Code** (recommended for script development)
|
||||
2. **Recommended VS Code Extensions:**
|
||||
- [Shell Syntax](https://marketplace.visualstudio.com/items?itemName=bmalehorn.shell-syntax)
|
||||
- [ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)
|
||||
- [Shell Format](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format)
|
||||
|
||||
### Important Notes
|
||||
- Use [AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh) and [AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh) as templates when creating new scripts. Final version of the script (the one you will push for review), must have all comments removed, except the ones in the file header.
|
||||
|
||||
---
|
||||
|
||||
# 🚀 The Application Script (ct/AppName.sh)
|
||||
|
||||
- You can find all coding standards, as well as the structure for this file [here](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md).
|
||||
- These scripts are responsible for container creation, setting the necessary variables and handling the update of the application once installed.
|
||||
|
||||
---
|
||||
|
||||
# 🛠 The Installation Script (install/AppName-install.sh)
|
||||
|
||||
- You can find all coding standards, as well as the structure for this file [here](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md).
|
||||
- These scripts are responsible for the installation of the application.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Building Your Own Scripts
|
||||
|
||||
Start with the [template script](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh)
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Contribution Process
|
||||
|
||||
All PR's related to new scripts should be made against our Dev repository first, where we can test the scripts before they are pushed and merged in the official repository.
|
||||
|
||||
**Our Dev repo is `http://www.github.com/community-scripts/ProxmoxVED`**
|
||||
|
||||
You will need to adjust paths mentioned further down this document to match the repo you're pushing the scripts to.
|
||||
|
||||
### 1. Fork the repository
|
||||
Fork to your GitHub account
|
||||
|
||||
### 2. Clone your fork on your local environment
|
||||
```bash
|
||||
git clone https://github.com/yourUserName/ForkName
|
||||
```
|
||||
|
||||
### 3. Create a new branch
|
||||
```bash
|
||||
git switch -c your-feature-branch
|
||||
```
|
||||
|
||||
### 4. Change paths in build.func install.func and AppName.sh
|
||||
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]`\
|
||||
in following files:
|
||||
|
||||
`misc/build.func`\
|
||||
`misc/install.func`\
|
||||
`ct/AppName.sh`
|
||||
|
||||
Example: `https://raw.githubusercontent.com/tremor021/PromoxVE/refs/heads/testbranch`
|
||||
|
||||
Also you need to change:\
|
||||
`https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main`\
|
||||
to\
|
||||
`https://raw.githubusercontent.com/[USER]/[REPOSITORY]/raw/[BRANCH]`\
|
||||
in `misc/install.func` in order for `update` shell command to work.\
|
||||
These changes are only while writing and testing your scripts. Before opening a Pull Request, you should change all above mentioned paths in `misc/build.func`, `misc/install.func` and `ct/AppName.sh` to point to the original paths.
|
||||
|
||||
### 4. Commit changes (without build.func and install.func!)
|
||||
```bash
|
||||
git commit -m "Your commit message"
|
||||
```
|
||||
|
||||
### 5. Push to your fork
|
||||
```bash
|
||||
git push origin your-feature-branch
|
||||
```
|
||||
|
||||
### 6. Create a Pull Request
|
||||
Open a Pull Request from your feature branch to the main branch on the Dev repository. You must only include your **$AppName.sh**, **$AppName-install.sh** and **$AppName.json** files in the pull request.
|
||||
|
||||
---
|
||||
|
||||
## 📚 Pages
|
||||
|
||||
- [CT Template: AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh)
|
||||
- [Install Template: AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh)
|
||||
- [JSON Template: AppName.json](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/json/AppName.json)
|
||||
|
||||
|
||||
44
.github/CONTRIBUTOR_AND_GUIDES/USER_SUBMITTED_GUIDES.md
generated
vendored
44
.github/CONTRIBUTOR_AND_GUIDES/USER_SUBMITTED_GUIDES.md
generated
vendored
@ -1,44 +0,0 @@
|
||||
<div align="center">
|
||||
<a href="#">
|
||||
<img src="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo.png" height="100px" />
|
||||
</a>
|
||||
</div>
|
||||
<h2 align="center">User Submitted Guides </h2>
|
||||
|
||||
<sub> In order to contribute a guide on installing with Proxmox VE Helper Scripts, you should open a pull request that adds the guide to the `USER_SUBMITTED_GUIDES.md` file. </sub>
|
||||
|
||||
[Proxmox Automation with Proxmox Helper Scripts!](https://www.youtube.com/watch?v=kcpu4z5eSEU)
|
||||
|
||||
[Installing Home Assistant OS using Proxmox 8](https://community.home-assistant.io/t/installing-home-assistant-os-using-proxmox-8/201835)
|
||||
|
||||
[How To Separate Zigbee2MQTT From Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-separate-zigbee2mqtt-from-home-assistant-in-proxmox/)
|
||||
|
||||
[How To Install Home Assistant On Proxmox: The Easy Way](https://smarthomescene.com/guides/how-to-install-home-assistant-on-proxmox-the-easy-way/)
|
||||
|
||||
[Home Assistant: Installing InfluxDB (LXC)](https://www.derekseaman.com/2023/04/home-assistant-installing-influxdb-lxc.html)
|
||||
|
||||
[Home Assistant: Proxmox Quick Start Guide](https://www.derekseaman.com/2023/10/home-assistant-proxmox-ve-8-0-quick-start-guide-2.html)
|
||||
|
||||
[Home Assistant: Installing Grafana (LXC) with Let’s Encrypt SSL](https://www.derekseaman.com/2023/04/home-assistant-installing-grafana-lxc.html)
|
||||
|
||||
[Proxmox: Plex LXC with Alder Lake Transcoding](https://www.derekseaman.com/2023/04/proxmox-plex-lxc-with-alder-lake-transcoding.html)
|
||||
|
||||
[How To Backup Home Assistant In Proxmox](https://smarthomescene.com/guides/how-to-backup-home-assistant-in-proxmox/)
|
||||
|
||||
[Running Frigate on Proxmox](https://www.homeautomationguy.io/blog/running-frigate-on-proxmox)
|
||||
|
||||
[Frigate VM on Proxmox with PCIe Coral TPU](https://www.derekseaman.com/2023/06/home-assistant-frigate-vm-on-proxmox-with-pcie-coral-tpu.html)
|
||||
|
||||
[Moving Home Assistant’s Database To MariaDB On Proxmox](https://smarthomescene.com/guides/moving-home-assistants-database-to-mariadb-on-proxmox/)
|
||||
|
||||
[How-to: Proxmox VE 7.4 to 8.0 Upgrade](https://www.derekseaman.com/2023/06/how-to-proxmox-7-4-to-8-0-upgrade.html)
|
||||
|
||||
[iGPU Transcoding In Proxmox with Jellyfin](https://www.youtube.com/watch?v=XAa_qpNmzZs)
|
||||
|
||||
[Proxmox + NetData](<https://dbt3ch.com/books/proxmox-netdata-for-better-insights-and-notifications/page/proxmox-netdata-for-better-insights-and-notifications>)
|
||||
|
||||
[Proxmox Homelab Series](<https://blog.kye.dev/proxmox-series>)
|
||||
|
||||
[The fastest installation of Docker and Portainer on Proxmox VE](https://lavr.site/en-fastest-install-docker-portainer-proxmox/)
|
||||
|
||||
[How To Setup Proxmox Backuper Server Using Helper Scripts](<https://youtu.be/6C2JOsrZZZw?si=kkrrcL_nLCDBJkOB>)
|
||||
287
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md
generated
vendored
287
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md
generated
vendored
@ -1,287 +0,0 @@
|
||||
# **AppName<span></span>.sh Scripts**
|
||||
|
||||
`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.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [**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. **File Header**
|
||||
|
||||
### 1.1 **Shebang**
|
||||
|
||||
- Use `#!/usr/bin/env bash` as the shebang.
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
```
|
||||
|
||||
### 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 -s 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
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: [YourUserName]
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: [SOURCE_URL]
|
||||
```
|
||||
|
||||
> [!NOTE]:
|
||||
>
|
||||
> - Add your username and source URL
|
||||
> - For existing scripts, add "| Co-Author [YourUserName]" after the current author
|
||||
> - Source is a URL of github repo containting source files of the application you're installing (not URL of your homepage or a blog)
|
||||
|
||||
---
|
||||
|
||||
## 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 to 2 |
|
||||
>| `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="${var_tags:-asset-management;foss}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
```
|
||||
|
||||
## 2.2 **📋 App output & base settings**
|
||||
|
||||
```bash
|
||||
header_info "$APP"
|
||||
```
|
||||
- `header_info`: Generates ASCII header for APP
|
||||
|
||||
## 2.3 **🛠 Core functions**
|
||||
|
||||
```bash
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
```
|
||||
|
||||
- `variables`: Processes input and prepares variables
|
||||
- `color`: Sets icons, colors, and formatting
|
||||
- `catch_errors`: Enables error handling
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
```
|
||||
|
||||
### 3.2 **Check APP**
|
||||
|
||||
- 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
|
||||
}
|
||||
```
|
||||
|
||||
### 3.4 **Verbosity**
|
||||
|
||||
- Use the appropriate flag (**-q** in the examples) for a command to suppress its output.
|
||||
Example:
|
||||
|
||||
```bash
|
||||
wget -q
|
||||
unzip -q
|
||||
```
|
||||
|
||||
- If a command does not come with this functionality use `$STD` to suppress it's output.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
$STD php artisan migrate --force
|
||||
$STD php artisan config:clear
|
||||
```
|
||||
|
||||
### 3.5 **Backups**
|
||||
|
||||
- Backup user data if necessary.
|
||||
- Move all user data back in the directory when the update is finished.
|
||||
|
||||
>[!NOTE]
|
||||
>This is not meant to be a permanent backup
|
||||
|
||||
Example backup:
|
||||
|
||||
```bash
|
||||
mv /opt/snipe-it /opt/snipe-it-backup
|
||||
```
|
||||
|
||||
Example config restore:
|
||||
|
||||
```bash
|
||||
cp /opt/snipe-it-backup/.env /opt/snipe-it/.env
|
||||
cp -r /opt/snipe-it-backup/public/uploads/ /opt/snipe-it/public/uploads/
|
||||
cp -r /opt/snipe-it-backup/storage/private_uploads /opt/snipe-it/storage/private_uploads
|
||||
```
|
||||
|
||||
### 3.6 **Cleanup**
|
||||
|
||||
- Do not forget to remove any temporary files/folders such as zip-files or temporary backups.
|
||||
Example:
|
||||
|
||||
```bash
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
rm -rf /opt/snipe-it-backup
|
||||
```
|
||||
|
||||
### 3.7 **No update function**
|
||||
|
||||
- In case you can not provide an update function use the following code to provide user feedback.
|
||||
|
||||
```bash
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/snipeit ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_error "Currently we don't provide an update function for this ${APP}."
|
||||
exit
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4 **End of the script**
|
||||
|
||||
- `start`: Launches Whiptail dialogue
|
||||
- `build_container`: Collects and integrates user settings
|
||||
- `description`: Sets LXC container description
|
||||
- With `echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"` you can point the user to the IP:PORT/folder needed to access the app.
|
||||
|
||||
```bash
|
||||
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}"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. **Contribution checklist**
|
||||
|
||||
- [ ] Shebang is correctly set (`#!/usr/bin/env bash`).
|
||||
- [ ] Correct link to *build.func*
|
||||
- [ ] Metadata (author, license) is included at the top.
|
||||
- [ ] Variables follow naming conventions.
|
||||
- [ ] Update function exists.
|
||||
- [ ] Update functions checks if app is installed and for new version.
|
||||
- [ ] Update function cleans up temporary files.
|
||||
- [ ] Script ends with a helpful message for the user to reach the application.
|
||||
86
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh
generated
vendored
86
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh
generated
vendored
@ -1,86 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: [YourUserName]
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: [SOURCE_URL]
|
||||
|
||||
# App Default Values
|
||||
# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole"
|
||||
APP="[APP_NAME]"
|
||||
# Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp)
|
||||
var_tags="${var_tags:-[TAGS]}"
|
||||
# Number of cores (1-X) (e.g. 4) - default are 2
|
||||
var_cpu="${var_cpu:-[CPU]}"
|
||||
# Amount of used RAM in MB (e.g. 2048 or 4096)
|
||||
var_ram="${var_ram:-[RAM]}"
|
||||
# Amount of used disk space in GB (e.g. 4 or 10)
|
||||
var_disk="${var_disk:-[DISK]}"
|
||||
# Default OS (e.g. debian, ubuntu, alpine)
|
||||
var_os="${var_os:-[OS]}"
|
||||
# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine)
|
||||
var_version="${var_version:-[VERSION]}"
|
||||
# 1 = unprivileged container, 0 = privileged container
|
||||
var_unprivileged="${var_unprivileged:-[UNPRIVILEGED]}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
# Check if installation is present | -f for file, -d for folder
|
||||
if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Crawling the new version and checking whether an update is required
|
||||
RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND])
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
# Stopping Services
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop [SERVICE_NAME]
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
# Creating Backup
|
||||
msg_info "Creating Backup"
|
||||
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS]
|
||||
msg_ok "Backup Created"
|
||||
|
||||
# Execute Update
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
[UPDATE_COMMANDS]
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
# Starting Services
|
||||
msg_info "Starting $APP"
|
||||
systemctl start [SERVICE_NAME]
|
||||
msg_ok "Started $APP"
|
||||
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf [TEMP_FILES]
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
# Last Action
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}"
|
||||
354
.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md
generated
vendored
354
.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md
generated
vendored
@ -1,354 +0,0 @@
|
||||
|
||||
# **AppName<span></span>-install.sh Scripts**
|
||||
|
||||
`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.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [**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)
|
||||
|
||||
## 1. **File header**
|
||||
|
||||
### 1.1 **Shebang**
|
||||
|
||||
- Use `#!/usr/bin/env bash` as the shebang.
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
```
|
||||
|
||||
### 1.2 **Comments**
|
||||
|
||||
- Add clear comments for script metadata, including author, copyright, and license information.
|
||||
- Use meaningful inline comments to explain complex commands or logic.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: [YourUserName]
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: [SOURCE_URL]
|
||||
```
|
||||
|
||||
> [!NOTE]:
|
||||
>
|
||||
> - Add your username
|
||||
> - When updating/reworking scripts, add "| Co-Author [YourUserName]"
|
||||
> - Source is a URL of github repo containting source files of the application you're installing (not URL of your homepage or a blog)
|
||||
|
||||
### 1.3 **Variables and function import**
|
||||
|
||||
- This sections adds the support for all needed functions and variables.
|
||||
|
||||
```bash
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 2. **Variable naming and management**
|
||||
|
||||
### 2.1 **Naming conventions**
|
||||
|
||||
- Use uppercase names for constants and environment variables.
|
||||
- Use lowercase names for local script variables.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
DB_NAME=snipeit_db # Environment-like variable (constant)
|
||||
db_user="snipeit" # Local variable
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. **Dependencies**
|
||||
|
||||
### 3.1 **Install all at once**
|
||||
|
||||
- Install all dependencies with a single command if possible
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
$STD apt-get install -y \
|
||||
composer \
|
||||
git \
|
||||
nginx
|
||||
```
|
||||
|
||||
### 3.2 **Collapse dependencies**
|
||||
|
||||
Collapse dependencies to keep the code readable.
|
||||
|
||||
Example:
|
||||
Use
|
||||
|
||||
```bash
|
||||
php8.2-{bcmath,common,ctype}
|
||||
```
|
||||
|
||||
instead of
|
||||
|
||||
```bash
|
||||
php8.2-bcmath php8.2-common php8.2-ctype
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. **Paths to application files**
|
||||
|
||||
If possible install the app and all necessary files in `/opt/`
|
||||
|
||||
---
|
||||
|
||||
## 5. **Version management**
|
||||
|
||||
### 5.1 **Install the latest release**
|
||||
|
||||
- Always try and install the latest release
|
||||
- Do not hardcode any version if not absolutely necessary
|
||||
|
||||
Example for a git 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) }')
|
||||
curl -fsSL "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
```
|
||||
|
||||
### 5.2 **Save the version for update checks**
|
||||
|
||||
- Write the installed version into a file.
|
||||
- This is used for the update function in **AppName.sh** to check for if a Update is needed.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. **Input and output management**
|
||||
|
||||
### 6.1 **User feedback**
|
||||
|
||||
- Use standard functions like `msg_info`, `msg_ok` or `msg_error` to print status messages.
|
||||
- Each `msg_info` must be followed with a `msg_ok` before any other output is made.
|
||||
- Display meaningful progress messages at key stages.
|
||||
- Taking user input with `read -p` must be outside of `msg_info`...`msg_ok` code block
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y ...
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
read -p "${TAB3}Do you wish to enable HTTPS mode? (y/N): " httpschoice
|
||||
```
|
||||
|
||||
### 6.2 **Verbosity**
|
||||
|
||||
- Use the appropiate flag (**-q** in the examples) for a command to suppres its output
|
||||
Example:
|
||||
|
||||
```bash
|
||||
wget -q
|
||||
unzip -q
|
||||
```
|
||||
|
||||
- If a command dose not come with such a functionality use `$STD` (a custom standard redirection variable) for managing output verbosity.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
$STD apt-get install -y nginx
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7. **String/File Manipulation**
|
||||
|
||||
### 7.1 **File Manipulation**
|
||||
|
||||
- Use `sed` to replace placeholder values in configuration files.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
sed -i -e "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" \
|
||||
-e "s|^DB_USERNAME=.*|DB_USERNAME=$DB_USER|" \
|
||||
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" .env
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8. **Security practices**
|
||||
|
||||
### 8.1 **Password generation**
|
||||
|
||||
- Use `openssl` to generate random passwords.
|
||||
- Use only alphanumeric values to not introduce unknown behaviour.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
```
|
||||
|
||||
### 8.2 **File permissions**
|
||||
|
||||
Explicitly set secure ownership and permissions for sensitive files.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
chown -R www-data: /opt/snipe-it
|
||||
chmod -R 755 /opt/snipe-it
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 9. **Service Configuration**
|
||||
|
||||
### 9.1 **Configuration files**
|
||||
|
||||
Use `cat <<EOF` to write configuration files in a clean and readable way.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
cat <<EOF >/etc/nginx/conf.d/snipeit.conf
|
||||
server {
|
||||
listen 80;
|
||||
root /opt/snipe-it/public;
|
||||
index index.php;
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
### 9.2 **Credential management**
|
||||
|
||||
Store the generated credentials in a file.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
USERNAME=username
|
||||
PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
{
|
||||
echo "Application-Credentials"
|
||||
echo "Username: $USERNAME"
|
||||
echo "Password: $PASSWORD"
|
||||
} >> ~/application.creds
|
||||
```
|
||||
|
||||
### 9.3 **Enviroment files**
|
||||
|
||||
Use `cat <<EOF` to write enviromental files in a clean and readable way.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
cat <<EOF >/path/to/.env
|
||||
VARIABLE="value"
|
||||
PORT=3000
|
||||
DB_NAME="${DB_NAME}"
|
||||
EOF
|
||||
```
|
||||
|
||||
### 9.4 **Services**
|
||||
|
||||
Enable affected services after configuration changes and start them right away.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
systemctl enable -q --now nginx
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 10. **Cleanup**
|
||||
|
||||
### 10.1 **Remove temporary files**
|
||||
|
||||
Remove temporary files and downloads after use.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
```
|
||||
|
||||
### 10.2 **Autoremove and autoclean**
|
||||
|
||||
Remove unused dependencies to reduce disk space usage.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
apt-get -y autoremove
|
||||
apt-get -y autoclean
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 11. **Best Practices Checklist**
|
||||
|
||||
- [ ] Shebang is correctly set (`#!/usr/bin/env bash`).
|
||||
- [ ] Metadata (author, license) is included at the top.
|
||||
- [ ] Variables follow naming conventions.
|
||||
- [ ] Sensitive values are dynamically generated.
|
||||
- [ ] Files and services have proper permissions.
|
||||
- [ ] Script cleans up temporary files.
|
||||
|
||||
---
|
||||
|
||||
### Example: High-Level Script Flow
|
||||
|
||||
1. Dependencies installation
|
||||
2. Database setup
|
||||
3. Download and configure application
|
||||
4. Service configuration
|
||||
5. Final cleanup
|
||||
78
.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh
generated
vendored
78
.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh
generated
vendored
@ -1,78 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: [YourUserName]
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: [SOURCE_URL]
|
||||
|
||||
# Import Functions und Setup
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
# Installing Dependencies
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
[PACKAGE_1] \
|
||||
[PACKAGE_2] \
|
||||
[PACKAGE_3]
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
# Template: MySQL Database
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME=[DB_NAME]
|
||||
DB_USER=[DB_USER]
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "${APPLICATION} Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/"$APP_NAME".creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
# Setup App
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/[REPO]/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL -o "${RELEASE}.zip" "https://github.com/[REPO]/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q "${RELEASE}.zip"
|
||||
mv "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}"
|
||||
#
|
||||
#
|
||||
#
|
||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
||||
msg_ok "Setup ${APPLICATION}"
|
||||
|
||||
# Creating Service (if needed)
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/"${APPLICATION}".service
|
||||
[Unit]
|
||||
Description=${APPLICATION} Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=[START_COMMAND]
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now "${APPLICATION}"
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
# Cleanup
|
||||
msg_info "Cleaning up"
|
||||
rm -f "${RELEASE}".zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
114
.github/autolabeler-config.json
generated
vendored
114
.github/autolabeler-config.json
generated
vendored
@ -4,9 +4,7 @@
|
||||
"fileStatus": "added",
|
||||
"includeGlobs": [
|
||||
"ct/**",
|
||||
"tools/**",
|
||||
"install/**",
|
||||
"misc/**",
|
||||
"turnkey/**",
|
||||
"vm/**"
|
||||
],
|
||||
@ -18,9 +16,7 @@
|
||||
"fileStatus": "modified",
|
||||
"includeGlobs": [
|
||||
"ct/**",
|
||||
"tools/**",
|
||||
"install/**",
|
||||
"misc/**",
|
||||
"turnkey/**",
|
||||
"vm/**"
|
||||
],
|
||||
@ -32,71 +28,27 @@
|
||||
"fileStatus": "removed",
|
||||
"includeGlobs": [
|
||||
"ct/**",
|
||||
"tools/**",
|
||||
"install/**",
|
||||
"misc/**",
|
||||
"turnkey/**",
|
||||
"vm/**"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"maintenance": [
|
||||
"vm": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"*.md"
|
||||
"vm/**"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"core": [
|
||||
"tools": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"misc/*.func",
|
||||
"misc/create_lxc.sh"
|
||||
],
|
||||
"excludeGlobs": [
|
||||
"misc/api.func"
|
||||
]
|
||||
}
|
||||
],
|
||||
"website": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"frontend/**"
|
||||
],
|
||||
"excludeGlobs": [
|
||||
"frontend/public/json/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"api": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"api/**",
|
||||
"misc/api.func"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"github": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
".github/**"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"json": [
|
||||
{
|
||||
"fileStatus": "modified",
|
||||
"includeGlobs": [
|
||||
"frontend/public/json/**"
|
||||
"tools/**"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
@ -119,11 +71,65 @@
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"vm": [
|
||||
"core": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"vm/**"
|
||||
"misc/*.func"
|
||||
],
|
||||
"excludeGlobs": [
|
||||
"misc/api.func"
|
||||
]
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"docs/**"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"github": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
".github/**",
|
||||
"README.md",
|
||||
"SECURITY.md",
|
||||
"LICENSE",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"api": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"api/**",
|
||||
"misc/api.func"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
],
|
||||
"website": [
|
||||
{
|
||||
"fileStatus": null,
|
||||
"includeGlobs": [
|
||||
"frontend/**"
|
||||
],
|
||||
"excludeGlobs": [
|
||||
"frontend/public/json/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"json": [
|
||||
{
|
||||
"fileStatus": "modified",
|
||||
"includeGlobs": [
|
||||
"frontend/public/json/**"
|
||||
],
|
||||
"excludeGlobs": []
|
||||
}
|
||||
|
||||
88
.github/changelog-pr-config.json
generated
vendored
88
.github/changelog-pr-config.json
generated
vendored
@ -42,9 +42,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "🧰 Maintenance",
|
||||
"title": "🗑️ Deleted Scripts",
|
||||
"labels": [
|
||||
"maintenance"
|
||||
"delete script"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "💾 Core",
|
||||
"labels": [
|
||||
"core"
|
||||
],
|
||||
"subCategories": [
|
||||
{
|
||||
@ -69,30 +75,86 @@
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "📡 API",
|
||||
"title": "🔧 Refactor",
|
||||
"labels": [
|
||||
"api"
|
||||
"refactor"
|
||||
],
|
||||
"notes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "🧰 Tools",
|
||||
"labels": [
|
||||
"tools"
|
||||
],
|
||||
"subCategories": [
|
||||
{
|
||||
"title": "🐞 Bug Fixes",
|
||||
"labels": [
|
||||
"bugfix"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "💾 Core",
|
||||
"title": "✨ New Features",
|
||||
"labels": [
|
||||
"core"
|
||||
"feature"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "📂 Github",
|
||||
"title": "💥 Breaking Changes",
|
||||
"labels": [
|
||||
"github"
|
||||
"breaking change"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "📝 Documentation",
|
||||
"title": "🔧 Refactor",
|
||||
"labels": [
|
||||
"maintenance"
|
||||
"refactor"
|
||||
],
|
||||
"notes": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "📚 Documentation",
|
||||
"labels": [
|
||||
"documentation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "📂 Github",
|
||||
"labels": [
|
||||
"github"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "📡 API",
|
||||
"labels": [
|
||||
"api"
|
||||
],
|
||||
"subCategories": [
|
||||
{
|
||||
"title": "🐞 Bug Fixes",
|
||||
"labels": [
|
||||
"bugfix"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "✨ New Features",
|
||||
"labels": [
|
||||
"feature"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
{
|
||||
"title": "💥 Breaking Changes",
|
||||
"labels": [
|
||||
"breaking change"
|
||||
],
|
||||
"notes": []
|
||||
},
|
||||
@ -142,7 +204,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "❔ Unlabelled",
|
||||
"labels": []
|
||||
"title": "❔ Uncategorized",
|
||||
"labels": [
|
||||
"needs triage"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
33
.github/pull_request_template.md
generated
vendored
33
.github/pull_request_template.md
generated
vendored
@ -1,27 +1,26 @@
|
||||
<!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing.
|
||||
<!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing.
|
||||
PRs without prior testing will be closed. -->
|
||||
## ✍️ Description
|
||||
|
||||
## ✍️ Description
|
||||
|
||||
## 🔗 Related Issue
|
||||
|
||||
## 🔗 Related PR / Issue
|
||||
Link: #
|
||||
Fixes #
|
||||
|
||||
## ✅ Prerequisites (**X** in brackets)
|
||||
|
||||
## ✅ Prerequisites (**X** in brackets)
|
||||
|
||||
- [ ] **Self-review completed** – Code follows project standards.
|
||||
- [ ] **Tested thoroughly** – Changes work as expected.
|
||||
- [ ] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues.
|
||||
- [ ] **Self-review completed** – Code follows project standards.
|
||||
- [ ] **Tested thoroughly** – Changes work as expected.
|
||||
- [ ] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues.
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Type of Change (**X** in brackets)
|
||||
## 🛠️ Type of Change (**X** in brackets)
|
||||
|
||||
- [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality.
|
||||
- [ ] ✨ **New feature** – Adds new, non-breaking functionality.
|
||||
- [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates.
|
||||
- [ ] 🆕 **New script** – A fully functional and tested script or script set.
|
||||
- [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata.
|
||||
- [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality.
|
||||
- [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs.
|
||||
- [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality.
|
||||
- [ ] ✨ **New feature** – Adds new, non-breaking functionality.
|
||||
- [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates.
|
||||
- [ ] 🆕 **New script** – A fully functional and tested script or script set.
|
||||
- [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata.
|
||||
- [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality.
|
||||
- [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs.
|
||||
|
||||
64
.github/workflows/autolabeler.yml
generated
vendored
64
.github/workflows/autolabeler.yml
generated
vendored
@ -57,10 +57,10 @@ jobs:
|
||||
|
||||
if (shouldAddLabel) {
|
||||
labelsToAdd.add(label);
|
||||
if (label === "update script") {
|
||||
// Add specific sub-labels for tools
|
||||
if (label === "tools") {
|
||||
for (const prFile of prFiles) {
|
||||
const filename = prFile.filename;
|
||||
if (filename.startsWith("vm/")) labelsToAdd.add("vm");
|
||||
if (filename.startsWith("tools/addon/")) labelsToAdd.add("addon");
|
||||
if (filename.startsWith("tools/pve/")) labelsToAdd.add("pve-tool");
|
||||
}
|
||||
@ -68,38 +68,42 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
if (labelsToAdd.size < 2) {
|
||||
const templateLabelMappings = {
|
||||
"🐞 **Bug fix**": "bugfix",
|
||||
"✨ **New feature**": "feature",
|
||||
"💥 **Breaking change**": "breaking change",
|
||||
"🆕 **New script**": "new script",
|
||||
"🌍 **Website update**": "website", // handled special
|
||||
"🔧 **Refactoring / Code Cleanup**": "refactor",
|
||||
"📝 **Documentation update**": "documentation" // mapped to maintenance
|
||||
};
|
||||
// Always parse template checkboxes to add content-type labels (bugfix, feature, etc.)
|
||||
const templateLabelMappings = {
|
||||
"🐞 **Bug fix**": "bugfix",
|
||||
"✨ **New feature**": "feature",
|
||||
"💥 **Breaking change**": "breaking change",
|
||||
"🆕 **New script**": "new script",
|
||||
"🔧 **Refactoring / Code Cleanup**": "refactor",
|
||||
"📝 **Documentation update**": "documentation"
|
||||
};
|
||||
|
||||
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
||||
const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
|
||||
const regex = new RegExp(`- \\[(x|X)\\]\\s*${escapedCheckbox}`, "i");
|
||||
for (const [checkbox, label] of Object.entries(templateLabelMappings)) {
|
||||
const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
|
||||
const regex = new RegExp(`- \\[(x|X)\\]\\s*${escapedCheckbox}`, "i");
|
||||
|
||||
if (regex.test(prBody)) {
|
||||
if (label === "website") {
|
||||
const hasJson = prFiles.some((f) => f.filename.startsWith("frontend/public/json/"));
|
||||
const hasUpdateScript = labelsToAdd.has("update script");
|
||||
const hasContentLabel = ["bugfix", "feature", "refactor"].some((l) => labelsToAdd.has(l));
|
||||
|
||||
if (!(hasUpdateScript && hasContentLabel)) {
|
||||
labelsToAdd.add(hasJson ? "json" : "website");
|
||||
}
|
||||
} else if (label === "documentation") {
|
||||
labelsToAdd.add("maintenance");
|
||||
} else {
|
||||
labelsToAdd.add(label);
|
||||
}
|
||||
}
|
||||
if (regex.test(prBody)) {
|
||||
labelsToAdd.add(label);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle website checkbox specially - only add if not already an update script with content label
|
||||
const websiteCheckbox = "🌍 **Website update**";
|
||||
const escapedWebsite = websiteCheckbox.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1");
|
||||
const websiteRegex = new RegExp(`- \\[(x|X)\\]\\s*${escapedWebsite}`, "i");
|
||||
|
||||
if (websiteRegex.test(prBody)) {
|
||||
const hasJson = prFiles.some((f) => f.filename.startsWith("frontend/public/json/"));
|
||||
const hasUpdateScript = labelsToAdd.has("update script");
|
||||
const hasContentLabel = ["bugfix", "feature", "refactor"].some((l) => labelsToAdd.has(l));
|
||||
|
||||
// If it's an update script PR with json changes and a content label, skip adding website/json
|
||||
// The PR should be categorized as update script with the content label
|
||||
if (!(hasUpdateScript && hasJson && hasContentLabel)) {
|
||||
labelsToAdd.add(hasJson ? "json" : "website");
|
||||
}
|
||||
}
|
||||
|
||||
if (labelsToAdd.size === 0) {
|
||||
labelsToAdd.add("needs triage");
|
||||
}
|
||||
|
||||
33
.github/workflows/changelog-pr.yml
generated
vendored
33
.github/workflows/changelog-pr.yml
generated
vendored
@ -157,13 +157,31 @@ jobs:
|
||||
|
||||
let categorized = false;
|
||||
const priorityCategories = categorizedPRs.slice();
|
||||
|
||||
// Priority order for content-type labels (highest priority first)
|
||||
const subCategoryPriority = ["breaking change", "bugfix", "feature", "refactor"];
|
||||
|
||||
for (const category of priorityCategories) {
|
||||
if (categorized) break;
|
||||
if (category.labels.some(label => prLabels.includes(label))) {
|
||||
if (category.subCategories && category.subCategories.length > 0) {
|
||||
const subCategory = category.subCategories.find(sub =>
|
||||
sub.labels.some(label => prLabels.includes(label))
|
||||
);
|
||||
// Find subcategory by priority order instead of first match
|
||||
let subCategory = null;
|
||||
for (const priorityLabel of subCategoryPriority) {
|
||||
if (prLabels.includes(priorityLabel)) {
|
||||
subCategory = category.subCategories.find(sub =>
|
||||
sub.labels.includes(priorityLabel)
|
||||
);
|
||||
if (subCategory) break;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: check for any other subcategory match (api, github, json, etc.)
|
||||
if (!subCategory) {
|
||||
subCategory = category.subCategories.find(sub =>
|
||||
sub.labels.some(label => prLabels.includes(label))
|
||||
);
|
||||
}
|
||||
|
||||
if (subCategory) {
|
||||
subCategory.notes.push(prNote);
|
||||
@ -176,6 +194,15 @@ jobs:
|
||||
categorized = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: Add to Uncategorized if no category matched
|
||||
if (!categorized) {
|
||||
const uncategorized = categorizedPRs.find(category =>
|
||||
category.title.includes("Uncategorized") || category.labels.includes("needs triage"));
|
||||
if (uncategorized) {
|
||||
uncategorized.notes.push(prNote);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
4
.github/workflows/validate-filenames.yml
generated
vendored
4
.github/workflows/validate-filenames.yml
generated
vendored
@ -51,10 +51,6 @@ jobs:
|
||||
|
||||
NON_COMPLIANT_FILES=""
|
||||
for FILE in $CHANGED_FILES; do
|
||||
# Skip File "misc/create_lxc.sh"
|
||||
if [[ "$FILE" == "misc/create_lxc.sh" ]]; then
|
||||
continue
|
||||
fi
|
||||
BASENAME=$(echo "$(basename "${FILE%.*}")")
|
||||
if [[ ! "$BASENAME" =~ ^[a-z0-9-]+$ ]]; then
|
||||
NON_COMPLIANT_FILES="$NON_COMPLIANT_FILES $FILE"
|
||||
|
||||
193
CHANGELOG.md
193
CHANGELOG.md
@ -10,8 +10,201 @@
|
||||
> [!CAUTION]
|
||||
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
|
||||
|
||||
## 2025-12-09
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Dokploy ([#9793](https://github.com/community-scripts/ProxmoxVE/pull/9793))
|
||||
- Coolify ([#9792](https://github.com/community-scripts/ProxmoxVE/pull/9792))
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- fixed grammar on alert that pops up when you copy the curl command [@Sarthak-Sidhant](https://github.com/Sarthak-Sidhant) ([#9799](https://github.com/community-scripts/ProxmoxVE/pull/9799))
|
||||
|
||||
## 2025-12-08
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- typo: tandoor instead of trandoor [@Neonize](https://github.com/Neonize) ([#9771](https://github.com/community-scripts/ProxmoxVE/pull/9771))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Tandoor: Remove postgres17-contrib package [@tremor021](https://github.com/tremor021) ([#9781](https://github.com/community-scripts/ProxmoxVE/pull/9781))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- feat: Add var_gpu flag for GPU passthrough configuration [@MickLesk](https://github.com/MickLesk) ([#9764](https://github.com/community-scripts/ProxmoxVE/pull/9764))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix: always show SSH access dialog in advanced settings [@MickLesk](https://github.com/MickLesk) ([#9765](https://github.com/community-scripts/ProxmoxVE/pull/9765))
|
||||
|
||||
## 2025-12-07
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- wanderer: add meilisearch dumpless upgrade for database migration [@MickLesk](https://github.com/MickLesk) ([#9749](https://github.com/community-scripts/ProxmoxVE/pull/9749))
|
||||
|
||||
- #### 💥 Breaking Changes
|
||||
|
||||
- Refactor: Inventree (uses now ubuntu 24.04) [@MickLesk](https://github.com/MickLesk) ([#9752](https://github.com/community-scripts/ProxmoxVE/pull/9752))
|
||||
- Revert Zammad: use Debian 12 and dynamic APT source version [@MickLesk](https://github.com/MickLesk) ([#9750](https://github.com/community-scripts/ProxmoxVE/pull/9750))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- tools.func: handle empty grep results in stop_all_services [@MickLesk](https://github.com/MickLesk) ([#9748](https://github.com/community-scripts/ProxmoxVE/pull/9748))
|
||||
- Remove Debian from GPU passthrough [@MickLesk](https://github.com/MickLesk) ([#9754](https://github.com/community-scripts/ProxmoxVE/pull/9754))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- core: motd - dynamically read OS version on each login [@MickLesk](https://github.com/MickLesk) ([#9751](https://github.com/community-scripts/ProxmoxVE/pull/9751))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- FAQ update [@tremor021](https://github.com/tremor021) ([#9742](https://github.com/community-scripts/ProxmoxVE/pull/9742))
|
||||
|
||||
## 2025-12-06
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Update domain-locker-install.sh to enable auto-start after reboot [@alexindigo](https://github.com/alexindigo) ([#9715](https://github.com/community-scripts/ProxmoxVE/pull/9715))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- InfluxDB: Remove InfluxData source list post-installation [@tremor021](https://github.com/tremor021) ([#9723](https://github.com/community-scripts/ProxmoxVE/pull/9723))
|
||||
- InfluxDB: Update InfluxDB repository key URL [@tremor021](https://github.com/tremor021) ([#9720](https://github.com/community-scripts/ProxmoxVE/pull/9720))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- pin Portainer Update to CE Version only [@sgaert](https://github.com/sgaert) ([#9710](https://github.com/community-scripts/ProxmoxVE/pull/9710))
|
||||
|
||||
## 2025-12-05
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Endurain ([#9681](https://github.com/community-scripts/ProxmoxVE/pull/9681))
|
||||
- MeTube ([#9671](https://github.com/community-scripts/ProxmoxVE/pull/9671))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- libretranslate: pin uv python to 3.12 (pytorch fix) [@MickLesk](https://github.com/MickLesk) ([#9699](https://github.com/community-scripts/ProxmoxVE/pull/9699))
|
||||
- alpine: (mariadb/postgresql): correct php-cgi path for php83 (adminer) [@MickLesk](https://github.com/MickLesk) ([#9698](https://github.com/community-scripts/ProxmoxVE/pull/9698))
|
||||
- fix(librespeed-rs): use correct service name [@jniles](https://github.com/jniles) ([#9683](https://github.com/community-scripts/ProxmoxVE/pull/9683))
|
||||
- NetVisor: fix daemon auto-config [@vhsdream](https://github.com/vhsdream) ([#9682](https://github.com/community-scripts/ProxmoxVE/pull/9682))
|
||||
- Improve NVIDIA device detection for container passthrough [@MickLesk](https://github.com/MickLesk) ([#9670](https://github.com/community-scripts/ProxmoxVE/pull/9670))
|
||||
- Fix AdventureLog installation failure: missing postgis extension permissions [@Copilot](https://github.com/Copilot) ([#9674](https://github.com/community-scripts/ProxmoxVE/pull/9674))
|
||||
- paperless: ASGI interface typo [@MickLesk](https://github.com/MickLesk) ([#9668](https://github.com/community-scripts/ProxmoxVE/pull/9668))
|
||||
- var. core fixes (bash to sh in fix_gpu_gids ...) [@MickLesk](https://github.com/MickLesk) ([#9666](https://github.com/community-scripts/ProxmoxVE/pull/9666))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools.func: handle GitHub 300 Multiple Choices in tarball mode [@MickLesk](https://github.com/MickLesk) ([#9697](https://github.com/community-scripts/ProxmoxVE/pull/9697))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: OneDev [@MickLesk](https://github.com/MickLesk) ([#9597](https://github.com/community-scripts/ProxmoxVE/pull/9597))
|
||||
|
||||
### 📂 Github
|
||||
|
||||
- chore(github): improve PR template and cleanup obsolete references | move contribution guide [@MickLesk](https://github.com/MickLesk) ([#9700](https://github.com/community-scripts/ProxmoxVE/pull/9700))
|
||||
|
||||
## 2025-12-04
|
||||
|
||||
### 🛠️ Core Overhaul
|
||||
|
||||
- Major refactor of the entire `/misc` subsystem introducing a secure, modular and fully extensible foundation for all future scripts.
|
||||
Includes the new three-tier defaults architecture (ENV → App → User), strict variable whitelisting, safe `.vars` parsing without `source/eval`, centralized `error_handler.func`, structured logging, an improved 19-step advanced wizard, unified container creation, dedicated storage selector, updated sysctl handling, IPv6 disable mode, cloud-init library, SSH key auto-discovery, and a complete cleanup of legacy components.
|
||||
Documentation added under `/docs/guides`.
|
||||
[@MickLesk](https://github.com/MickLesk) ([#9540](https://github.com/community-scripts/ProxmoxVE/pull/9540))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix kimai.sh update script path typo for local.yaml [@Copilot](https://github.com/Copilot) ([#9645](https://github.com/community-scripts/ProxmoxVE/pull/9645))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- core: extend storage type support (rbd, nfs, cifs) and validation (iscidirect, isci, zfs, cephfs, pbs) [@MickLesk](https://github.com/MickLesk) ([#9646](https://github.com/community-scripts/ProxmoxVE/pull/9646))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- update pdm repo to stable [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9648](https://github.com/community-scripts/ProxmoxVE/pull/9648))
|
||||
|
||||
## 2025-12-03
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- fix(opnsense-vm): improve script and add single-interface mode [@AlphaLawless](https://github.com/AlphaLawless) ([#9614](https://github.com/community-scripts/ProxmoxVE/pull/9614))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix Homebridge update detection for Debian 13 DEB822 format [@Copilot](https://github.com/Copilot) ([#9629](https://github.com/community-scripts/ProxmoxVE/pull/9629))
|
||||
- go2rtc: Add WorkingDirectory to go2rtc service configuration [@tremor021](https://github.com/tremor021) ([#9618](https://github.com/community-scripts/ProxmoxVE/pull/9618))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- explicit node versions [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9594](https://github.com/community-scripts/ProxmoxVE/pull/9594))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Bump next from 15.5.2 to 15.5.7 in /frontend in the npm_and_yarn group across 1 directory [@dependabot[bot]](https://github.com/dependabot[bot]) ([#9632](https://github.com/community-scripts/ProxmoxVE/pull/9632))
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Update logo URL in swizzin.json [@MickLesk](https://github.com/MickLesk) ([#9627](https://github.com/community-scripts/ProxmoxVE/pull/9627))
|
||||
|
||||
## 2025-12-02
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Snowshare ([#9578](https://github.com/community-scripts/ProxmoxVE/pull/9578))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- NetVisor: patch systemd file to fix new OIDC config [@vhsdream](https://github.com/vhsdream) ([#9562](https://github.com/community-scripts/ProxmoxVE/pull/9562))
|
||||
- Refactor: BookStack [@tremor021](https://github.com/tremor021) ([#9567](https://github.com/community-scripts/ProxmoxVE/pull/9567))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Matterbridge: Fix ExecStart command in service install script to allow childbridge mode [@jonalbr](https://github.com/jonalbr) ([#9603](https://github.com/community-scripts/ProxmoxVE/pull/9603))
|
||||
- Open-webui add .env backup and restore functionality from older versions [@DrDonoso](https://github.com/DrDonoso) ([#9592](https://github.com/community-scripts/ProxmoxVE/pull/9592))
|
||||
- Booklore: Downgrad Java from 25 to 21 [@Pr0mises](https://github.com/Pr0mises) ([#9566](https://github.com/community-scripts/ProxmoxVE/pull/9566))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Set Valkey memory and eviction defaults [@pshankinclarke](https://github.com/pshankinclarke) ([#9602](https://github.com/community-scripts/ProxmoxVE/pull/9602))
|
||||
- Add auth via requirepass to Valkey [@pshankinclarke](https://github.com/pshankinclarke) ([#9570](https://github.com/community-scripts/ProxmoxVE/pull/9570))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: 2FAuth [@tremor021](https://github.com/tremor021) ([#9582](https://github.com/community-scripts/ProxmoxVE/pull/9582))
|
||||
- Refactor: Paperless-AI [@MickLesk](https://github.com/MickLesk) ([#9588](https://github.com/community-scripts/ProxmoxVE/pull/9588))
|
||||
- Refactor: AdventureLog [@tremor021](https://github.com/tremor021) ([#9583](https://github.com/community-scripts/ProxmoxVE/pull/9583))
|
||||
- CommaFeed: Bump Java and service file [@tremor021](https://github.com/tremor021) ([#9564](https://github.com/community-scripts/ProxmoxVE/pull/9564))
|
||||
- Refactor: Docmost [@tremor021](https://github.com/tremor021) ([#9563](https://github.com/community-scripts/ProxmoxVE/pull/9563))
|
||||
- Cloudflared: Add repo via helper function [@tremor021](https://github.com/tremor021) ([#9565](https://github.com/community-scripts/ProxmoxVE/pull/9565))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- #### 📝 Documentation
|
||||
|
||||
- add configuration and deployment guides to docs [@MickLesk](https://github.com/MickLesk) ([#9591](https://github.com/community-scripts/ProxmoxVE/pull/9591))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Update category for "Wanderer" [@Lorondos](https://github.com/Lorondos) ([#9607](https://github.com/community-scripts/ProxmoxVE/pull/9607))
|
||||
|
||||
## 2025-12-01
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
10
README.md
10
README.md
@ -17,10 +17,10 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md">
|
||||
<a href="https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/README.md">
|
||||
<img src="https://img.shields.io/badge/🤝_Contribute-Guidelines-ff4785?style=for-the-badge&labelColor=2d3748" alt="Contribute" />
|
||||
</a>
|
||||
<a href="https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/USER_SUBMITTED_GUIDES.md">
|
||||
<a href="https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/USER_SUBMITTED_GUIDES.md">
|
||||
<img src="https://img.shields.io/badge/📚_Guides-Read-0077b5?style=for-the-badge&labelColor=2d3748" alt="Guides" />
|
||||
</a>
|
||||
<a href="https://github.com/community-scripts/ProxmoxVE/blob/main/CHANGELOG.md">
|
||||
@ -30,8 +30,8 @@
|
||||
|
||||
<br />
|
||||
|
||||
> **Simplify your Proxmox VE setup with community-driven automation scripts**
|
||||
> Originally created by tteck, now maintained and expanded by the community
|
||||
> **Simplify your Proxmox VE setup with community-driven automation scripts**
|
||||
> Originally created by tteck, now maintained and expanded by the community
|
||||
|
||||
</div>
|
||||
|
||||
@ -214,7 +214,7 @@ This adds a menu to your Proxmox interface for easy script access without visiti
|
||||
<div align="center">
|
||||
<br />
|
||||
|
||||
👉 Check our **[Contributing Guidelines](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md)** to get started
|
||||
👉 Check our **[Contributing Guidelines](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/README.md)** to get started
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -40,10 +40,7 @@ function update_script() {
|
||||
msg_ok "Backup Created"
|
||||
|
||||
if ! dpkg -l | grep -q 'php8.3'; then
|
||||
$STD apt-get install -y \
|
||||
lsb-release \
|
||||
gnupg2
|
||||
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,mysql,cli" PHP_FPM="YES" setup_php
|
||||
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,mysql,cli,tokenizer,dom,redis,session,openssl" PHP_FPM="YES" setup_php
|
||||
sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf
|
||||
fi
|
||||
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
|
||||
|
||||
@ -45,10 +45,14 @@ function update_script() {
|
||||
fetch_and_deploy_gh_release "adventurelog" "seanmorley15/adventurelog"
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
msg_info "Ensuring PostgreSQL Extensions"
|
||||
$STD sudo -u postgres psql -d adventurelog_db -c "CREATE EXTENSION IF NOT EXISTS postgis;"
|
||||
msg_ok "PostgreSQL Extensions Ready"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
cp /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env
|
||||
cp -r /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media
|
||||
cd /opt/adventurelog/backend/server || exit
|
||||
cd /opt/adventurelog/backend/server
|
||||
if [[ ! -x .venv/bin/python ]]; then
|
||||
$STD uv venv .venv
|
||||
$STD .venv/bin/python -m ensurepip --upgrade
|
||||
@ -59,7 +63,7 @@ function update_script() {
|
||||
$STD .venv/bin/python -m manage migrate
|
||||
|
||||
cp /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env
|
||||
cd /opt/adventurelog/frontend || exit
|
||||
cd /opt/adventurelog/frontend
|
||||
$STD pnpm i
|
||||
$STD pnpm build
|
||||
rm -rf /opt/adventurelog-backup
|
||||
|
||||
@ -45,7 +45,7 @@ function update_script() {
|
||||
$STD npm run build --configuration=production
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
JAVA_VERSION="25" setup_java
|
||||
JAVA_VERSION="21" setup_java
|
||||
|
||||
msg_info "Building Backend"
|
||||
cd /opt/booklore/booklore-api
|
||||
|
||||
@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
@ -51,7 +51,7 @@ function update_script() {
|
||||
msg_info "Configuring BookStack"
|
||||
cd /opt/bookstack
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev
|
||||
$STD /usr/local/bin/composer install --no-dev
|
||||
$STD php artisan migrate --force
|
||||
chown www-data:www-data -R /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
|
||||
chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-0}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
@ -38,4 +39,4 @@ 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}:8089${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8089${CL}"
|
||||
|
||||
@ -24,11 +24,11 @@ function update_script() {
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /opt/${APP} ]]; then
|
||||
if [[ ! -d /opt/ComfyUI ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_error "To update use the ${APP} Manager."
|
||||
msg_error "To update use the ComfyUI Manager."
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
@ -28,6 +28,9 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
JAVA_VERSION="25" setup_java
|
||||
|
||||
if check_for_gh_release "commafeed" "Athou/commafeed"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop commafeed
|
||||
|
||||
46
ct/coolify.sh
Normal file
46
ct/coolify.sh
Normal file
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://coolify.io/
|
||||
|
||||
APP="Coolify"
|
||||
var_tags="${var_tags:-docker;paas}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-30}"
|
||||
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 /data/coolify ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating Coolify"
|
||||
$STD bash <(curl -fsSL https://cdn.coollabs.io/coolify/install.sh)
|
||||
msg_ok "Updated Coolify"
|
||||
msg_ok "Updated successfully!"
|
||||
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}:8000${CL}"
|
||||
@ -87,6 +87,11 @@ function update_script() {
|
||||
mv /tmp/start-daphne.sh.backup /opt/dispatcharr/start-daphne.sh
|
||||
fi
|
||||
|
||||
if ! grep -q "DJANGO_SECRET_KEY" /opt/dispatcharr/.env; then
|
||||
DJANGO_SECRET=$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | cut -c1-50)
|
||||
echo "DJANGO_SECRET_KEY=$DJANGO_SECRET" >> /opt/dispatcharr/.env
|
||||
fi
|
||||
|
||||
cd /opt/dispatcharr
|
||||
rm -rf .venv
|
||||
$STD uv venv
|
||||
|
||||
@ -47,7 +47,7 @@ function update_script() {
|
||||
msg_ok "Docker Compose updated"
|
||||
fi
|
||||
|
||||
if docker ps -a --format '{{.Names}}' | grep -q '^portainer$'; then
|
||||
if docker ps -a --format '{{.Image}}' | grep -q '^portainer/portainer-ce:latest$'; then
|
||||
msg_info "Updating Portainer"
|
||||
$STD docker pull portainer/portainer-ce:latest
|
||||
$STD docker stop portainer && docker rm portainer
|
||||
|
||||
46
ct/dokploy.sh
Normal file
46
ct/dokploy.sh
Normal file
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://dokploy.com/
|
||||
|
||||
APP="Dokploy"
|
||||
var_tags="${var_tags:-docker;paas}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
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 /etc/dokploy ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating Dokploy"
|
||||
$STD bash <(curl -sSL https://dokploy.com/install.sh)
|
||||
msg_ok "Updated Dokploy"
|
||||
msg_ok "Updated successfully!"
|
||||
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}:3000${CL}"
|
||||
@ -34,7 +34,7 @@ function update_script() {
|
||||
msg_info "Service stopped"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
setup_nodejs
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "domain-locker" "Lissy93/domain-locker"
|
||||
|
||||
msg_info "Installing Modules (patience)"
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-ubuntu}"
|
||||
var_version="${var_version:-24.04}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
83
ct/endurain.sh
Normal file
83
ct/endurain.sh
Normal file
@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: johanngrobe
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/joaovitoriasilva/endurain
|
||||
|
||||
APP="Endurain"
|
||||
var_tags="${var_tags:-sport;social-media}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-5}"
|
||||
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/endurain ]]; then
|
||||
msg_error "No ${APP} installation found!"
|
||||
exit 1
|
||||
fi
|
||||
if check_for_gh_release "endurain" "joaovitoriasilva/endurain"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop endurain
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
cp /opt/endurain/.env /opt/endurain.env
|
||||
cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js
|
||||
msg_ok "Created Backup"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "endurain" "joaovitoriasilva/endurain" "tarball" "latest" "/opt/endurain"
|
||||
|
||||
msg_info "Preparing Update"
|
||||
cd /opt/endurain
|
||||
rm -rf \
|
||||
/opt/endurain/{docs,example.env,screenshot_01.png} \
|
||||
/opt/endurain/docker* \
|
||||
/opt/endurain/*.yml
|
||||
cp /opt/endurain.env /opt/endurain/.env
|
||||
rm /opt/endurain.env
|
||||
msg_ok "Prepared Update"
|
||||
|
||||
msg_info "Updating Frontend"
|
||||
cd /opt/endurain/frontend/app
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
cp /opt/endurain.env.js /opt/endurain/frontend/app/dist/env.js
|
||||
rm /opt/endurain.env.js
|
||||
msg_ok "Updated Frontend"
|
||||
|
||||
msg_info "Updating Backend"
|
||||
cd /opt/endurain/backend
|
||||
$STD poetry export -f requirements.txt --output requirements.txt --without-hashes
|
||||
$STD uv venv
|
||||
$STD uv pip install -r requirements.txt
|
||||
msg_ok "Backend Updated"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start endurain
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Update Completed 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${CL}"
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-5}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-11}"
|
||||
var_unprivileged="${var_unprivileged:-0}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
@ -38,4 +39,4 @@ 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}:5000${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
|
||||
|
||||
6
ct/headers/coolify
Normal file
6
ct/headers/coolify
Normal file
@ -0,0 +1,6 @@
|
||||
______ ___ ____
|
||||
/ ____/___ ____ / (_) __/_ __
|
||||
/ / / __ \/ __ \/ / / /_/ / / /
|
||||
/ /___/ /_/ / /_/ / / / __/ /_/ /
|
||||
\____/\____/\____/_/_/_/ \__, /
|
||||
/____/
|
||||
6
ct/headers/dokploy
Normal file
6
ct/headers/dokploy
Normal file
@ -0,0 +1,6 @@
|
||||
____ __ __
|
||||
/ __ \____ / /______ / /___ __ __
|
||||
/ / / / __ \/ //_/ __ \/ / __ \/ / / /
|
||||
/ /_/ / /_/ / ,< / /_/ / / /_/ / /_/ /
|
||||
/_____/\____/_/|_/ .___/_/\____/\__, /
|
||||
/_/ /____/
|
||||
6
ct/headers/endurain
Normal file
6
ct/headers/endurain
Normal file
@ -0,0 +1,6 @@
|
||||
______ __ _
|
||||
/ ____/___ ____/ /_ ___________ _(_)___
|
||||
/ __/ / __ \/ __ / / / / ___/ __ `/ / __ \
|
||||
/ /___/ / / / /_/ / /_/ / / / /_/ / / / / /
|
||||
/_____/_/ /_/\__,_/\__,_/_/ \__,_/_/_/ /_/
|
||||
|
||||
6
ct/headers/metube
Normal file
6
ct/headers/metube
Normal file
@ -0,0 +1,6 @@
|
||||
__ ___ ______ __
|
||||
/ |/ /__/_ __/_ __/ /_ ___
|
||||
/ /|_/ / _ \/ / / / / / __ \/ _ \
|
||||
/ / / / __/ / / /_/ / /_/ / __/
|
||||
/_/ /_/\___/_/ \__,_/_.___/\___/
|
||||
|
||||
6
ct/headers/snowshare
Normal file
6
ct/headers/snowshare
Normal file
@ -0,0 +1,6 @@
|
||||
_____ _____ __
|
||||
/ ___/____ ____ _ __/ ___// /_ ____ _________
|
||||
\__ \/ __ \/ __ \ | /| / /\__ \/ __ \/ __ `/ ___/ _ \
|
||||
___/ / / / / /_/ / |/ |/ /___/ / / / / /_/ / / / __/
|
||||
/____/_/ /_/\____/|__/|__//____/_/ /_/\__,_/_/ \___/
|
||||
|
||||
6
ct/headers/speedtest-tracker
Normal file
6
ct/headers/speedtest-tracker
Normal file
@ -0,0 +1,6 @@
|
||||
_____ ____ __ ______ __
|
||||
/ ___/____ ___ ___ ____/ / /____ _____/ /_ /_ __/________ ______/ /_____ _____
|
||||
\__ \/ __ \/ _ \/ _ \/ __ / __/ _ \/ ___/ __/_____/ / / ___/ __ `/ ___/ //_/ _ \/ ___/
|
||||
___/ / /_/ / __/ __/ /_/ / /_/ __(__ ) /_/_____/ / / / / /_/ / /__/ ,< / __/ /
|
||||
/____/ .___/\___/\___/\__,_/\__/\___/____/\__/ /_/ /_/ \__,_/\___/_/|_|\___/_/
|
||||
/_/
|
||||
@ -23,7 +23,7 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/apt/sources.list.d/homebridge.list ]]; then
|
||||
if ! dpkg -s homebridge >/dev/null 2>&1; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -13,6 +13,7 @@ var_ram="${var_ram:-4096}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@ -10,8 +10,8 @@ var_tags="${var_tags:-inventory}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_os="${var_os:-ubuntu}"
|
||||
var_version="${var_version:-24.04}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
@ -28,10 +28,16 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP"
|
||||
|
||||
if ! grep -qE "^ID=(ubuntu)$" /etc/os-release; then
|
||||
msg_error "Unsupported OS. InvenTree requires Ubuntu (20.04/22.04/24.04)."
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating InvenTree"
|
||||
$STD apt update
|
||||
$STD apt install --only-upgrade inventree -y
|
||||
msg_ok "Updated $APP"
|
||||
msg_ok "Updated InvenTree"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-16}"
|
||||
var_os="${var_os:-ubuntu}"
|
||||
var_version="${var_version:-24.04}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@ -56,7 +56,7 @@ function update_script() {
|
||||
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
|
||||
rm -rf "$BACKUP_DIR"
|
||||
cd /opt/kimai
|
||||
sed -i '/^admin_lte:/,/^[^[:space:]]/d' config/local.yaml
|
||||
sed -i '/^admin_lte:/,/^[^[:space:]]/d' config/packages/local.yaml
|
||||
$STD composer install --no-dev --optimize-autoloader
|
||||
$STD bin/console kimai:update
|
||||
msg_ok "Updated Kimai"
|
||||
|
||||
@ -30,13 +30,13 @@ function update_script() {
|
||||
|
||||
if check_for_gh_release "librespeed-rust" "librespeed/speedtest-rust"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop librespeed_rs
|
||||
systemctl stop speedtest_rs
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
fetch_and_deploy_gh_release "librespeed-rust" "librespeed/speedtest-rust" "binary" "latest" "/opt/librespeed-rust" "librespeed-rs-x86_64-unknown-linux-gnu.deb"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start librespeed_rs
|
||||
systemctl start speedtest_rs
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
|
||||
@ -29,7 +29,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
setup_uv
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
if check_for_gh_release "libretranslate" "LibreTranslate/LibreTranslate"; then
|
||||
msg_info "Stopping Service"
|
||||
@ -39,7 +39,7 @@ function update_script() {
|
||||
msg_info "Updating LibreTranslate"
|
||||
cd /opt/libretranslate
|
||||
source .venv/bin/activate
|
||||
$STD pip install -U libretranslate
|
||||
$STD uv pip install -U libretranslate
|
||||
msg_ok "Updated LibreTranslate"
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
113
ct/metube.sh
Normal file
113
ct/metube.sh
Normal file
@ -0,0 +1,113 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (Canbiz)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/alexta69/metube
|
||||
|
||||
APP="MeTube"
|
||||
var_tags="${var_tags:-media;youtube}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
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/metube ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $(echo ":$PATH:" != *":/usr/local/bin:"*) ]]; then
|
||||
echo -e "\nexport PATH=\"/usr/local/bin:\$PATH\"" >>~/.bashrc
|
||||
source ~/.bashrc
|
||||
if ! command -v deno &>/dev/null; then
|
||||
export DENO_INSTALL="/usr/local"
|
||||
curl -fsSL https://deno.land/install.sh | $STD sh -s -- -y
|
||||
else
|
||||
$STD deno upgrade
|
||||
fi
|
||||
fi
|
||||
|
||||
if check_for_gh_release "metube" "alexta69/metube"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop metube
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Old Installation"
|
||||
if [[ -d /opt/metube_bak ]]; then
|
||||
rm -rf /opt/metube_bak
|
||||
fi
|
||||
mv /opt/metube /opt/metube_bak
|
||||
msg_ok "Backup created"
|
||||
|
||||
fetch_and_deploy_gh_release "metube" "alexta69/metube" "tarball" "latest"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/metube/ui
|
||||
$STD npm install
|
||||
$STD node_modules/.bin/ng build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
msg_info "Installing Backend Requirements"
|
||||
cd /opt/metube
|
||||
$STD uv sync
|
||||
msg_ok "Installed Backend"
|
||||
|
||||
msg_info "Restoring .env"
|
||||
if [[ -f /opt/metube_bak/.env ]]; then
|
||||
cp /opt/metube_bak/.env /opt/metube/.env
|
||||
fi
|
||||
rm -rf /opt/metube_bak
|
||||
msg_ok "Restored .env"
|
||||
|
||||
if grep -q 'pipenv' /etc/systemd/system/metube.service; then
|
||||
msg_info "Patching systemd Service"
|
||||
cat <<EOF >/etc/systemd/system/metube.service
|
||||
[Unit]
|
||||
Description=Metube - YouTube Downloader
|
||||
After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/metube
|
||||
EnvironmentFile=/opt/metube/.env
|
||||
ExecStart=/opt/metube/.venv/bin/python3 app/main.py
|
||||
Restart=always
|
||||
User=root
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
msg_ok "Patched systemd Service"
|
||||
fi
|
||||
$STD systemctl daemon-reload
|
||||
msg_ok "Service Updated"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start metube
|
||||
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}:8081${CL}"
|
||||
@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/maynayza/netvisor
|
||||
# Source: https://github.com/mayanayza/netvisor
|
||||
|
||||
APP="NetVisor"
|
||||
var_tags="${var_tags:-analytics}"
|
||||
@ -79,6 +79,9 @@ function update_script() {
|
||||
-e 's| --server-port |:|' \
|
||||
/etc/systemd/system/netvisor-daemon.service
|
||||
sed -i '/^ \"server_target.*$/d' /root/.config/daemon/config.json
|
||||
if ! grep -q "WorkingD" /etc/systemd/system/netvisor-server.service; then
|
||||
sed -i '\|simple$|a\WorkingDirectory=/opt/netvisor/backend' /etc/systemd/system/netvisor-server.service
|
||||
fi
|
||||
systemctl daemon-reload
|
||||
|
||||
msg_info "Starting services"
|
||||
@ -96,3 +99,4 @@ 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}:60072${CL}"
|
||||
echo -e "${INFO}${YW} Then create your account, and run the 'configure_daemon.sh' script to setup the daemon.${CL}"
|
||||
|
||||
@ -12,6 +12,7 @@ var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-35}"
|
||||
var_os="${var_os:-ubuntu}"
|
||||
var_version="${var_version:-24.04}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
19
ct/onedev.sh
19
ct/onedev.sh
@ -27,31 +27,30 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
GITHUB_RELEASE=$(curl -fsSL https://api.github.com/repos/theonedev/onedev/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${GITHUB_RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
|
||||
if check_for_gh_release "onedev" "theonedev/onedev"; then
|
||||
JAVA_VERSION="21" setup_java
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop onedev
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${GITHUB_RELEASE}"
|
||||
msg_info "Updating OneDev"
|
||||
cd /opt
|
||||
curl -fsSL "https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz" -o $(basename "https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz")
|
||||
curl -fsSL "https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz" -o onedev-latest.tar.gz
|
||||
tar -xzf onedev-latest.tar.gz
|
||||
$STD /opt/onedev-latest/bin/upgrade.sh /opt/onedev
|
||||
RELEASE=$(cat /opt/onedev/release.properties | grep "version" | cut -d'=' -f2)
|
||||
rm -rf /opt/onedev-latest
|
||||
rm -rf /opt/onedev-latest.tar.gz
|
||||
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
echo "${CHECK_UPDATE_RELEASE}" >~/.onedev
|
||||
msg_ok "Updated OneDev"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start onedev
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}."
|
||||
exit
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-25}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
@ -33,6 +34,7 @@ function update_script() {
|
||||
msg_info "Creating Backup"
|
||||
mkdir -p /opt/open-webui-backup
|
||||
cp -a /opt/open-webui/backend/data /opt/open-webui-backup/data || true
|
||||
cp -a /opt/open-webui/.env /opt/open-webui-backup/.env || true
|
||||
msg_ok "Created Backup"
|
||||
|
||||
msg_info "Removing legacy installation"
|
||||
@ -48,6 +50,7 @@ function update_script() {
|
||||
msg_info "Restoring data"
|
||||
mkdir -p /root/.open-webui
|
||||
cp -a /opt/open-webui-backup/data/* /root/.open-webui/ || true
|
||||
cp -a /opt/open-webui-backup/.env /root/.env || true
|
||||
rm -rf /opt/open-webui-backup || true
|
||||
msg_ok "Restored data"
|
||||
|
||||
|
||||
@ -27,58 +27,33 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if ! dpkg -s python3-pip >/dev/null 2>&1; then
|
||||
$STD apt install -y python3-pip
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/clusterzx/paperless-ai/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
|
||||
if check_for_gh_release "paperless-ai" "clusterzx/paperless-ai"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop paperless-ai
|
||||
msg_info "Stopped Service"
|
||||
systemctl stop paperless-ai paperless-rag
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
cd /opt
|
||||
mv /opt/paperless-ai /opt/paperless-ai_bak
|
||||
curl -fsSL "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip")
|
||||
$STD unzip v${RELEASE}.zip
|
||||
mv paperless-ai-${RELEASE} /opt/paperless-ai
|
||||
mkdir -p /opt/paperless-ai/data
|
||||
cp -a /opt/paperless-ai_bak/data/. /opt/paperless-ai/data/
|
||||
fetch_and_deploy_gh_release "paperless-ai" "clusterzx/paperless-ai"
|
||||
|
||||
msg_info "Updating Paperless-AI"
|
||||
cd /opt/paperless-ai
|
||||
if [[ ! -f /etc/systemd/system/paperless-rag.service ]]; then
|
||||
cat <<EOF >/etc/systemd/system/paperless-rag.service
|
||||
[Unit]
|
||||
Description=PaperlessAI-RAG Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/paperless-ai
|
||||
ExecStart=/usr/bin/python3 main.py --host 0.0.0.0 --port 8000 --initialize
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
echo "RAG_SERVICE_URL=http://localhost:8000" >>/opt/paperless-ai/data/.env
|
||||
echo "RAG_SERVICE_ENABLED=true" >>/opt/paperless-ai/data/.env
|
||||
fi
|
||||
source /opt/paperless-ai/venv/bin/activate
|
||||
$STD pip install --upgrade pip
|
||||
$STD pip install --no-cache-dir -r requirements.txt
|
||||
mkdir -p data/chromadb
|
||||
$STD npm install
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
rm -rf /opt/paperless-ai_bak
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
$STD npm ci --only=production
|
||||
msg_ok "Updated Paperless-AI"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start paperless-rag
|
||||
sleep 3
|
||||
systemctl start paperless-ai
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
@ -28,12 +28,12 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check for old data structure and prompt migration
|
||||
# Check for old data structure and prompt migration (exclude symlinks)
|
||||
if [[ -f /opt/paperless/paperless.conf ]]; then
|
||||
local OLD_DIRS=()
|
||||
[[ -d /opt/paperless/consume ]] && OLD_DIRS+=("consume")
|
||||
[[ -d /opt/paperless/data ]] && OLD_DIRS+=("data")
|
||||
[[ -d /opt/paperless/media ]] && OLD_DIRS+=("media")
|
||||
[[ -d /opt/paperless/consume && ! -L /opt/paperless/consume ]] && OLD_DIRS+=("consume")
|
||||
[[ -d /opt/paperless/data && ! -L /opt/paperless/data ]] && OLD_DIRS+=("data")
|
||||
[[ -d /opt/paperless/media && ! -L /opt/paperless/media ]] && OLD_DIRS+=("media")
|
||||
|
||||
if [[ ${#OLD_DIRS[@]} -gt 0 ]]; then
|
||||
msg_error "Old data structure detected in /opt/paperless/"
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-ubuntu}"
|
||||
var_version="${var_version:-24.04}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
@ -23,8 +24,8 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]] \
|
||||
&& [[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
|
||||
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]] &&
|
||||
[[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -37,6 +37,20 @@ function update_script() {
|
||||
msg_ok "Updated old sources"
|
||||
fi
|
||||
|
||||
if grep -q 'Debian GNU/Linux 13' /etc/os-release; then
|
||||
if [ -f "/etc/apt/sources.list.d/pdm-test.sources" ]; then
|
||||
if ! grep -qx "Enabled: false" "/etc/apt/sources.list.d/pdm-test.sources"; then
|
||||
echo "Enabled: false" >> "/etc/apt/sources.list.d/pdm-test.sources"
|
||||
setup_deb822_repo \
|
||||
"pdm" \
|
||||
"https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg" \
|
||||
"http://download.proxmox.com/debian/pdm" \
|
||||
"trixie" \
|
||||
"pdm-no-subscription"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
|
||||
60
ct/snowshare.sh
Normal file
60
ct/snowshare.sh
Normal file
@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: TuroYT
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/TuroYT/snowshare
|
||||
|
||||
APP="SnowShare"
|
||||
var_tags="${var_tags:-file-sharing}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-5}"
|
||||
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/snowshare ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "snowshare" "TuroYT/snowshare"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop snowshare
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare"
|
||||
|
||||
msg_info "Updating Snowshare"
|
||||
cd /opt/snowshare
|
||||
$STD npm ci
|
||||
$STD npx prisma generate
|
||||
$STD npm run build
|
||||
msg_ok "Updated Snowshare"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start snowshare
|
||||
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}:3000${CL}"
|
||||
83
ct/speedtest-tracker.sh
Normal file
83
ct/speedtest-tracker.sh
Normal file
@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: AlphaLawless
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/alexjustesen/speedtest-tracker
|
||||
|
||||
APP="Speedtest-Tracker"
|
||||
var_tags="${var_tags:-monitoring}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
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 [[ ! -d /opt/speedtest-tracker ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker"; then
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,sqlite3,redis" setup_php
|
||||
setup_composer
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop speedtest-tracker
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating Speedtest CLI"
|
||||
$STD apt update
|
||||
$STD apt --only-upgrade install -y speedtest
|
||||
msg_ok "Updated Speedtest CLI"
|
||||
|
||||
msg_info "Creating Backup"
|
||||
cp -r /opt/speedtest-tracker /opt/speedtest-tracker-backup
|
||||
msg_ok "Backup Created"
|
||||
|
||||
fetch_and_deploy_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker" "tarball" "latest" "/opt/speedtest-tracker"
|
||||
|
||||
msg_info "Updating Speedtest Tracker"
|
||||
cp -r /opt/speedtest-tracker-backup/.env /opt/speedtest-tracker/.env
|
||||
cd /opt/speedtest-tracker
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --optimize-autoloader --no-dev
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
$STD php artisan migrate --force
|
||||
$STD php artisan config:clear
|
||||
$STD php artisan cache:clear
|
||||
$STD php artisan view:clear
|
||||
chown -R www-data:www-data /opt/speedtest-tracker
|
||||
chmod -R 755 /opt/speedtest-tracker/storage
|
||||
chmod -R 755 /opt/speedtest-tracker/bootstrap/cache
|
||||
msg_ok "Updated Speedtest Tracker"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start speedtest-tracker
|
||||
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}${CL}"
|
||||
@ -55,7 +55,7 @@ function update_script() {
|
||||
cd /opt/tandoor/vue3
|
||||
$STD yarn install
|
||||
$STD yarn build
|
||||
TANDOOR_VERSION="$(curl -fsSL https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r .tag_name)"
|
||||
TANDOOR_VERSION=$(get_latest_github_release "TandoorRecipes/recipes")
|
||||
cat <<EOF >/opt/tandoor/cookbook/version_info.py
|
||||
TANDOOR_VERSION = "$TANDOOR_VERSION"
|
||||
TANDOOR_REF = "bare-metal"
|
||||
@ -65,7 +65,7 @@ EOF
|
||||
$STD /opt/tandoor/.venv/bin/python manage.py migrate
|
||||
$STD /opt/tandoor/.venv/bin/python manage.py collectstatic --no-input
|
||||
rm -rf /opt/tandoor.bak
|
||||
msg_ok "Updated Trandoor"
|
||||
msg_ok "Updated Tandoor"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start tandoor
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@ -65,7 +65,7 @@ EOF
|
||||
fi
|
||||
msg_ok "Corrected Services"
|
||||
|
||||
setup_nodejs
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor"
|
||||
|
||||
msg_info "Updating tracktor"
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-5}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@ -13,6 +13,7 @@ var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-0}"
|
||||
var_gpu="${var_gpu:-yes}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
|
||||
@ -55,7 +55,8 @@ function update_script() {
|
||||
systemctl stop wanderer-web
|
||||
msg_ok "Stopped service"
|
||||
|
||||
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" "latest" "/opt/wanderer/source/search"
|
||||
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
|
||||
|
||||
@ -11,7 +11,7 @@ var_disk="${var_disk:-8}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
|
||||
@ -22,7 +22,10 @@ Complete guide to all ProxmoxVE documentation - quickly find what you need.
|
||||
→ See also: [misc/error_handler.func/](misc/error_handler.func/)
|
||||
|
||||
**Configure system defaults**
|
||||
→ Read: [DEFAULTS_SYSTEM_GUIDE.md](DEFAULTS_SYSTEM_GUIDE.md)
|
||||
→ Read: [guides/DEFAULTS_SYSTEM_GUIDE.md](guides/DEFAULTS_SYSTEM_GUIDE.md)
|
||||
|
||||
**Deploy containers automatically**
|
||||
→ Read: [guides/UNATTENDED_DEPLOYMENTS.md](guides/UNATTENDED_DEPLOYMENTS.md)
|
||||
|
||||
**Develop a function library**
|
||||
→ Study: [misc/](misc/) documentation
|
||||
@ -61,7 +64,8 @@ Complete guide to all ProxmoxVE documentation - quickly find what you need.
|
||||
|
||||
**System Operator**
|
||||
→ Start: [EXIT_CODES.md](EXIT_CODES.md)
|
||||
→ Then: [DEFAULTS_SYSTEM_GUIDE.md](DEFAULTS_SYSTEM_GUIDE.md)
|
||||
→ Then: [guides/DEFAULTS_SYSTEM_GUIDE.md](guides/DEFAULTS_SYSTEM_GUIDE.md)
|
||||
→ Automate: [guides/UNATTENDED_DEPLOYMENTS.md](guides/UNATTENDED_DEPLOYMENTS.md)
|
||||
→ Debug: [DEV_MODE.md](DEV_MODE.md)
|
||||
|
||||
**Architect**
|
||||
@ -83,7 +87,8 @@ ProxmoxVE/
|
||||
├─ vm/ ↔ docs/vm/ (README.md)
|
||||
├─ tools/ ↔ docs/tools/ (README.md)
|
||||
├─ api/ ↔ docs/api/ (README.md)
|
||||
└─ misc/ ↔ docs/misc/ (9 function libraries)
|
||||
├─ misc/ ↔ docs/misc/ (9 function libraries)
|
||||
└─ [system-wide] ↔ docs/guides/ (configuration & deployment guides)
|
||||
```
|
||||
|
||||
### Core Documentation
|
||||
@ -94,7 +99,9 @@ ProxmoxVE/
|
||||
| [ct/DETAILED_GUIDE.md](ct/DETAILED_GUIDE.md) | Create ct scripts | Container developers |
|
||||
| [install/DETAILED_GUIDE.md](install/DETAILED_GUIDE.md) | Create install scripts | Installation developers |
|
||||
| [TECHNICAL_REFERENCE.md](TECHNICAL_REFERENCE.md) | Architecture deep-dive | Architects, advanced users |
|
||||
| [DEFAULTS_SYSTEM_GUIDE.md](DEFAULTS_SYSTEM_GUIDE.md) | Configuration system | Operators, power users |
|
||||
| [guides/DEFAULTS_SYSTEM_GUIDE.md](guides/DEFAULTS_SYSTEM_GUIDE.md) | Configuration system | Operators, power users |
|
||||
| [guides/CONFIGURATION_REFERENCE.md](guides/CONFIGURATION_REFERENCE.md) | Configuration options reference | Advanced users |
|
||||
| [guides/UNATTENDED_DEPLOYMENTS.md](guides/UNATTENDED_DEPLOYMENTS.md) | Automated deployments | DevOps, automation |
|
||||
| [EXIT_CODES.md](EXIT_CODES.md) | Exit code reference | Troubleshooters |
|
||||
| [DEV_MODE.md](DEV_MODE.md) | Debugging tools | Developers |
|
||||
|
||||
@ -190,7 +197,7 @@ Documentation for `/misc` - 9 core function libraries with complete references.
|
||||
|
||||
1. All of Intermediate Path
|
||||
2. Study all 9 function libraries in depth
|
||||
3. [DEFAULTS_SYSTEM_GUIDE.md](DEFAULTS_SYSTEM_GUIDE.md) - Configuration system
|
||||
3. [guides/DEFAULTS_SYSTEM_GUIDE.md](guides/DEFAULTS_SYSTEM_GUIDE.md) - Configuration system
|
||||
4. [DEV_MODE.md](DEV_MODE.md) - Debugging and development
|
||||
5. Design new features or function libraries
|
||||
|
||||
@ -234,7 +241,8 @@ Documentation for `/misc` - 9 core function libraries with complete references.
|
||||
|
||||
### By Role
|
||||
- **Contributor** → [contribution/README.md](contribution/README.md)
|
||||
- **Operator** → [DEFAULTS_SYSTEM_GUIDE.md](DEFAULTS_SYSTEM_GUIDE.md)
|
||||
- **Operator** → [guides/DEFAULTS_SYSTEM_GUIDE.md](guides/DEFAULTS_SYSTEM_GUIDE.md)
|
||||
- **Automation** → [guides/UNATTENDED_DEPLOYMENTS.md](guides/UNATTENDED_DEPLOYMENTS.md)
|
||||
- **Developer** → [TECHNICAL_REFERENCE.md](TECHNICAL_REFERENCE.md)
|
||||
- **Architect** → [misc/README.md](misc/README.md)
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Technical Reference: Configuration System Architecture
|
||||
|
||||
> **For Developers and Advanced Users**
|
||||
>
|
||||
> *Deep dive into how the defaults and configuration system works*
|
||||
>
|
||||
> _Deep dive into how the defaults and configuration system works_
|
||||
|
||||
---
|
||||
|
||||
@ -123,13 +123,13 @@ VAR_VALUE := [^\n]* # Any printable characters except newline
|
||||
|
||||
**Constraints**:
|
||||
|
||||
| Constraint | Value |
|
||||
|-----------|-------|
|
||||
| Max file size | 64 KB |
|
||||
| Max line length | 1024 bytes |
|
||||
| Max variables | 100 |
|
||||
| Allowed var names | `var_[a-z_]+` |
|
||||
| Value validation | Whitelist + Sanitization |
|
||||
| Constraint | Value |
|
||||
| ----------------- | ------------------------ |
|
||||
| Max file size | 64 KB |
|
||||
| Max line length | 1024 bytes |
|
||||
| Max variables | 100 |
|
||||
| Allowed var names | `var_[a-z_]+` |
|
||||
| Value validation | Whitelist + Sanitization |
|
||||
|
||||
**Example Valid File**:
|
||||
|
||||
@ -206,21 +206,24 @@ var_tags=dns,pihole
|
||||
**Purpose**: Safely load variables from .vars files without using `source` or `eval`
|
||||
|
||||
**Signature**:
|
||||
|
||||
```bash
|
||||
load_vars_file(filepath)
|
||||
```
|
||||
|
||||
**Parameters**:
|
||||
|
||||
| Param | Type | Required | Example |
|
||||
|-------|------|----------|---------|
|
||||
| filepath | String | Yes | `/usr/local/community-scripts/default.vars` |
|
||||
| Param | Type | Required | Example |
|
||||
| -------- | ------ | -------- | ------------------------------------------- |
|
||||
| filepath | String | Yes | `/usr/local/community-scripts/default.vars` |
|
||||
|
||||
**Returns**:
|
||||
|
||||
- `0` on success
|
||||
- `1` on error (file missing, parse error, etc.)
|
||||
|
||||
**Environment Side Effects**:
|
||||
|
||||
- Sets all parsed `var_*` variables as shell variables
|
||||
- Does NOT unset variables if file missing (safe)
|
||||
- Does NOT affect other variables
|
||||
@ -230,25 +233,25 @@ load_vars_file(filepath)
|
||||
```bash
|
||||
load_vars_file() {
|
||||
local file="$1"
|
||||
|
||||
|
||||
# File must exist
|
||||
[ -f "$file" ] || return 0
|
||||
|
||||
|
||||
# Parse line by line (not with source/eval)
|
||||
local line key val
|
||||
while IFS='=' read -r key val || [ -n "$key" ]; do
|
||||
# Skip comments and empty lines
|
||||
[[ "$key" =~ ^[[:space:]]*# ]] && continue
|
||||
[[ -z "$key" ]] && continue
|
||||
|
||||
|
||||
# Validate key is in whitelist
|
||||
_is_whitelisted_key "$key" || continue
|
||||
|
||||
|
||||
# Sanitize and export value
|
||||
val="$(_sanitize_value "$val")"
|
||||
[ $? -eq 0 ] && export "$key=$val"
|
||||
done < "$file"
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
```
|
||||
@ -281,6 +284,7 @@ echo "Allocating ${var_ram} MB RAM"
|
||||
**Purpose**: Get the full path for app-specific defaults file
|
||||
|
||||
**Signature**:
|
||||
|
||||
```bash
|
||||
get_app_defaults_path()
|
||||
```
|
||||
@ -288,6 +292,7 @@ get_app_defaults_path()
|
||||
**Parameters**: None
|
||||
|
||||
**Returns**:
|
||||
|
||||
- String: Full path to app defaults file
|
||||
|
||||
**Implementation**:
|
||||
@ -322,6 +327,7 @@ load_vars_file "$(get_app_defaults_path)"
|
||||
**Purpose**: Load and display user global defaults
|
||||
|
||||
**Signature**:
|
||||
|
||||
```bash
|
||||
default_var_settings()
|
||||
```
|
||||
@ -329,6 +335,7 @@ default_var_settings()
|
||||
**Parameters**: None
|
||||
|
||||
**Returns**:
|
||||
|
||||
- `0` on success
|
||||
- `1` on error
|
||||
|
||||
@ -337,15 +344,15 @@ default_var_settings()
|
||||
```
|
||||
1. Find default.vars location
|
||||
(usually /usr/local/community-scripts/default.vars)
|
||||
|
||||
|
||||
2. Create if missing
|
||||
|
||||
|
||||
3. Load variables from file
|
||||
|
||||
|
||||
4. Map var_verbose → VERBOSE variable
|
||||
|
||||
|
||||
5. Call base_settings (apply to container config)
|
||||
|
||||
|
||||
6. Call echo_default (display summary)
|
||||
```
|
||||
|
||||
@ -354,20 +361,20 @@ default_var_settings()
|
||||
```bash
|
||||
default_var_settings() {
|
||||
local VAR_WHITELIST=(
|
||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse
|
||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_gpu
|
||||
var_gateway var_hostname var_ipv6_method var_mac var_mtu
|
||||
var_net var_ns var_pw var_ram var_tags var_tun var_unprivileged
|
||||
var_verbose var_vlan var_ssh var_ssh_authorized_key
|
||||
var_container_storage var_template_storage
|
||||
)
|
||||
|
||||
|
||||
# Ensure file exists
|
||||
_ensure_default_vars
|
||||
|
||||
|
||||
# Find and load
|
||||
local dv="$(_find_default_vars)"
|
||||
load_vars_file "$dv"
|
||||
|
||||
|
||||
# Map verbose flag
|
||||
if [[ -n "${var_verbose:-}" ]]; then
|
||||
case "${var_verbose,,}" in
|
||||
@ -375,7 +382,7 @@ default_var_settings() {
|
||||
*) VERBOSE="${var_verbose}" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
# Apply and display
|
||||
base_settings "$VERBOSE"
|
||||
echo_default
|
||||
@ -389,6 +396,7 @@ default_var_settings() {
|
||||
**Purpose**: Offer to save current settings as app-specific defaults
|
||||
|
||||
**Signature**:
|
||||
|
||||
```bash
|
||||
maybe_offer_save_app_defaults()
|
||||
```
|
||||
@ -413,10 +421,10 @@ maybe_offer_save_app_defaults()
|
||||
```bash
|
||||
maybe_offer_save_app_defaults() {
|
||||
local app_vars_path="$(get_app_defaults_path)"
|
||||
|
||||
|
||||
# Build current settings from memory
|
||||
local new_tmp="$(_build_current_app_vars_tmp)"
|
||||
|
||||
|
||||
# Check if already exists
|
||||
if [ -f "$app_vars_path" ]; then
|
||||
# Show diff and ask: Update? Keep? View Diff?
|
||||
@ -438,29 +446,31 @@ maybe_offer_save_app_defaults() {
|
||||
**Purpose**: Remove dangerous characters/patterns from configuration values
|
||||
|
||||
**Signature**:
|
||||
|
||||
```bash
|
||||
_sanitize_value(value)
|
||||
```
|
||||
|
||||
**Parameters**:
|
||||
|
||||
| Param | Type | Required |
|
||||
|-------|------|----------|
|
||||
| value | String | Yes |
|
||||
| Param | Type | Required |
|
||||
| ----- | ------ | -------- |
|
||||
| value | String | Yes |
|
||||
|
||||
**Returns**:
|
||||
|
||||
- `0` (success) + sanitized value on stdout
|
||||
- `1` (failure) + nothing if dangerous
|
||||
|
||||
**Dangerous Patterns**:
|
||||
|
||||
| Pattern | Threat | Example |
|
||||
|---------|--------|---------|
|
||||
| `$(...)` | Command substitution | `$(rm -rf /)` |
|
||||
| `` ` ` `` | Command substitution | `` `whoami` `` |
|
||||
| `;` | Command separator | `value; rm -rf /` |
|
||||
| `&` | Background execution | `value & malicious` |
|
||||
| `<(` | Process substitution | `<(cat /etc/passwd)` |
|
||||
| Pattern | Threat | Example |
|
||||
| --------- | -------------------- | -------------------- |
|
||||
| `$(...)` | Command substitution | `$(rm -rf /)` |
|
||||
| `` ` ` `` | Command substitution | `` `whoami` `` |
|
||||
| `;` | Command separator | `value; rm -rf /` |
|
||||
| `&` | Background execution | `value & malicious` |
|
||||
| `<(` | Process substitution | `<(cat /etc/passwd)` |
|
||||
|
||||
**Implementation**:
|
||||
|
||||
@ -501,17 +511,19 @@ fi
|
||||
**Purpose**: Check if variable name is in allowed whitelist
|
||||
|
||||
**Signature**:
|
||||
|
||||
```bash
|
||||
_is_whitelisted_key(key)
|
||||
```
|
||||
|
||||
**Parameters**:
|
||||
|
||||
| Param | Type | Required | Example |
|
||||
|-------|------|----------|---------|
|
||||
| key | String | Yes | `var_cpu` |
|
||||
| Param | Type | Required | Example |
|
||||
| ----- | ------ | -------- | --------- |
|
||||
| key | String | Yes | `var_cpu` |
|
||||
|
||||
**Returns**:
|
||||
|
||||
- `0` if key is whitelisted
|
||||
- `1` if key is NOT whitelisted
|
||||
|
||||
@ -573,6 +585,7 @@ Step 4: Use BUILT-IN DEFAULTS
|
||||
### Precedence Examples
|
||||
|
||||
**Example 1: Environment Variable Wins**
|
||||
|
||||
```bash
|
||||
# Shell environment has highest priority
|
||||
$ export var_cpu=16
|
||||
@ -583,6 +596,7 @@ $ bash pihole-install.sh
|
||||
```
|
||||
|
||||
**Example 2: App Defaults Override User Defaults**
|
||||
|
||||
```bash
|
||||
# User Defaults: var_cpu=4
|
||||
# App Defaults: var_cpu=2
|
||||
@ -593,6 +607,7 @@ $ bash pihole-install.sh
|
||||
```
|
||||
|
||||
**Example 3: All Defaults Missing (Built-ins Used)**
|
||||
|
||||
```bash
|
||||
# No environment variables set
|
||||
# No app defaults file
|
||||
@ -611,21 +626,21 @@ $ bash pihole-install.sh
|
||||
base_settings() {
|
||||
# Priority 1: Environment variables (already set if export used)
|
||||
CT_TYPE=${var_unprivileged:-"1"} # Use existing or default
|
||||
|
||||
|
||||
# Priority 2: Load app defaults (may override above)
|
||||
if [ -f "$(get_app_defaults_path)" ]; then
|
||||
load_vars_file "$(get_app_defaults_path)"
|
||||
fi
|
||||
|
||||
|
||||
# Priority 3: Load user defaults
|
||||
if [ -f "/usr/local/community-scripts/default.vars" ]; then
|
||||
load_vars_file "/usr/local/community-scripts/default.vars"
|
||||
fi
|
||||
|
||||
|
||||
# Priority 4: Apply built-in defaults (lowest)
|
||||
CORE_COUNT=${var_cpu:-"${APP_CPU_DEFAULT:-2}"}
|
||||
RAM_SIZE=${var_ram:-"${APP_RAM_DEFAULT:-1024}"}
|
||||
|
||||
|
||||
# Result: var_cpu has been set through precedence chain
|
||||
}
|
||||
```
|
||||
@ -734,14 +749,14 @@ CONTAINER CREATION STARTED
|
||||
|
||||
### Threat Model
|
||||
|
||||
| Threat | Mitigation |
|
||||
|--------|-----------|
|
||||
| **Arbitrary Code Execution** | No `source` or `eval`; manual parsing only |
|
||||
| **Variable Injection** | Whitelist of allowed variable names |
|
||||
| **Command Substitution** | `_sanitize_value()` blocks `$()`, backticks, etc. |
|
||||
| **Path Traversal** | Files locked to `/usr/local/community-scripts/` |
|
||||
| **Permission Escalation** | Files created with restricted permissions |
|
||||
| **Information Disclosure** | Sensitive variables not logged |
|
||||
| Threat | Mitigation |
|
||||
| ---------------------------- | ------------------------------------------------- |
|
||||
| **Arbitrary Code Execution** | No `source` or `eval`; manual parsing only |
|
||||
| **Variable Injection** | Whitelist of allowed variable names |
|
||||
| **Command Substitution** | `_sanitize_value()` blocks `$()`, backticks, etc. |
|
||||
| **Path Traversal** | Files locked to `/usr/local/community-scripts/` |
|
||||
| **Permission Escalation** | Files created with restricted permissions |
|
||||
| **Information Disclosure** | Sensitive variables not logged |
|
||||
|
||||
### Security Controls
|
||||
|
||||
@ -798,6 +813,7 @@ fi
|
||||
### Module: `build.func`
|
||||
|
||||
**Load Order** (in actual scripts):
|
||||
|
||||
1. `#!/usr/bin/env bash` - Shebang
|
||||
2. `source /dev/stdin <<<$(curl ... api.func)` - API functions
|
||||
3. `source /dev/stdin <<<$(curl ... build.func)` - Build functions
|
||||
@ -832,17 +848,17 @@ fi
|
||||
|
||||
# Section 6: Installation Flow
|
||||
- install_script() # Main entry point
|
||||
- advanced_settings() # 19-step wizard
|
||||
- advanced_settings() # 20-step wizard
|
||||
```
|
||||
|
||||
### Regex Patterns Used
|
||||
|
||||
| Pattern | Purpose | Example Match |
|
||||
|---------|---------|---|
|
||||
| `^[0-9]+([.][0-9]+)?$` | Integer validation | `4`, `192.168` |
|
||||
| `^var_[a-z_]+$` | Variable name | `var_cpu`, `var_ssh` |
|
||||
| `*'$('*` | Command substitution | `$(whoami)` |
|
||||
| `*\`*` | Backtick substitution | `` `cat /etc/passwd` `` |
|
||||
| Pattern | Purpose | Example Match |
|
||||
| ---------------------- | --------------------- | ----------------------- |
|
||||
| `^[0-9]+([.][0-9]+)?$` | Integer validation | `4`, `192.168` |
|
||||
| `^var_[a-z_]+$` | Variable name | `var_cpu`, `var_ssh` |
|
||||
| `*'$('*` | Command substitution | `$(whoami)` |
|
||||
| `*\`\*` | Backtick substitution | `` `cat /etc/passwd` `` |
|
||||
|
||||
---
|
||||
|
||||
@ -869,12 +885,12 @@ fi
|
||||
|
||||
### Function Mapping
|
||||
|
||||
| Old | New | Location |
|
||||
|-----|-----|----------|
|
||||
| `read_config()` | `load_vars_file()` | build.func |
|
||||
| `write_config()` | `_build_current_app_vars_tmp()` | build.func |
|
||||
| None | `maybe_offer_save_app_defaults()` | build.func |
|
||||
| None | `get_app_defaults_path()` | build.func |
|
||||
| Old | New | Location |
|
||||
| ---------------- | --------------------------------- | ---------- |
|
||||
| `read_config()` | `load_vars_file()` | build.func |
|
||||
| `write_config()` | `_build_current_app_vars_tmp()` | build.func |
|
||||
| None | `maybe_offer_save_app_defaults()` | build.func |
|
||||
| None | `get_app_defaults_path()` | build.func |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
|
||||
# Community Scripts Contribution Guide
|
||||
|
||||
## **Welcome to the communty-scripts Repository!**
|
||||
## **Welcome to the communty-scripts Repository!**
|
||||
|
||||
📜 These documents outline the essential coding standards for all our scripts and JSON files. Adhering to these standards ensures that our codebase remains consistent, readable, and maintainable. By following these guidelines, we can improve collaboration, reduce errors, and enhance the overall quality of our project.
|
||||
|
||||
@ -28,7 +27,6 @@ By following the coding standards outlined in this document, we ensure that our
|
||||
|
||||
Let's work together to keep our codebase clean, efficient, and maintainable! 💪🚀
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
Before contributing, please ensure that you have the following setup:
|
||||
@ -40,67 +38,73 @@ Before contributing, please ensure that you have the following setup:
|
||||
- [Shell Format](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format)
|
||||
|
||||
### Important Notes
|
||||
- Use [AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh) and [AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh) as templates when creating new scripts.
|
||||
|
||||
- Use [AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_ct/AppName.sh) and [AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_install/AppName-install.sh) as templates when creating new scripts.
|
||||
|
||||
---
|
||||
|
||||
# 🚀 The Application Script (ct/AppName.sh)
|
||||
|
||||
- You can find all coding standards, as well as the structure for this file [here](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md).
|
||||
- You can find all coding standards, as well as the structure for this file [here](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_ct/AppName.md).
|
||||
- These scripts are responsible for container creation, setting the necessary variables and handling the update of the application once installed.
|
||||
|
||||
---
|
||||
|
||||
# 🛠 The Installation Script (install/AppName-install.sh)
|
||||
|
||||
- You can find all coding standards, as well as the structure for this file [here](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md).
|
||||
- You can find all coding standards, as well as the structure for this file [here](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_install/AppName-install.md).
|
||||
- These scripts are responsible for the installation of the application.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Building Your Own Scripts
|
||||
|
||||
Start with the [template script](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh)
|
||||
Start with the [template script](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_install/AppName-install.sh)
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Contribution Process
|
||||
|
||||
### 1. Fork the repository
|
||||
|
||||
Fork to your GitHub account
|
||||
|
||||
### 2. Clone your fork on your local environment
|
||||
### 2. Clone your fork on your local environment
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yourUserName/ForkName
|
||||
```
|
||||
|
||||
### 3. Create a new branch
|
||||
|
||||
```bash
|
||||
git switch -c your-feature-branch
|
||||
```
|
||||
|
||||
### 4. Change paths in build.func install.func and AppName.sh
|
||||
|
||||
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`.
|
||||
|
||||
### 4. Commit changes (without build.func and install.func!)
|
||||
|
||||
```bash
|
||||
git commit -m "Your commit message"
|
||||
```
|
||||
|
||||
### 5. Push to your fork
|
||||
|
||||
```bash
|
||||
git push origin your-feature-branch
|
||||
```
|
||||
|
||||
### 6. Create a Pull Request
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
## 📚 Pages
|
||||
|
||||
- [CT Template: AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh)
|
||||
- [Install Template: AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh)
|
||||
- [JSON Template: AppName.json](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/json/AppName.json)
|
||||
|
||||
|
||||
- [CT Template: AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_ct/AppName.sh)
|
||||
- [Install Template: AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_install/AppName-install.sh)
|
||||
- [JSON Template: AppName.json](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_json/AppName.json)
|
||||
|
||||
840
docs/guides/CONFIGURATION_REFERENCE.md
Normal file
840
docs/guides/CONFIGURATION_REFERENCE.md
Normal file
@ -0,0 +1,840 @@
|
||||
# Configuration Reference
|
||||
|
||||
**Complete reference for all configuration variables and options in community-scripts for Proxmox VE.**
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Variable Naming Convention](#variable-naming-convention)
|
||||
2. [Complete Variable Reference](#complete-variable-reference)
|
||||
3. [Resource Configuration](#resource-configuration)
|
||||
4. [Network Configuration](#network-configuration)
|
||||
5. [IPv6 Configuration](#ipv6-configuration)
|
||||
6. [SSH Configuration](#ssh-configuration)
|
||||
7. [Container Features](#container-features)
|
||||
8. [Storage Configuration](#storage-configuration)
|
||||
9. [Security Settings](#security-settings)
|
||||
10. [Advanced Options](#advanced-options)
|
||||
11. [Quick Reference Table](#quick-reference-table)
|
||||
|
||||
---
|
||||
|
||||
## Variable Naming Convention
|
||||
|
||||
All configuration variables follow a consistent pattern:
|
||||
|
||||
```
|
||||
var_<setting>=<value>
|
||||
```
|
||||
|
||||
**Rules:**
|
||||
- ✅ Always starts with `var_`
|
||||
- ✅ Lowercase letters only
|
||||
- ✅ Underscores for word separation
|
||||
- ✅ No spaces around `=`
|
||||
- ✅ Values can be quoted if needed
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# ✓ Correct
|
||||
var_cpu=4
|
||||
var_hostname=myserver
|
||||
var_ssh_authorized_key=ssh-rsa AAAA...
|
||||
|
||||
# ✗ Wrong
|
||||
CPU=4 # Missing var_ prefix
|
||||
var_CPU=4 # Uppercase not allowed
|
||||
var_cpu = 4 # Spaces around =
|
||||
var-cpu=4 # Hyphens not allowed
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Complete Variable Reference
|
||||
|
||||
### var_unprivileged
|
||||
|
||||
**Type:** Boolean (0 or 1)
|
||||
**Default:** `1` (unprivileged)
|
||||
**Description:** Determines if container runs unprivileged (recommended) or privileged.
|
||||
|
||||
```bash
|
||||
var_unprivileged=1 # Unprivileged (safer, recommended)
|
||||
var_unprivileged=0 # Privileged (less secure, more features)
|
||||
```
|
||||
|
||||
**When to use privileged (0):**
|
||||
- Hardware access required
|
||||
- Certain kernel modules needed
|
||||
- Legacy applications
|
||||
- Nested virtualization with full features
|
||||
|
||||
**Security Impact:**
|
||||
- Unprivileged: Container root is mapped to unprivileged user on host
|
||||
- Privileged: Container root = host root (security risk)
|
||||
|
||||
---
|
||||
|
||||
### var_cpu
|
||||
|
||||
**Type:** Integer
|
||||
**Default:** Varies by app (usually 1-4)
|
||||
**Range:** 1 to host CPU count
|
||||
**Description:** Number of CPU cores allocated to container.
|
||||
|
||||
```bash
|
||||
var_cpu=1 # Single core (minimal)
|
||||
var_cpu=2 # Dual core (typical)
|
||||
var_cpu=4 # Quad core (recommended for apps)
|
||||
var_cpu=8 # High performance
|
||||
```
|
||||
|
||||
**Best Practices:**
|
||||
- Start with 2 cores for most applications
|
||||
- Monitor usage with `pct exec <id> -- htop`
|
||||
- Can be changed after creation
|
||||
- Consider host CPU count (don't over-allocate)
|
||||
|
||||
---
|
||||
|
||||
### var_ram
|
||||
|
||||
**Type:** Integer (MB)
|
||||
**Default:** Varies by app (usually 512-2048)
|
||||
**Range:** 512 MB to host RAM
|
||||
**Description:** Amount of RAM in megabytes.
|
||||
|
||||
```bash
|
||||
var_ram=512 # 512 MB (minimal)
|
||||
var_ram=1024 # 1 GB (typical)
|
||||
var_ram=2048 # 2 GB (comfortable)
|
||||
var_ram=4096 # 4 GB (recommended for databases)
|
||||
var_ram=8192 # 8 GB (high memory apps)
|
||||
```
|
||||
|
||||
**Conversion Guide:**
|
||||
```
|
||||
512 MB = 0.5 GB
|
||||
1024 MB = 1 GB
|
||||
2048 MB = 2 GB
|
||||
4096 MB = 4 GB
|
||||
8192 MB = 8 GB
|
||||
16384 MB = 16 GB
|
||||
```
|
||||
|
||||
**Best Practices:**
|
||||
- Minimum 512 MB for basic Linux
|
||||
- 1 GB for typical applications
|
||||
- 2-4 GB for web servers, databases
|
||||
- Monitor with `free -h` inside container
|
||||
|
||||
---
|
||||
|
||||
### var_disk
|
||||
|
||||
**Type:** Integer (GB)
|
||||
**Default:** Varies by app (usually 2-8)
|
||||
**Range:** 0.001 GB to storage capacity
|
||||
**Description:** Root disk size in gigabytes.
|
||||
|
||||
```bash
|
||||
var_disk=2 # 2 GB (minimal OS only)
|
||||
var_disk=4 # 4 GB (typical)
|
||||
var_disk=8 # 8 GB (comfortable)
|
||||
var_disk=20 # 20 GB (recommended for apps)
|
||||
var_disk=50 # 50 GB (large applications)
|
||||
var_disk=100 # 100 GB (databases, media)
|
||||
```
|
||||
|
||||
**Important Notes:**
|
||||
- Can be expanded after creation (not reduced)
|
||||
- Actual space depends on storage type
|
||||
- Thin provisioning supported on most storage
|
||||
- Plan for logs, data, updates
|
||||
|
||||
**Recommended Sizes by Use Case:**
|
||||
```
|
||||
Basic Linux container: 4 GB
|
||||
Web server (Nginx/Apache): 8 GB
|
||||
Application server: 10-20 GB
|
||||
Database server: 20-50 GB
|
||||
Docker host: 30-100 GB
|
||||
Media server: 100+ GB
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_hostname
|
||||
|
||||
**Type:** String
|
||||
**Default:** Application name
|
||||
**Max Length:** 63 characters
|
||||
**Description:** Container hostname (FQDN format allowed).
|
||||
|
||||
```bash
|
||||
var_hostname=myserver
|
||||
var_hostname=pihole
|
||||
var_hostname=docker-01
|
||||
var_hostname=web.example.com
|
||||
```
|
||||
|
||||
**Rules:**
|
||||
- Lowercase letters, numbers, hyphens
|
||||
- Cannot start or end with hyphen
|
||||
- No underscores allowed
|
||||
- No spaces
|
||||
|
||||
**Best Practices:**
|
||||
```bash
|
||||
# ✓ Good
|
||||
var_hostname=web-server
|
||||
var_hostname=db-primary
|
||||
var_hostname=app.domain.com
|
||||
|
||||
# ✗ Avoid
|
||||
var_hostname=Web_Server # Uppercase, underscore
|
||||
var_hostname=-server # Starts with hyphen
|
||||
var_hostname=my server # Contains space
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_brg
|
||||
|
||||
**Type:** String
|
||||
**Default:** `vmbr0`
|
||||
**Description:** Network bridge interface.
|
||||
|
||||
```bash
|
||||
var_brg=vmbr0 # Default Proxmox bridge
|
||||
var_brg=vmbr1 # Custom bridge
|
||||
var_brg=vmbr2 # Isolated network
|
||||
```
|
||||
|
||||
**Common Setups:**
|
||||
```
|
||||
vmbr0 → Main network (LAN)
|
||||
vmbr1 → Guest network
|
||||
vmbr2 → DMZ
|
||||
vmbr3 → Management
|
||||
vmbr4 → Storage network
|
||||
```
|
||||
|
||||
**Check available bridges:**
|
||||
```bash
|
||||
ip link show | grep vmbr
|
||||
# or
|
||||
brctl show
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_net
|
||||
|
||||
**Type:** String
|
||||
**Options:** `dhcp` or `static`
|
||||
**Default:** `dhcp`
|
||||
**Description:** IPv4 network configuration method.
|
||||
|
||||
```bash
|
||||
var_net=dhcp # Automatic IP via DHCP
|
||||
var_net=static # Manual IP configuration
|
||||
```
|
||||
|
||||
**DHCP Mode:**
|
||||
- Automatic IP assignment
|
||||
- Easy setup
|
||||
- Good for development
|
||||
- Requires DHCP server on network
|
||||
|
||||
**Static Mode:**
|
||||
- Fixed IP address
|
||||
- Requires gateway configuration
|
||||
- Better for servers
|
||||
- Configure via advanced settings or after creation
|
||||
|
||||
---
|
||||
|
||||
### var_gateway
|
||||
|
||||
**Type:** IPv4 Address
|
||||
**Default:** Auto-detected from host
|
||||
**Description:** Network gateway IP address.
|
||||
|
||||
```bash
|
||||
var_gateway=192.168.1.1
|
||||
var_gateway=10.0.0.1
|
||||
var_gateway=172.16.0.1
|
||||
```
|
||||
|
||||
**Auto-detection:**
|
||||
If not specified, system detects gateway from host:
|
||||
```bash
|
||||
ip route | grep default
|
||||
```
|
||||
|
||||
**When to specify:**
|
||||
- Multiple gateways available
|
||||
- Custom routing setup
|
||||
- Different network segment
|
||||
|
||||
---
|
||||
|
||||
### var_vlan
|
||||
|
||||
**Type:** Integer
|
||||
**Range:** 1-4094
|
||||
**Default:** None
|
||||
**Description:** VLAN tag for network isolation.
|
||||
|
||||
```bash
|
||||
var_vlan=10 # VLAN 10
|
||||
var_vlan=100 # VLAN 100
|
||||
var_vlan=200 # VLAN 200
|
||||
```
|
||||
|
||||
**Common VLAN Schemes:**
|
||||
```
|
||||
VLAN 10 → Management
|
||||
VLAN 20 → Servers
|
||||
VLAN 30 → Desktops
|
||||
VLAN 40 → Guest WiFi
|
||||
VLAN 50 → IoT devices
|
||||
VLAN 99 → DMZ
|
||||
```
|
||||
|
||||
**Requirements:**
|
||||
- Switch must support VLANs
|
||||
- Proxmox bridge configured for VLAN aware
|
||||
- Gateway on same VLAN
|
||||
|
||||
---
|
||||
|
||||
### var_mtu
|
||||
|
||||
**Type:** Integer
|
||||
**Default:** `1500`
|
||||
**Range:** 68-9000
|
||||
**Description:** Maximum Transmission Unit size.
|
||||
|
||||
```bash
|
||||
var_mtu=1500 # Standard Ethernet
|
||||
var_mtu=1492 # PPPoE
|
||||
var_mtu=9000 # Jumbo frames
|
||||
```
|
||||
|
||||
**Common Values:**
|
||||
```
|
||||
1500 → Standard Ethernet (default)
|
||||
1492 → PPPoE connections
|
||||
1400 → Some VPN setups
|
||||
9000 → Jumbo frames (10GbE networks)
|
||||
```
|
||||
|
||||
**When to change:**
|
||||
- Jumbo frames for performance on 10GbE
|
||||
- PPPoE internet connections
|
||||
- VPN tunnels with overhead
|
||||
- Specific network requirements
|
||||
|
||||
---
|
||||
|
||||
### var_mac
|
||||
|
||||
**Type:** MAC Address
|
||||
**Format:** `XX:XX:XX:XX:XX:XX`
|
||||
**Default:** Auto-generated
|
||||
**Description:** Container MAC address.
|
||||
|
||||
```bash
|
||||
var_mac=02:00:00:00:00:01
|
||||
var_mac=DE:AD:BE:EF:00:01
|
||||
```
|
||||
|
||||
**When to specify:**
|
||||
- MAC-based licensing
|
||||
- Static DHCP reservations
|
||||
- Network access control
|
||||
- Cloning configurations
|
||||
|
||||
**Best Practices:**
|
||||
- Use locally administered addresses (2nd bit set)
|
||||
- Start with `02:`, `06:`, `0A:`, `0E:`
|
||||
- Avoid vendor OUIs
|
||||
- Document custom MACs
|
||||
|
||||
---
|
||||
|
||||
### var_ipv6_method
|
||||
|
||||
**Type:** String
|
||||
**Options:** `auto`, `dhcp`, `static`, `none`, `disable`
|
||||
**Default:** `none`
|
||||
**Description:** IPv6 configuration method.
|
||||
|
||||
```bash
|
||||
var_ipv6_method=auto # SLAAC (auto-configuration)
|
||||
var_ipv6_method=dhcp # DHCPv6
|
||||
var_ipv6_method=static # Manual configuration
|
||||
var_ipv6_method=none # IPv6 enabled but not configured
|
||||
var_ipv6_method=disable # IPv6 completely disabled
|
||||
```
|
||||
|
||||
**Detailed Options:**
|
||||
|
||||
**auto (SLAAC)**
|
||||
- Stateless Address Auto-Configuration
|
||||
- Router advertisements
|
||||
- No DHCPv6 server needed
|
||||
- Recommended for most cases
|
||||
|
||||
**dhcp (DHCPv6)**
|
||||
- Stateful configuration
|
||||
- Requires DHCPv6 server
|
||||
- More control over addressing
|
||||
|
||||
**static**
|
||||
- Manual IPv6 address
|
||||
- Manual gateway
|
||||
- Full control
|
||||
|
||||
**none**
|
||||
- IPv6 stack active
|
||||
- No address configured
|
||||
- Can configure later
|
||||
|
||||
**disable**
|
||||
- IPv6 completely disabled at kernel level
|
||||
- Use when IPv6 causes issues
|
||||
- Sets `net.ipv6.conf.all.disable_ipv6=1`
|
||||
|
||||
---
|
||||
|
||||
### var_ns
|
||||
|
||||
**Type:** IP Address
|
||||
**Default:** Auto (from host)
|
||||
**Description:** DNS nameserver IP.
|
||||
|
||||
```bash
|
||||
var_ns=8.8.8.8 # Google DNS
|
||||
var_ns=1.1.1.1 # Cloudflare DNS
|
||||
var_ns=9.9.9.9 # Quad9 DNS
|
||||
var_ns=192.168.1.1 # Local DNS
|
||||
```
|
||||
|
||||
**Common DNS Servers:**
|
||||
```
|
||||
8.8.8.8, 8.8.4.4 → Google Public DNS
|
||||
1.1.1.1, 1.0.0.1 → Cloudflare DNS
|
||||
9.9.9.9, 149.112.112.112 → Quad9 DNS
|
||||
208.67.222.222 → OpenDNS
|
||||
192.168.1.1 → Local router/Pi-hole
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_ssh
|
||||
|
||||
**Type:** Boolean
|
||||
**Options:** `yes` or `no`
|
||||
**Default:** `no`
|
||||
**Description:** Enable SSH server in container.
|
||||
|
||||
```bash
|
||||
var_ssh=yes # SSH server enabled
|
||||
var_ssh=no # SSH server disabled (console only)
|
||||
```
|
||||
|
||||
**When enabled:**
|
||||
- OpenSSH server installed
|
||||
- Started on boot
|
||||
- Port 22 open
|
||||
- Root login allowed
|
||||
|
||||
**Security Considerations:**
|
||||
- Disable if not needed
|
||||
- Use SSH keys instead of passwords
|
||||
- Consider non-standard port
|
||||
- Firewall rules recommended
|
||||
|
||||
---
|
||||
|
||||
### var_ssh_authorized_key
|
||||
|
||||
**Type:** String (SSH public key)
|
||||
**Default:** None
|
||||
**Description:** SSH public key for root user.
|
||||
|
||||
```bash
|
||||
var_ssh_authorized_key=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC... user@host
|
||||
var_ssh_authorized_key=ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... user@host
|
||||
```
|
||||
|
||||
**Supported Key Types:**
|
||||
- RSA (2048-4096 bits)
|
||||
- Ed25519 (recommended)
|
||||
- ECDSA
|
||||
- DSA (deprecated)
|
||||
|
||||
**How to get your public key:**
|
||||
```bash
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
# or
|
||||
cat ~/.ssh/id_ed25519.pub
|
||||
```
|
||||
|
||||
**Multiple keys:**
|
||||
Separate with newlines (in file) or use multiple deployments.
|
||||
|
||||
---
|
||||
|
||||
### var_pw
|
||||
|
||||
**Type:** String
|
||||
**Default:** Empty (auto-login)
|
||||
**Description:** Root password.
|
||||
|
||||
```bash
|
||||
var_pw=SecurePassword123! # Set password
|
||||
var_pw= # Auto-login (empty)
|
||||
```
|
||||
|
||||
**Auto-login behavior:**
|
||||
- No password required for console
|
||||
- Automatic login on console access
|
||||
- SSH still requires key if enabled
|
||||
- Suitable for development
|
||||
|
||||
**Password best practices:**
|
||||
- Minimum 12 characters
|
||||
- Mix upper/lower/numbers/symbols
|
||||
- Use password manager
|
||||
- Rotate regularly
|
||||
|
||||
---
|
||||
|
||||
### var_nesting
|
||||
|
||||
**Type:** Boolean (0 or 1)
|
||||
**Default:** `1`
|
||||
**Description:** Allow nested containers (required for Docker).
|
||||
|
||||
```bash
|
||||
var_nesting=1 # Nested containers allowed
|
||||
var_nesting=0 # Nested containers disabled
|
||||
```
|
||||
|
||||
**Required for:**
|
||||
- Docker
|
||||
- LXC inside LXC
|
||||
- Systemd features
|
||||
- Container orchestration
|
||||
|
||||
**Security Impact:**
|
||||
- Slightly reduced isolation
|
||||
- Required for container platforms
|
||||
- Generally safe when unprivileged
|
||||
|
||||
---
|
||||
|
||||
### var_keyctl
|
||||
|
||||
**Type:** Boolean (0 or 1)
|
||||
**Default:** `0`
|
||||
**Description:** Enable keyctl system call.
|
||||
|
||||
```bash
|
||||
var_keyctl=1 # Keyctl enabled
|
||||
var_keyctl=0 # Keyctl disabled
|
||||
```
|
||||
|
||||
**Required for:**
|
||||
- Docker in some configurations
|
||||
- Systemd keyring features
|
||||
- Encryption key management
|
||||
- Some authentication systems
|
||||
|
||||
---
|
||||
|
||||
### var_fuse
|
||||
|
||||
**Type:** Boolean (0 or 1)
|
||||
**Default:** `0`
|
||||
**Description:** Enable FUSE filesystem support.
|
||||
|
||||
```bash
|
||||
var_fuse=1 # FUSE enabled
|
||||
var_fuse=0 # FUSE disabled
|
||||
```
|
||||
|
||||
**Required for:**
|
||||
- sshfs
|
||||
- AppImage
|
||||
- Some backup tools
|
||||
- User-space filesystems
|
||||
|
||||
---
|
||||
|
||||
### var_mknod
|
||||
|
||||
**Type:** Boolean (0 or 1)
|
||||
**Default:** `0`
|
||||
**Description:** Allow device node creation.
|
||||
|
||||
```bash
|
||||
var_mknod=1 # Device nodes allowed
|
||||
var_mknod=0 # Device nodes disabled
|
||||
```
|
||||
|
||||
**Requires:**
|
||||
- Kernel 5.3+
|
||||
- Experimental feature
|
||||
- Use with caution
|
||||
|
||||
---
|
||||
|
||||
### var_mount_fs
|
||||
|
||||
**Type:** String (comma-separated)
|
||||
**Default:** Empty
|
||||
**Description:** Allowed mountable filesystems.
|
||||
|
||||
```bash
|
||||
var_mount_fs=nfs
|
||||
var_mount_fs=nfs,cifs
|
||||
var_mount_fs=ext4,xfs,nfs
|
||||
```
|
||||
|
||||
**Common Options:**
|
||||
```
|
||||
nfs → NFS network shares
|
||||
cifs → SMB/CIFS shares
|
||||
ext4 → Ext4 filesystems
|
||||
xfs → XFS filesystems
|
||||
btrfs → Btrfs filesystems
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_protection
|
||||
|
||||
**Type:** Boolean
|
||||
**Options:** `yes` or `no`
|
||||
**Default:** `no`
|
||||
**Description:** Prevent accidental deletion.
|
||||
|
||||
```bash
|
||||
var_protection=yes # Protected from deletion
|
||||
var_protection=no # Can be deleted normally
|
||||
```
|
||||
|
||||
**When protected:**
|
||||
- Cannot delete via GUI
|
||||
- Cannot delete via `pct destroy`
|
||||
- Must disable protection first
|
||||
- Good for production containers
|
||||
|
||||
---
|
||||
|
||||
### var_tags
|
||||
|
||||
**Type:** String (comma-separated)
|
||||
**Default:** `community-script`
|
||||
**Description:** Container tags for organization.
|
||||
|
||||
```bash
|
||||
var_tags=production
|
||||
var_tags=production,webserver
|
||||
var_tags=dev,testing,temporary
|
||||
```
|
||||
|
||||
**Best Practices:**
|
||||
```bash
|
||||
# Environment tags
|
||||
var_tags=production
|
||||
var_tags=development
|
||||
var_tags=staging
|
||||
|
||||
# Function tags
|
||||
var_tags=webserver,nginx
|
||||
var_tags=database,postgresql
|
||||
var_tags=cache,redis
|
||||
|
||||
# Project tags
|
||||
var_tags=project-alpha,frontend
|
||||
var_tags=customer-xyz,billing
|
||||
|
||||
# Combined
|
||||
var_tags=production,webserver,project-alpha
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_timezone
|
||||
|
||||
**Type:** String (TZ database format)
|
||||
**Default:** Host timezone
|
||||
**Description:** Container timezone.
|
||||
|
||||
```bash
|
||||
var_timezone=Europe/Berlin
|
||||
var_timezone=America/New_York
|
||||
var_timezone=Asia/Tokyo
|
||||
```
|
||||
|
||||
**Common Timezones:**
|
||||
```
|
||||
Europe/London
|
||||
Europe/Berlin
|
||||
Europe/Paris
|
||||
America/New_York
|
||||
America/Chicago
|
||||
America/Los_Angeles
|
||||
Asia/Tokyo
|
||||
Asia/Singapore
|
||||
Australia/Sydney
|
||||
UTC
|
||||
```
|
||||
|
||||
**List all timezones:**
|
||||
```bash
|
||||
timedatectl list-timezones
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_verbose
|
||||
|
||||
**Type:** Boolean
|
||||
**Options:** `yes` or `no`
|
||||
**Default:** `no`
|
||||
**Description:** Enable verbose output.
|
||||
|
||||
```bash
|
||||
var_verbose=yes # Show all commands
|
||||
var_verbose=no # Silent mode
|
||||
```
|
||||
|
||||
**When enabled:**
|
||||
- Shows all executed commands
|
||||
- Displays detailed progress
|
||||
- Useful for debugging
|
||||
- More log output
|
||||
|
||||
---
|
||||
|
||||
### var_apt_cacher
|
||||
|
||||
**Type:** Boolean
|
||||
**Options:** `yes` or `no`
|
||||
**Default:** `no`
|
||||
**Description:** Use APT caching proxy.
|
||||
|
||||
```bash
|
||||
var_apt_cacher=yes
|
||||
var_apt_cacher=no
|
||||
```
|
||||
|
||||
**Benefits:**
|
||||
- Faster package installs
|
||||
- Reduced bandwidth
|
||||
- Offline package cache
|
||||
- Speeds up multiple containers
|
||||
|
||||
---
|
||||
|
||||
### var_apt_cacher_ip
|
||||
|
||||
**Type:** IP Address
|
||||
**Default:** None
|
||||
**Description:** APT cacher proxy IP.
|
||||
|
||||
```bash
|
||||
var_apt_cacher=yes
|
||||
var_apt_cacher_ip=192.168.1.100
|
||||
```
|
||||
|
||||
**Setup apt-cacher-ng:**
|
||||
```bash
|
||||
apt install apt-cacher-ng
|
||||
# Runs on port 3142
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_container_storage
|
||||
|
||||
**Type:** String
|
||||
**Default:** Auto-detected
|
||||
**Description:** Storage for container.
|
||||
|
||||
```bash
|
||||
var_container_storage=local
|
||||
var_container_storage=local-zfs
|
||||
var_container_storage=pve-storage
|
||||
```
|
||||
|
||||
**List available storage:**
|
||||
```bash
|
||||
pvesm status
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### var_template_storage
|
||||
|
||||
**Type:** String
|
||||
**Default:** Auto-detected
|
||||
**Description:** Storage for templates.
|
||||
|
||||
```bash
|
||||
var_template_storage=local
|
||||
var_template_storage=nfs-templates
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference Table
|
||||
|
||||
| Variable | Type | Default | Example |
|
||||
|----------|------|---------|---------|
|
||||
| `var_unprivileged` | 0/1 | 1 | `var_unprivileged=1` |
|
||||
| `var_cpu` | int | varies | `var_cpu=4` |
|
||||
| `var_ram` | int (MB) | varies | `var_ram=4096` |
|
||||
| `var_disk` | int (GB) | varies | `var_disk=20` |
|
||||
| `var_hostname` | string | app name | `var_hostname=server` |
|
||||
| `var_brg` | string | vmbr0 | `var_brg=vmbr1` |
|
||||
| `var_net` | dhcp/static | dhcp | `var_net=dhcp` |
|
||||
| `var_gateway` | IP | auto | `var_gateway=192.168.1.1` |
|
||||
| `var_ipv6_method` | string | none | `var_ipv6_method=disable` |
|
||||
| `var_vlan` | int | - | `var_vlan=100` |
|
||||
| `var_mtu` | int | 1500 | `var_mtu=9000` |
|
||||
| `var_mac` | MAC | auto | `var_mac=02:00:00:00:00:01` |
|
||||
| `var_ns` | IP | auto | `var_ns=8.8.8.8` |
|
||||
| `var_ssh` | yes/no | no | `var_ssh=yes` |
|
||||
| `var_ssh_authorized_key` | string | - | `var_ssh_authorized_key=ssh-rsa...` |
|
||||
| `var_pw` | string | empty | `var_pw=password` |
|
||||
| `var_nesting` | 0/1 | 1 | `var_nesting=1` |
|
||||
| `var_keyctl` | 0/1 | 0 | `var_keyctl=1` |
|
||||
| `var_fuse` | 0/1 | 0 | `var_fuse=1` |
|
||||
| `var_mknod` | 0/1 | 0 | `var_mknod=1` |
|
||||
| `var_mount_fs` | string | - | `var_mount_fs=nfs,cifs` |
|
||||
| `var_protection` | yes/no | no | `var_protection=yes` |
|
||||
| `var_tags` | string | community-script | `var_tags=prod,web` |
|
||||
| `var_timezone` | string | host TZ | `var_timezone=Europe/Berlin` |
|
||||
| `var_verbose` | yes/no | no | `var_verbose=yes` |
|
||||
| `var_apt_cacher` | yes/no | no | `var_apt_cacher=yes` |
|
||||
| `var_apt_cacher_ip` | IP | - | `var_apt_cacher_ip=192.168.1.10` |
|
||||
| `var_container_storage` | string | auto | `var_container_storage=local-zfs` |
|
||||
| `var_template_storage` | string | auto | `var_template_storage=local` |
|
||||
|
||||
---
|
||||
|
||||
## See Also
|
||||
|
||||
- [Defaults System Guide](DEFAULTS_GUIDE.md)
|
||||
- [Unattended Deployments](UNATTENDED_DEPLOYMENTS.md)
|
||||
- [Security Best Practices](SECURITY_GUIDE.md)
|
||||
- [Network Configuration](NETWORK_GUIDE.md)
|
||||
58
docs/guides/README.md
Normal file
58
docs/guides/README.md
Normal file
@ -0,0 +1,58 @@
|
||||
# Configuration & Deployment Guides
|
||||
|
||||
This directory contains comprehensive guides for configuring and deploying Proxmox VE containers using community-scripts.
|
||||
|
||||
## 📚 Available Guides
|
||||
|
||||
### [Configuration Reference](CONFIGURATION_REFERENCE.md)
|
||||
|
||||
Complete reference for all configuration options, environment variables, and advanced settings available in the build system.
|
||||
|
||||
**Topics covered:**
|
||||
|
||||
- Container specifications (CPU, RAM, Disk)
|
||||
- Network configuration (IPv4/IPv6, VLAN, MTU)
|
||||
- Storage selection and management
|
||||
- Privilege modes and features
|
||||
- OS selection and versions
|
||||
|
||||
### [Defaults System Guide](DEFAULTS_SYSTEM_GUIDE.md)
|
||||
|
||||
Understanding and customizing default settings for container deployments.
|
||||
|
||||
**Topics covered:**
|
||||
|
||||
- Default system settings
|
||||
- Per-script overrides
|
||||
- Custom defaults configuration
|
||||
- Environment variable precedence
|
||||
|
||||
### [Unattended Deployments](UNATTENDED_DEPLOYMENTS.md)
|
||||
|
||||
Automating container deployments without user interaction.
|
||||
|
||||
**Topics covered:**
|
||||
|
||||
- Environment variable configuration
|
||||
- Batch deployments
|
||||
- CI/CD integration
|
||||
- Scripted installations
|
||||
- Pre-configured templates
|
||||
|
||||
## 🔗 Related Documentation
|
||||
|
||||
- **[CT Scripts Guide](../ct/)** - Container script structure and usage
|
||||
- **[Install Scripts Guide](../install/)** - Installation script internals
|
||||
- **[API Documentation](../api/)** - API integration and endpoints
|
||||
- **[Build Functions](../misc/build.func/)** - Build system functions reference
|
||||
- **[Tools Functions](../misc/tools.func/)** - Utility functions reference
|
||||
|
||||
## 💡 Quick Start
|
||||
|
||||
For most users, start with the **Unattended Deployments** guide to learn how to automate your container setups.
|
||||
|
||||
For advanced configuration options, refer to the **Configuration Reference**.
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
If you'd like to improve these guides or add new ones, please see our [Contribution Guide](../contribution/).
|
||||
963
docs/guides/UNATTENDED_DEPLOYMENTS.md
Normal file
963
docs/guides/UNATTENDED_DEPLOYMENTS.md
Normal file
@ -0,0 +1,963 @@
|
||||
# Unattended Deployments Guide
|
||||
|
||||
Complete guide for automated, zero-interaction container deployments using community-scripts for Proxmox VE.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 What You'll Learn
|
||||
|
||||
This comprehensive guide covers:
|
||||
- ✅ Complete automation of container deployments
|
||||
- ✅ Zero-interaction installations
|
||||
- ✅ Batch deployments (multiple containers)
|
||||
- ✅ Infrastructure as Code (Ansible, Terraform)
|
||||
- ✅ CI/CD pipeline integration
|
||||
- ✅ Error handling and rollback strategies
|
||||
- ✅ Production-ready deployment scripts
|
||||
- ✅ Security best practices
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Prerequisites](#prerequisites)
|
||||
3. [Deployment Methods](#deployment-methods)
|
||||
4. [Single Container Deployment](#single-container-deployment)
|
||||
5. [Batch Deployments](#batch-deployments)
|
||||
6. [Infrastructure as Code](#infrastructure-as-code)
|
||||
7. [CI/CD Integration](#cicd-integration)
|
||||
8. [Error Handling](#error-handling)
|
||||
9. [Security Considerations](#security-considerations)
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Unattended deployments allow you to:
|
||||
- ✅ Deploy containers without manual interaction
|
||||
- ✅ Automate infrastructure provisioning
|
||||
- ✅ Integrate with CI/CD pipelines
|
||||
- ✅ Maintain consistent configurations
|
||||
- ✅ Scale deployments across multiple nodes
|
||||
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### 1. Proxmox VE Access
|
||||
```bash
|
||||
# Verify you have root access
|
||||
whoami # Should return: root
|
||||
|
||||
# Check Proxmox version (8.0+ or 9.0-9.1 required)
|
||||
pveversion
|
||||
```
|
||||
|
||||
### 2. Network Connectivity
|
||||
```bash
|
||||
# Test GitHub access
|
||||
curl -I https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh
|
||||
|
||||
# Test internet connectivity
|
||||
ping -c 1 1.1.1.1
|
||||
```
|
||||
|
||||
### 3. Storage Available
|
||||
```bash
|
||||
# List available storage
|
||||
pvesm status
|
||||
|
||||
# Check free space
|
||||
df -h
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Deployment Methods
|
||||
|
||||
### Method Comparison
|
||||
|
||||
| Method | Use Case | Complexity | Flexibility |
|
||||
|--------|----------|------------|-------------|
|
||||
| **Environment Variables** | Quick one-offs | Low | High |
|
||||
| **App Defaults** | Repeat deployments | Low | Medium |
|
||||
| **Shell Scripts** | Batch operations | Medium | High |
|
||||
| **Ansible** | Infrastructure as Code | High | Very High |
|
||||
| **Terraform** | Cloud-native IaC | High | Very High |
|
||||
|
||||
---
|
||||
|
||||
## Single Container Deployment
|
||||
|
||||
### Basic Unattended Deployment
|
||||
|
||||
**Simplest form:**
|
||||
```bash
|
||||
var_hostname=myserver bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)"
|
||||
```
|
||||
|
||||
### Complete Configuration Example
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# deploy-single.sh - Deploy a single container with full configuration
|
||||
|
||||
var_unprivileged=1 \
|
||||
var_cpu=4 \
|
||||
var_ram=4096 \
|
||||
var_disk=30 \
|
||||
var_hostname=production-app \
|
||||
var_brg=vmbr0 \
|
||||
var_net=dhcp \
|
||||
var_ipv6_method=none \
|
||||
var_ssh=yes \
|
||||
var_ssh_authorized_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ... admin@workstation" \
|
||||
var_nesting=1 \
|
||||
var_tags=production,automated \
|
||||
var_protection=yes \
|
||||
var_verbose=no \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
|
||||
|
||||
echo "✓ Container deployed successfully"
|
||||
```
|
||||
|
||||
### Using App Defaults
|
||||
|
||||
**Step 1: Create defaults once (interactive)**
|
||||
```bash
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/pihole.sh)"
|
||||
# Select "Advanced Settings" → Configure → Save as "App Defaults"
|
||||
```
|
||||
|
||||
**Step 2: Deploy unattended (uses saved defaults)**
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# deploy-with-defaults.sh
|
||||
|
||||
# App defaults are loaded automatically
|
||||
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
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Batch Deployments
|
||||
|
||||
### Deploy Multiple Containers
|
||||
|
||||
#### Simple Loop
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# batch-deploy-simple.sh
|
||||
|
||||
apps=("debian" "ubuntu" "alpine")
|
||||
|
||||
for app in "${apps[@]}"; do
|
||||
echo "Deploying $app..."
|
||||
var_hostname="$app-container" \
|
||||
var_cpu=2 \
|
||||
var_ram=2048 \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${app}.sh)"
|
||||
|
||||
echo "✓ $app deployed"
|
||||
sleep 5 # Wait between deployments
|
||||
done
|
||||
```
|
||||
|
||||
#### Advanced with Configuration Array
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# batch-deploy-advanced.sh - Deploy multiple containers with individual configs
|
||||
|
||||
declare -A CONTAINERS=(
|
||||
["pihole"]="2:1024:8:vmbr0:dns,network"
|
||||
["homeassistant"]="4:4096:20:vmbr0:automation,ha"
|
||||
["docker"]="6:8192:50:vmbr1:containers,docker"
|
||||
["nginx"]="2:2048:10:vmbr0:webserver,proxy"
|
||||
)
|
||||
|
||||
for app in "${!CONTAINERS[@]}"; do
|
||||
# Parse configuration
|
||||
IFS=':' read -r cpu ram disk bridge tags <<< "${CONTAINERS[$app]}"
|
||||
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Deploying: $app"
|
||||
echo " CPU: $cpu cores"
|
||||
echo " RAM: $ram MB"
|
||||
echo " Disk: $disk GB"
|
||||
echo " Bridge: $bridge"
|
||||
echo " Tags: $tags"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
|
||||
# Deploy container
|
||||
var_unprivileged=1 \
|
||||
var_cpu="$cpu" \
|
||||
var_ram="$ram" \
|
||||
var_disk="$disk" \
|
||||
var_hostname="$app" \
|
||||
var_brg="$bridge" \
|
||||
var_net=dhcp \
|
||||
var_ipv6_method=none \
|
||||
var_ssh=yes \
|
||||
var_tags="$tags,automated" \
|
||||
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
|
||||
echo "✓ $app deployed successfully"
|
||||
else
|
||||
echo "✗ $app deployment failed - check deploy-${app}.log"
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Batch deployment complete!"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
```
|
||||
|
||||
#### Parallel Deployment
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# parallel-deploy.sh - Deploy multiple containers in parallel
|
||||
|
||||
deploy_container() {
|
||||
local app="$1"
|
||||
local cpu="$2"
|
||||
local ram="$3"
|
||||
local disk="$4"
|
||||
|
||||
echo "[$app] Starting deployment..."
|
||||
var_cpu="$cpu" \
|
||||
var_ram="$ram" \
|
||||
var_disk="$disk" \
|
||||
var_hostname="$app" \
|
||||
var_net=dhcp \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${app}.sh)" \
|
||||
&> "deploy-${app}.log"
|
||||
|
||||
echo "[$app] ✓ Completed"
|
||||
}
|
||||
|
||||
# Export function for parallel execution
|
||||
export -f deploy_container
|
||||
|
||||
# Deploy in parallel (max 3 at a time)
|
||||
parallel -j 3 deploy_container ::: \
|
||||
"debian 2 2048 10" \
|
||||
"ubuntu 2 2048 10" \
|
||||
"alpine 1 1024 5" \
|
||||
"pihole 2 1024 8" \
|
||||
"docker 4 4096 30"
|
||||
|
||||
echo "All deployments complete!"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Infrastructure as Code
|
||||
|
||||
### Ansible Playbook
|
||||
|
||||
#### Basic Playbook
|
||||
|
||||
```yaml
|
||||
---
|
||||
# playbook-proxmox.yml
|
||||
- name: Deploy ProxmoxVED Containers
|
||||
hosts: proxmox_hosts
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Deploy Debian Container
|
||||
shell: |
|
||||
var_unprivileged=1 \
|
||||
var_cpu=2 \
|
||||
var_ram=2048 \
|
||||
var_disk=10 \
|
||||
var_hostname=debian-{{ inventory_hostname }} \
|
||||
var_net=dhcp \
|
||||
var_ssh=yes \
|
||||
var_tags=ansible,automated \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: deploy_result
|
||||
|
||||
- name: Display deployment result
|
||||
debug:
|
||||
var: deploy_result.stdout_lines
|
||||
```
|
||||
|
||||
#### Advanced Playbook with Variables
|
||||
|
||||
```yaml
|
||||
---
|
||||
# advanced-playbook.yml
|
||||
- name: Deploy Multiple Container Types
|
||||
hosts: proxmox
|
||||
vars:
|
||||
containers:
|
||||
- name: pihole
|
||||
cpu: 2
|
||||
ram: 1024
|
||||
disk: 8
|
||||
tags: "dns,network"
|
||||
- name: homeassistant
|
||||
cpu: 4
|
||||
ram: 4096
|
||||
disk: 20
|
||||
tags: "automation,ha"
|
||||
- name: docker
|
||||
cpu: 6
|
||||
ram: 8192
|
||||
disk: 50
|
||||
tags: "containers,docker"
|
||||
|
||||
ssh_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
||||
|
||||
tasks:
|
||||
- name: Ensure community-scripts directory exists
|
||||
file:
|
||||
path: /usr/local/community-scripts/defaults
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Deploy containers
|
||||
shell: |
|
||||
var_unprivileged=1 \
|
||||
var_cpu={{ item.cpu }} \
|
||||
var_ram={{ item.ram }} \
|
||||
var_disk={{ item.disk }} \
|
||||
var_hostname={{ item.name }} \
|
||||
var_brg=vmbr0 \
|
||||
var_net=dhcp \
|
||||
var_ipv6_method=none \
|
||||
var_ssh=yes \
|
||||
var_ssh_authorized_key="{{ ssh_key }}" \
|
||||
var_tags="{{ item.tags }},ansible" \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/{{ item.name }}.sh)"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
loop: "{{ containers }}"
|
||||
register: deployment_results
|
||||
|
||||
- name: Wait for containers to be ready
|
||||
wait_for:
|
||||
timeout: 60
|
||||
|
||||
- name: Report deployment status
|
||||
debug:
|
||||
msg: "Deployed {{ item.item.name }} - Status: {{ 'Success' if item.rc == 0 else 'Failed' }}"
|
||||
loop: "{{ deployment_results.results }}"
|
||||
```
|
||||
|
||||
Run with:
|
||||
```bash
|
||||
ansible-playbook -i inventory.ini advanced-playbook.yml
|
||||
```
|
||||
|
||||
### Terraform Integration
|
||||
|
||||
```hcl
|
||||
# main.tf - Deploy containers via Terraform
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
proxmox = {
|
||||
source = "telmate/proxmox"
|
||||
version = "2.9.14"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "proxmox" {
|
||||
pm_api_url = "https://proxmox.example.com:8006/api2/json"
|
||||
pm_api_token_id = "terraform@pam!terraform"
|
||||
pm_api_token_secret = var.proxmox_token
|
||||
}
|
||||
|
||||
resource "null_resource" "deploy_container" {
|
||||
for_each = var.containers
|
||||
|
||||
provisioner "remote-exec" {
|
||||
inline = [
|
||||
"var_unprivileged=1",
|
||||
"var_cpu=${each.value.cpu}",
|
||||
"var_ram=${each.value.ram}",
|
||||
"var_disk=${each.value.disk}",
|
||||
"var_hostname=${each.key}",
|
||||
"var_net=dhcp",
|
||||
"bash -c \"$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${each.value.template}.sh)\""
|
||||
]
|
||||
|
||||
connection {
|
||||
type = "ssh"
|
||||
host = var.proxmox_host
|
||||
user = "root"
|
||||
private_key = file("~/.ssh/id_rsa")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "containers" {
|
||||
type = map(object({
|
||||
template = string
|
||||
cpu = number
|
||||
ram = number
|
||||
disk = number
|
||||
}))
|
||||
|
||||
default = {
|
||||
"pihole" = {
|
||||
template = "pihole"
|
||||
cpu = 2
|
||||
ram = 1024
|
||||
disk = 8
|
||||
}
|
||||
"homeassistant" = {
|
||||
template = "homeassistant"
|
||||
cpu = 4
|
||||
ram = 4096
|
||||
disk = 20
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## CI/CD Integration
|
||||
|
||||
### GitHub Actions
|
||||
|
||||
```yaml
|
||||
# .github/workflows/deploy-container.yml
|
||||
name: Deploy Container to Proxmox
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
container_type:
|
||||
description: 'Container type to deploy'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- debian
|
||||
- ubuntu
|
||||
- docker
|
||||
- pihole
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy to Proxmox
|
||||
uses: appleboy/ssh-action@v0.1.10
|
||||
with:
|
||||
host: ${{ secrets.PROXMOX_HOST }}
|
||||
username: root
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
var_unprivileged=1 \
|
||||
var_cpu=4 \
|
||||
var_ram=4096 \
|
||||
var_disk=30 \
|
||||
var_hostname=${{ github.event.inputs.container_type }}-ci \
|
||||
var_net=dhcp \
|
||||
var_ssh=yes \
|
||||
var_tags=ci-cd,automated \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${{ github.event.inputs.container_type }}.sh)"
|
||||
|
||||
- name: Notify deployment status
|
||||
if: success()
|
||||
run: echo "✓ Container deployed successfully"
|
||||
```
|
||||
|
||||
### GitLab CI
|
||||
|
||||
```yaml
|
||||
# .gitlab-ci.yml
|
||||
stages:
|
||||
- deploy
|
||||
|
||||
deploy_container:
|
||||
stage: deploy
|
||||
image: alpine:latest
|
||||
before_script:
|
||||
- apk add --no-cache openssh-client curl bash
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- ssh-keyscan $PROXMOX_HOST >> ~/.ssh/known_hosts
|
||||
script:
|
||||
- |
|
||||
ssh root@$PROXMOX_HOST << 'EOF'
|
||||
var_unprivileged=1 \
|
||||
var_cpu=4 \
|
||||
var_ram=4096 \
|
||||
var_disk=30 \
|
||||
var_hostname=gitlab-ci-container \
|
||||
var_net=dhcp \
|
||||
var_tags=gitlab-ci,automated \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
|
||||
EOF
|
||||
only:
|
||||
- main
|
||||
when: manual
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Deployment Verification Script
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# deploy-with-verification.sh
|
||||
|
||||
APP="debian"
|
||||
HOSTNAME="production-server"
|
||||
MAX_RETRIES=3
|
||||
RETRY_COUNT=0
|
||||
|
||||
deploy_container() {
|
||||
echo "Attempting deployment (Try $((RETRY_COUNT + 1))/$MAX_RETRIES)..."
|
||||
|
||||
var_unprivileged=1 \
|
||||
var_cpu=4 \
|
||||
var_ram=4096 \
|
||||
var_disk=30 \
|
||||
var_hostname="$HOSTNAME" \
|
||||
var_net=dhcp \
|
||||
var_ssh=yes \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${APP}.sh)" 2>&1 | tee deploy.log
|
||||
|
||||
return ${PIPESTATUS[0]}
|
||||
}
|
||||
|
||||
verify_deployment() {
|
||||
echo "Verifying deployment..."
|
||||
|
||||
# Check if container exists
|
||||
if ! pct list | grep -q "$HOSTNAME"; then
|
||||
echo "✗ Container not found in pct list"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if container is running
|
||||
CTID=$(pct list | grep "$HOSTNAME" | awk '{print $1}')
|
||||
STATUS=$(pct status "$CTID" | awk '{print $2}')
|
||||
|
||||
if [ "$STATUS" != "running" ]; then
|
||||
echo "✗ Container not running (Status: $STATUS)"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check network connectivity
|
||||
if ! pct exec "$CTID" -- ping -c 1 1.1.1.1 &>/dev/null; then
|
||||
echo "⚠ Warning: No internet connectivity"
|
||||
fi
|
||||
|
||||
echo "✓ Deployment verified successfully"
|
||||
echo " Container ID: $CTID"
|
||||
echo " Status: $STATUS"
|
||||
echo " IP: $(pct exec "$CTID" -- hostname -I)"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Main deployment loop with retry
|
||||
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
||||
if deploy_container; then
|
||||
if verify_deployment; then
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "✓ Deployment successful!"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
exit 0
|
||||
else
|
||||
echo "✗ Deployment verification failed"
|
||||
fi
|
||||
else
|
||||
echo "✗ Deployment failed"
|
||||
fi
|
||||
|
||||
RETRY_COUNT=$((RETRY_COUNT + 1))
|
||||
|
||||
if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
|
||||
echo "Retrying in 10 seconds..."
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "✗ Deployment failed after $MAX_RETRIES attempts"
|
||||
echo "Check deploy.log for details"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
exit 1
|
||||
```
|
||||
|
||||
### Rollback on Failure
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# deploy-with-rollback.sh
|
||||
|
||||
APP="debian"
|
||||
HOSTNAME="test-server"
|
||||
SNAPSHOT_NAME="pre-deployment"
|
||||
|
||||
# Take snapshot of existing container (if exists)
|
||||
backup_existing() {
|
||||
EXISTING_CTID=$(pct list | grep "$HOSTNAME" | awk '{print $1}')
|
||||
if [ -n "$EXISTING_CTID" ]; then
|
||||
echo "Creating snapshot of existing container..."
|
||||
pct snapshot "$EXISTING_CTID" "$SNAPSHOT_NAME" --description "Pre-deployment backup"
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# Deploy new container
|
||||
deploy() {
|
||||
var_hostname="$HOSTNAME" \
|
||||
var_cpu=4 \
|
||||
var_ram=4096 \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${APP}.sh)"
|
||||
return $?
|
||||
}
|
||||
|
||||
# Rollback to snapshot
|
||||
rollback() {
|
||||
local ctid="$1"
|
||||
echo "Rolling back to snapshot..."
|
||||
pct rollback "$ctid" "$SNAPSHOT_NAME"
|
||||
pct delsnapshot "$ctid" "$SNAPSHOT_NAME"
|
||||
}
|
||||
|
||||
# Main execution
|
||||
backup_existing
|
||||
HAD_BACKUP=$?
|
||||
|
||||
if deploy; then
|
||||
echo "✓ Deployment successful"
|
||||
[ $HAD_BACKUP -eq 0 ] && echo "You can remove the snapshot with: pct delsnapshot <CTID> $SNAPSHOT_NAME"
|
||||
else
|
||||
echo "✗ Deployment failed"
|
||||
if [ $HAD_BACKUP -eq 0 ]; then
|
||||
read -p "Rollback to previous version? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
rollback "$EXISTING_CTID"
|
||||
echo "✓ Rolled back successfully"
|
||||
fi
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Security Considerations
|
||||
|
||||
### Secure Deployment Script
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# secure-deploy.sh - Production-ready secure deployment
|
||||
|
||||
set -euo pipefail # Exit on error, undefined vars, pipe failures
|
||||
|
||||
# Configuration
|
||||
readonly APP="debian"
|
||||
readonly HOSTNAME="secure-server"
|
||||
readonly SSH_KEY_PATH="/root/.ssh/id_rsa.pub"
|
||||
readonly LOG_FILE="/var/log/container-deployments.log"
|
||||
|
||||
# Logging function
|
||||
log() {
|
||||
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" | tee -a "$LOG_FILE"
|
||||
}
|
||||
|
||||
# Validate prerequisites
|
||||
validate_environment() {
|
||||
log "Validating environment..."
|
||||
|
||||
# Check if running as root
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
log "ERROR: Must run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check SSH key exists
|
||||
if [ ! -f "$SSH_KEY_PATH" ]; then
|
||||
log "ERROR: SSH key not found at $SSH_KEY_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check internet connectivity
|
||||
if ! curl -s --max-time 5 https://github.com &>/dev/null; then
|
||||
log "ERROR: No internet connectivity"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "✓ Environment validated"
|
||||
}
|
||||
|
||||
# Secure deployment
|
||||
deploy_secure() {
|
||||
log "Starting secure deployment for $HOSTNAME..."
|
||||
|
||||
SSH_KEY=$(cat "$SSH_KEY_PATH")
|
||||
|
||||
var_unprivileged=1 \
|
||||
var_cpu=4 \
|
||||
var_ram=4096 \
|
||||
var_disk=30 \
|
||||
var_hostname="$HOSTNAME" \
|
||||
var_brg=vmbr0 \
|
||||
var_net=dhcp \
|
||||
var_ipv6_method=disable \
|
||||
var_ssh=yes \
|
||||
var_ssh_authorized_key="$SSH_KEY" \
|
||||
var_nesting=0 \
|
||||
var_keyctl=0 \
|
||||
var_fuse=0 \
|
||||
var_protection=yes \
|
||||
var_tags=production,secure,automated \
|
||||
var_verbose=no \
|
||||
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
|
||||
log "✓ Deployment successful"
|
||||
return 0
|
||||
else
|
||||
log "✗ Deployment failed"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Main execution
|
||||
main() {
|
||||
validate_environment
|
||||
|
||||
if deploy_secure; then
|
||||
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
log "Secure deployment completed successfully"
|
||||
log "Container: $HOSTNAME"
|
||||
log "Features: Unprivileged, SSH-only, Protected"
|
||||
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
exit 0
|
||||
else
|
||||
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
log "Deployment failed - check logs at $LOG_FILE"
|
||||
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
```
|
||||
|
||||
### SSH Key Management
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# deploy-with-ssh-keys.sh - Secure SSH key deployment
|
||||
|
||||
# Load SSH keys from multiple sources
|
||||
load_ssh_keys() {
|
||||
local keys=()
|
||||
|
||||
# Personal key
|
||||
if [ -f ~/.ssh/id_rsa.pub ]; then
|
||||
keys+=("$(cat ~/.ssh/id_rsa.pub)")
|
||||
fi
|
||||
|
||||
# Team keys
|
||||
if [ -f /etc/ssh/authorized_keys.d/team ]; then
|
||||
while IFS= read -r key; do
|
||||
[ -n "$key" ] && keys+=("$key")
|
||||
done < /etc/ssh/authorized_keys.d/team
|
||||
fi
|
||||
|
||||
# Join keys with newline
|
||||
printf "%s\n" "${keys[@]}"
|
||||
}
|
||||
|
||||
# Deploy with multiple SSH keys
|
||||
SSH_KEYS=$(load_ssh_keys)
|
||||
|
||||
var_ssh=yes \
|
||||
var_ssh_authorized_key="$SSH_KEYS" \
|
||||
var_hostname=multi-key-server \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/debian.sh)"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Complete Production Example
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# production-deploy.sh - Complete production deployment system
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# Configuration
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
readonly LOG_DIR="/var/log/proxmox-deployments"
|
||||
readonly CONFIG_FILE="$SCRIPT_DIR/deployment-config.json"
|
||||
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# Functions
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
setup_logging() {
|
||||
mkdir -p "$LOG_DIR"
|
||||
exec 1> >(tee -a "$LOG_DIR/deployment-$(date +%Y%m%d-%H%M%S).log")
|
||||
exec 2>&1
|
||||
}
|
||||
|
||||
log_info() { echo "[INFO] $(date +'%H:%M:%S') - $*"; }
|
||||
log_error() { echo "[ERROR] $(date +'%H:%M:%S') - $*" >&2; }
|
||||
log_success() { echo "[SUCCESS] $(date +'%H:%M:%S') - $*"; }
|
||||
|
||||
validate_prerequisites() {
|
||||
log_info "Validating prerequisites..."
|
||||
|
||||
[ "$EUID" -eq 0 ] || { log_error "Must run as root"; exit 1; }
|
||||
command -v jq >/dev/null 2>&1 || { log_error "jq not installed"; exit 1; }
|
||||
command -v curl >/dev/null 2>&1 || { log_error "curl not installed"; exit 1; }
|
||||
|
||||
log_success "Prerequisites validated"
|
||||
}
|
||||
|
||||
deploy_from_config() {
|
||||
local config_file="$1"
|
||||
|
||||
if [ ! -f "$config_file" ]; then
|
||||
log_error "Config file not found: $config_file"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local container_count
|
||||
container_count=$(jq '.containers | length' "$config_file")
|
||||
|
||||
log_info "Deploying $container_count containers from config..."
|
||||
|
||||
for i in $(seq 0 $((container_count - 1))); do
|
||||
local name cpu ram disk app tags
|
||||
|
||||
name=$(jq -r ".containers[$i].name" "$config_file")
|
||||
cpu=$(jq -r ".containers[$i].cpu" "$config_file")
|
||||
ram=$(jq -r ".containers[$i].ram" "$config_file")
|
||||
disk=$(jq -r ".containers[$i].disk" "$config_file")
|
||||
app=$(jq -r ".containers[$i].app" "$config_file")
|
||||
tags=$(jq -r ".containers[$i].tags" "$config_file")
|
||||
|
||||
log_info "Deploying container: $name ($app)"
|
||||
|
||||
var_unprivileged=1 \
|
||||
var_cpu="$cpu" \
|
||||
var_ram="$ram" \
|
||||
var_disk="$disk" \
|
||||
var_hostname="$name" \
|
||||
var_net=dhcp \
|
||||
var_ssh=yes \
|
||||
var_tags="$tags,automated" \
|
||||
var_protection=yes \
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/${app}.sh)"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
log_success "Deployed: $name"
|
||||
else
|
||||
log_error "Failed to deploy: $name"
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
generate_report() {
|
||||
log_info "Generating deployment report..."
|
||||
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "DEPLOYMENT REPORT"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Time: $(date)"
|
||||
echo ""
|
||||
pct list
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
}
|
||||
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
# Main
|
||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
main() {
|
||||
setup_logging
|
||||
log_info "Starting production deployment system"
|
||||
|
||||
validate_prerequisites
|
||||
deploy_from_config "$CONFIG_FILE"
|
||||
generate_report
|
||||
|
||||
log_success "Production deployment complete"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
```
|
||||
|
||||
**Example config file (deployment-config.json):**
|
||||
```json
|
||||
{
|
||||
"containers": [
|
||||
{
|
||||
"name": "pihole",
|
||||
"app": "pihole",
|
||||
"cpu": 2,
|
||||
"ram": 1024,
|
||||
"disk": 8,
|
||||
"tags": "dns,network,production"
|
||||
},
|
||||
{
|
||||
"name": "homeassistant",
|
||||
"app": "homeassistant",
|
||||
"cpu": 4,
|
||||
"ram": 4096,
|
||||
"disk": 20,
|
||||
"tags": "automation,ha,production"
|
||||
},
|
||||
{
|
||||
"name": "docker-host",
|
||||
"app": "docker",
|
||||
"cpu": 8,
|
||||
"ram": 16384,
|
||||
"disk": 100,
|
||||
"tags": "containers,docker,production"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## See Also
|
||||
|
||||
- [Defaults System Guide](DEFAULTS_GUIDE.md)
|
||||
- [Configuration Reference](CONFIGURATION_REFERENCE.md)
|
||||
- [Security Best Practices](SECURITY_GUIDE.md)
|
||||
- [Network Configuration](NETWORK_GUIDE.md)
|
||||
@ -8,103 +8,123 @@ This document provides a comprehensive reference of all environment variables us
|
||||
|
||||
### Core Container Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `APP` | Application name (e.g., "plex", "nextcloud") | - | Environment | Throughout |
|
||||
| `NSAPP` | Namespace application name | `$APP` | Environment | Throughout |
|
||||
| `CTID` | Container ID | - | Environment | Container creation |
|
||||
| `CT_TYPE` | Container type ("install" or "update") | "install" | Environment | Entry point |
|
||||
| `CT_NAME` | Container name | `$APP` | Environment | Container creation |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| --------- | -------------------------------------------- | --------- | ----------- | ------------------ |
|
||||
| `APP` | Application name (e.g., "plex", "nextcloud") | - | Environment | Throughout |
|
||||
| `NSAPP` | Namespace application name | `$APP` | Environment | Throughout |
|
||||
| `CTID` | Container ID | - | Environment | Container creation |
|
||||
| `CT_TYPE` | Container type ("install" or "update") | "install" | Environment | Entry point |
|
||||
| `CT_NAME` | Container name | `$APP` | Environment | Container creation |
|
||||
|
||||
### Operating System Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `var_os` | Operating system selection | "debian" | base_settings() | OS selection |
|
||||
| `var_version` | OS version | "12" | base_settings() | Template selection |
|
||||
| `var_template` | Template name | Auto-generated | base_settings() | Template download |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| -------------- | -------------------------- | -------------- | --------------- | ------------------ |
|
||||
| `var_os` | Operating system selection | "debian" | base_settings() | OS selection |
|
||||
| `var_version` | OS version | "12" | base_settings() | Template selection |
|
||||
| `var_template` | Template name | Auto-generated | base_settings() | Template download |
|
||||
|
||||
### Resource Configuration Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `var_cpu` | CPU cores | "2" | base_settings() | Container creation |
|
||||
| `var_ram` | RAM in MB | "2048" | base_settings() | Container creation |
|
||||
| `var_disk` | Disk size in GB | "8" | base_settings() | Container creation |
|
||||
| `DISK_SIZE` | Disk size (alternative) | `$var_disk` | Environment | Container creation |
|
||||
| `CORE_COUNT` | CPU cores (alternative) | `$var_cpu` | Environment | Container creation |
|
||||
| `RAM_SIZE` | RAM size (alternative) | `$var_ram` | Environment | Container creation |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| ------------ | ----------------------- | ----------- | --------------- | ------------------ |
|
||||
| `var_cpu` | CPU cores | "2" | base_settings() | Container creation |
|
||||
| `var_ram` | RAM in MB | "2048" | base_settings() | Container creation |
|
||||
| `var_disk` | Disk size in GB | "8" | base_settings() | Container creation |
|
||||
| `DISK_SIZE` | Disk size (alternative) | `$var_disk` | Environment | Container creation |
|
||||
| `CORE_COUNT` | CPU cores (alternative) | `$var_cpu` | Environment | Container creation |
|
||||
| `RAM_SIZE` | RAM size (alternative) | `$var_ram` | Environment | Container creation |
|
||||
|
||||
### Network Configuration Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `var_net` | Network interface | "vmbr0" | base_settings() | Network config |
|
||||
| `var_bridge` | Bridge interface | "vmbr0" | base_settings() | Network config |
|
||||
| `var_gateway` | Gateway IP | "192.168.1.1" | base_settings() | Network config |
|
||||
| `var_ip` | Container IP address | - | User input | Network config |
|
||||
| `var_ipv6` | IPv6 address | - | User input | Network config |
|
||||
| `var_vlan` | VLAN ID | - | User input | Network config |
|
||||
| `var_mtu` | MTU size | "1500" | base_settings() | Network config |
|
||||
| `var_mac` | MAC address | Auto-generated | base_settings() | Network config |
|
||||
| `NET` | Network interface (alternative) | `$var_net` | Environment | Network config |
|
||||
| `BRG` | Bridge interface (alternative) | `$var_bridge` | Environment | Network config |
|
||||
| `GATE` | Gateway IP (alternative) | `$var_gateway` | Environment | Network config |
|
||||
| `IPV6_METHOD` | IPv6 configuration method | "none" | Environment | Network config |
|
||||
| `VLAN` | VLAN ID (alternative) | `$var_vlan` | Environment | Network config |
|
||||
| `MTU` | MTU size (alternative) | `$var_mtu` | Environment | Network config |
|
||||
| `MAC` | MAC address (alternative) | `$var_mac` | Environment | Network config |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| ------------- | ------------------------------- | -------------- | --------------- | -------------- |
|
||||
| `var_net` | Network interface | "vmbr0" | base_settings() | Network config |
|
||||
| `var_bridge` | Bridge interface | "vmbr0" | base_settings() | Network config |
|
||||
| `var_gateway` | Gateway IP | "192.168.1.1" | base_settings() | Network config |
|
||||
| `var_ip` | Container IP address | - | User input | Network config |
|
||||
| `var_ipv6` | IPv6 address | - | User input | Network config |
|
||||
| `var_vlan` | VLAN ID | - | User input | Network config |
|
||||
| `var_mtu` | MTU size | "1500" | base_settings() | Network config |
|
||||
| `var_mac` | MAC address | Auto-generated | base_settings() | Network config |
|
||||
| `NET` | Network interface (alternative) | `$var_net` | Environment | Network config |
|
||||
| `BRG` | Bridge interface (alternative) | `$var_bridge` | Environment | Network config |
|
||||
| `GATE` | Gateway IP (alternative) | `$var_gateway` | Environment | Network config |
|
||||
| `IPV6_METHOD` | IPv6 configuration method | "none" | Environment | Network config |
|
||||
| `VLAN` | VLAN ID (alternative) | `$var_vlan` | Environment | Network config |
|
||||
| `MTU` | MTU size (alternative) | `$var_mtu` | Environment | Network config |
|
||||
| `MAC` | MAC address (alternative) | `$var_mac` | Environment | Network config |
|
||||
|
||||
### Storage Configuration Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `var_template_storage` | Storage for templates | - | select_storage() | Template storage |
|
||||
| `var_container_storage` | Storage for container disks | - | select_storage() | Container storage |
|
||||
| `TEMPLATE_STORAGE` | Template storage (alternative) | `$var_template_storage` | Environment | Template storage |
|
||||
| `CONTAINER_STORAGE` | Container storage (alternative) | `$var_container_storage` | Environment | Container storage |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| ----------------------- | ------------------------------- | ------------------------ | ---------------- | ----------------- |
|
||||
| `var_template_storage` | Storage for templates | - | select_storage() | Template storage |
|
||||
| `var_container_storage` | Storage for container disks | - | select_storage() | Container storage |
|
||||
| `TEMPLATE_STORAGE` | Template storage (alternative) | `$var_template_storage` | Environment | Template storage |
|
||||
| `CONTAINER_STORAGE` | Container storage (alternative) | `$var_container_storage` | Environment | Container storage |
|
||||
|
||||
### Feature Flags
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `ENABLE_FUSE` | Enable FUSE support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_TUN` | Enable TUN/TAP support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_KEYCTL` | Enable keyctl support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_MOUNT` | Enable mount support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_NESTING` | Enable nesting support | "false" | base_settings() | Container features |
|
||||
| `ENABLE_PRIVILEGED` | Enable privileged mode | "false" | base_settings() | Container features |
|
||||
| `ENABLE_UNPRIVILEGED` | Enable unprivileged mode | "true" | base_settings() | Container features |
|
||||
| `VERBOSE` | Enable verbose output | "false" | Environment | Logging |
|
||||
| `SSH` | Enable SSH key provisioning | "true" | base_settings() | SSH setup |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| --------------------- | --------------------------- | ------- | --------------- | ------------------ |
|
||||
| `ENABLE_FUSE` | Enable FUSE support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_TUN` | Enable TUN/TAP support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_KEYCTL` | Enable keyctl support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_MOUNT` | Enable mount support | "true" | base_settings() | Container features |
|
||||
| `ENABLE_NESTING` | Enable nesting support | "false" | base_settings() | Container features |
|
||||
| `ENABLE_PRIVILEGED` | Enable privileged mode | "false" | base_settings() | Container features |
|
||||
| `ENABLE_UNPRIVILEGED` | Enable unprivileged mode | "true" | base_settings() | Container features |
|
||||
| `VERBOSE` | Enable verbose output | "false" | Environment | Logging |
|
||||
| `SSH` | Enable SSH key provisioning | "true" | base_settings() | SSH setup |
|
||||
|
||||
### GPU Passthrough Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `GPU_APPS` | List of apps that support GPU | - | Environment | GPU detection |
|
||||
| `var_gpu` | GPU selection | - | User input | GPU passthrough |
|
||||
| `var_gpu_type` | GPU type (intel/amd/nvidia) | - | detect_gpu_devices() | GPU passthrough |
|
||||
| `var_gpu_devices` | GPU device list | - | detect_gpu_devices() | GPU passthrough |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| ------------ | ------------------------------- | ------- | ------------------------------------------- | ------------------ |
|
||||
| `var_gpu` | Enable GPU passthrough | "no" | CT script / Environment / Advanced Settings | GPU passthrough |
|
||||
| `ENABLE_GPU` | GPU passthrough flag (internal) | "no" | Advanced Settings | Container creation |
|
||||
|
||||
**Note**: GPU passthrough is controlled via `var_gpu`. Apps that benefit from GPU acceleration (media servers, AI/ML, transcoding) have `var_gpu=yes` as default in their CT scripts.
|
||||
|
||||
**Apps with GPU enabled by default**:
|
||||
|
||||
- Media: jellyfin, plex, emby, channels, ersatztv, tunarr, immich
|
||||
- Transcoding: tdarr, unmanic, fileflows
|
||||
- AI/ML: ollama, openwebui
|
||||
- NVR: frigate
|
||||
|
||||
**Usage Examples**:
|
||||
|
||||
```bash
|
||||
# Disable GPU for a specific installation
|
||||
var_gpu=no bash -c "$(curl -fsSL https://...jellyfin.sh)"
|
||||
|
||||
# Enable GPU for apps without default GPU support
|
||||
var_gpu=yes bash -c "$(curl -fsSL https://...debian.sh)"
|
||||
|
||||
# Set in default.vars for all apps
|
||||
echo "var_gpu=yes" >> /usr/local/community-scripts/default.vars
|
||||
```
|
||||
|
||||
### API and Diagnostics Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `DIAGNOSTICS` | Enable diagnostics mode | "false" | Environment | Diagnostics |
|
||||
| `METHOD` | Installation method | "install" | Environment | Installation flow |
|
||||
| `RANDOM_UUID` | Random UUID for tracking | - | Environment | Logging |
|
||||
| `API_TOKEN` | Proxmox API token | - | Environment | API calls |
|
||||
| `API_USER` | Proxmox API user | - | Environment | API calls |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| ------------- | ------------------------ | --------- | ----------- | ----------------- |
|
||||
| `DIAGNOSTICS` | Enable diagnostics mode | "false" | Environment | Diagnostics |
|
||||
| `METHOD` | Installation method | "install" | Environment | Installation flow |
|
||||
| `RANDOM_UUID` | Random UUID for tracking | - | Environment | Logging |
|
||||
| `API_TOKEN` | Proxmox API token | - | Environment | API calls |
|
||||
| `API_USER` | Proxmox API user | - | Environment | API calls |
|
||||
|
||||
### Settings Persistence Variables
|
||||
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
|----------|-------------|---------|---------|---------|
|
||||
| `SAVE_DEFAULTS` | Save settings as defaults | "false" | User input | Settings persistence |
|
||||
| `SAVE_APP_DEFAULTS` | Save app-specific defaults | "false" | User input | Settings persistence |
|
||||
| `DEFAULT_VARS_FILE` | Path to default.vars | "/usr/local/community-scripts/default.vars" | Environment | Settings persistence |
|
||||
| `APP_DEFAULTS_FILE` | Path to app.vars | "/usr/local/community-scripts/defaults/$APP.vars" | Environment | Settings persistence |
|
||||
| Variable | Description | Default | Set In | Used In |
|
||||
| ------------------- | -------------------------- | ------------------------------------------------- | ----------- | -------------------- |
|
||||
| `SAVE_DEFAULTS` | Save settings as defaults | "false" | User input | Settings persistence |
|
||||
| `SAVE_APP_DEFAULTS` | Save app-specific defaults | "false" | User input | Settings persistence |
|
||||
| `DEFAULT_VARS_FILE` | Path to default.vars | "/usr/local/community-scripts/default.vars" | Environment | Settings persistence |
|
||||
| `APP_DEFAULTS_FILE` | Path to app.vars | "/usr/local/community-scripts/defaults/$APP.vars" | Environment | Settings persistence |
|
||||
|
||||
## Variable Precedence Chain
|
||||
|
||||
@ -152,6 +172,7 @@ export SSH="true"
|
||||
## Environment Variable Usage Patterns
|
||||
|
||||
### 1. Container Creation
|
||||
|
||||
```bash
|
||||
# Basic container creation
|
||||
export APP="nextcloud"
|
||||
@ -170,6 +191,7 @@ export var_container_storage="local"
|
||||
```
|
||||
|
||||
### 2. GPU Passthrough
|
||||
|
||||
```bash
|
||||
# Enable GPU passthrough
|
||||
export GPU_APPS="plex,jellyfin,emby"
|
||||
@ -178,6 +200,7 @@ export ENABLE_PRIVILEGED="true"
|
||||
```
|
||||
|
||||
### 3. Advanced Network Configuration
|
||||
|
||||
```bash
|
||||
# VLAN and IPv6 configuration
|
||||
export var_vlan="100"
|
||||
@ -187,6 +210,7 @@ export var_mtu="9000"
|
||||
```
|
||||
|
||||
### 4. Storage Configuration
|
||||
|
||||
```bash
|
||||
# Custom storage locations
|
||||
export var_template_storage="nfs-storage"
|
||||
@ -206,6 +230,7 @@ The script validates variables at several points:
|
||||
## Common Variable Combinations
|
||||
|
||||
### Development Container
|
||||
|
||||
```bash
|
||||
export APP="dev-container"
|
||||
export CTID="200"
|
||||
@ -220,6 +245,7 @@ export ENABLE_PRIVILEGED="true"
|
||||
```
|
||||
|
||||
### Media Server with GPU
|
||||
|
||||
```bash
|
||||
export APP="plex"
|
||||
export CTID="300"
|
||||
@ -235,6 +261,7 @@ export ENABLE_PRIVILEGED="true"
|
||||
```
|
||||
|
||||
### Lightweight Service
|
||||
|
||||
```bash
|
||||
export APP="nginx"
|
||||
export CTID="400"
|
||||
|
||||
@ -9,30 +9,35 @@ This document provides a comprehensive reference of all functions in `build.func
|
||||
### Initialization Functions
|
||||
|
||||
#### `start()`
|
||||
|
||||
**Purpose**: Main entry point when build.func is sourced or executed
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Detects execution context (Proxmox host vs container)
|
||||
- Captures hard environment variables
|
||||
- Sets CT_TYPE based on context
|
||||
- Routes to appropriate workflow (install_script or update_script)
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `CT_TYPE`, `APP`, `CTID`
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `CT_TYPE`, `APP`, `CTID`
|
||||
|
||||
#### `variables()`
|
||||
|
||||
**Purpose**: Load and resolve all configuration variables using precedence chain
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Loads app-specific .vars file
|
||||
- Loads global default.vars file
|
||||
- Applies variable precedence chain
|
||||
- Sets all configuration variables
|
||||
**Dependencies**: `base_settings()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
**Dependencies**: `base_settings()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
|
||||
#### `base_settings()`
|
||||
|
||||
**Purpose**: Set built-in default values for all configuration variables
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
@ -43,28 +48,33 @@ This document provides a comprehensive reference of all functions in `build.func
|
||||
### UI and Menu Functions
|
||||
|
||||
#### `install_script()`
|
||||
|
||||
**Purpose**: Main installation workflow coordinator
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Displays installation mode selection menu
|
||||
- Coordinates the entire installation process
|
||||
- Handles user interaction and validation
|
||||
**Dependencies**: `variables()`, `build_container()`, `default_var_settings()`
|
||||
**Environment Variables Used**: `APP`, `CTID`, `var_hostname`
|
||||
**Dependencies**: `variables()`, `build_container()`, `default_var_settings()`
|
||||
**Environment Variables Used**: `APP`, `CTID`, `var_hostname`
|
||||
|
||||
#### `advanced_settings()`
|
||||
|
||||
**Purpose**: Provide advanced configuration options via whiptail menus
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Displays whiptail menus for configuration
|
||||
- Updates configuration variables based on user input
|
||||
- Validates user selections
|
||||
**Dependencies**: `select_storage()`, `detect_gpu_devices()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
**Dependencies**: `select_storage()`, `detect_gpu_devices()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
|
||||
#### `settings_menu()`
|
||||
|
||||
**Purpose**: Display and handle settings configuration menu
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
@ -75,58 +85,68 @@ This document provides a comprehensive reference of all functions in `build.func
|
||||
### Storage Functions
|
||||
|
||||
#### `select_storage()`
|
||||
|
||||
**Purpose**: Handle storage selection for templates and containers
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Resolves storage preselection
|
||||
- Prompts user for storage selection if needed
|
||||
- Validates storage availability
|
||||
- Sets var_template_storage and var_container_storage
|
||||
**Dependencies**: `resolve_storage_preselect()`, `choose_and_set_storage_for_file()`
|
||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`, `TEMPLATE_STORAGE`, `CONTAINER_STORAGE`
|
||||
**Dependencies**: `resolve_storage_preselect()`, `choose_and_set_storage_for_file()`
|
||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`, `TEMPLATE_STORAGE`, `CONTAINER_STORAGE`
|
||||
|
||||
#### `resolve_storage_preselect()`
|
||||
|
||||
**Purpose**: Resolve preselected storage options
|
||||
**Parameters**:
|
||||
|
||||
- `storage_type`: Type of storage (template or container)
|
||||
**Returns**: Storage name if valid, empty if invalid
|
||||
**Side Effects**: Validates storage availability
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
||||
**Returns**: Storage name if valid, empty if invalid
|
||||
**Side Effects**: Validates storage availability
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
||||
|
||||
#### `choose_and_set_storage_for_file()`
|
||||
|
||||
**Purpose**: Interactive storage selection via whiptail
|
||||
**Parameters**:
|
||||
|
||||
- `storage_type`: Type of storage (template or container)
|
||||
- `content_type`: Content type (vztmpl or rootdir)
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
- Displays whiptail menu
|
||||
- Updates storage variables
|
||||
- Validates selection
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `var_template_storage`, `var_container_storage`
|
||||
|
||||
### Container Creation Functions
|
||||
|
||||
#### `build_container()`
|
||||
|
||||
**Purpose**: Validate settings and prepare container creation
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Validates all configuration
|
||||
- Checks for conflicts
|
||||
- Prepares container configuration
|
||||
- Calls create_lxc_container()
|
||||
**Dependencies**: `create_lxc_container()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
**Dependencies**: `create_lxc_container()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
|
||||
#### `create_lxc_container()`
|
||||
|
||||
**Purpose**: Create the actual LXC container
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Creates LXC container with basic configuration
|
||||
- Configures network settings
|
||||
- Sets up storage and mount points
|
||||
@ -134,108 +154,176 @@ This document provides a comprehensive reference of all functions in `build.func
|
||||
- Sets resource limits
|
||||
- Configures startup options
|
||||
- Starts container
|
||||
**Dependencies**: `configure_gpu_passthrough()`, `fix_gpu_gids()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
**Dependencies**: `configure_gpu_passthrough()`, `fix_gpu_gids()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
|
||||
### GPU and Hardware Functions
|
||||
|
||||
#### `detect_gpu_devices()`
|
||||
|
||||
**Purpose**: Detect available GPU hardware on the system
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Scans for Intel, AMD, and NVIDIA GPUs
|
||||
- Updates var_gpu_type and var_gpu_devices
|
||||
- Determines GPU capabilities
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `var_gpu_type`, `var_gpu_devices`, `GPU_APPS`
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `var_gpu_type`, `var_gpu_devices`, `GPU_APPS`
|
||||
|
||||
#### `configure_gpu_passthrough()`
|
||||
|
||||
**Purpose**: Configure GPU passthrough for the container
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Adds GPU device entries to container config
|
||||
- Configures proper device permissions
|
||||
- Sets up device mapping
|
||||
- Updates /etc/pve/lxc/<ctid>.conf
|
||||
**Dependencies**: `detect_gpu_devices()`
|
||||
**Environment Variables Used**: `var_gpu`, `var_gpu_type`, `var_gpu_devices`, `CTID`
|
||||
**Dependencies**: `detect_gpu_devices()`
|
||||
**Environment Variables Used**: `var_gpu`, `var_gpu_type`, `var_gpu_devices`, `CTID`
|
||||
|
||||
#### `fix_gpu_gids()`
|
||||
|
||||
**Purpose**: Fix GPU group IDs after container creation
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Updates GPU group IDs in container
|
||||
- Ensures proper GPU access permissions
|
||||
- Configures video and render groups
|
||||
**Dependencies**: `configure_gpu_passthrough()`
|
||||
**Environment Variables Used**: `CTID`, `var_gpu_type`
|
||||
**Dependencies**: `configure_gpu_passthrough()`
|
||||
**Environment Variables Used**: `CTID`, `var_gpu_type`
|
||||
|
||||
### SSH Configuration Functions
|
||||
|
||||
#### `configure_ssh_settings()`
|
||||
|
||||
**Purpose**: Interactive SSH key and access configuration wizard
|
||||
**Parameters**:
|
||||
|
||||
- `step_info` (optional): Step indicator string (e.g., "Step 17/19") for consistent dialog headers
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
- Creates temporary file for SSH keys
|
||||
- Discovers and presents available SSH keys from host
|
||||
- Allows manual key entry or folder/glob scanning
|
||||
- Sets `SSH` variable to "yes" or "no" based on user selection
|
||||
- Sets `SSH_AUTHORIZED_KEY` if manual key provided
|
||||
- Populates `SSH_KEYS_FILE` with selected keys
|
||||
**Dependencies**: `ssh_discover_default_files()`, `ssh_build_choices_from_files()`
|
||||
**Environment Variables Used**: `SSH`, `SSH_AUTHORIZED_KEY`, `SSH_KEYS_FILE`
|
||||
|
||||
**SSH Key Source Options**:
|
||||
|
||||
1. `found` - Select from auto-detected host keys
|
||||
2. `manual` - Paste a single public key
|
||||
3. `folder` - Scan custom folder or glob pattern
|
||||
4. `none` - No SSH keys
|
||||
|
||||
**Note**: The "Enable root SSH access?" dialog is always shown, regardless of whether SSH keys or password are configured. This ensures users can always enable SSH access even with automatic login.
|
||||
|
||||
#### `ssh_discover_default_files()`
|
||||
|
||||
**Purpose**: Discover SSH public key files on the host system
|
||||
**Parameters**: None
|
||||
**Returns**: Array of discovered key file paths
|
||||
**Side Effects**: Scans common SSH key locations
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `var_ssh_import_glob`
|
||||
|
||||
#### `ssh_build_choices_from_files()`
|
||||
|
||||
**Purpose**: Build whiptail checklist choices from SSH key files
|
||||
**Parameters**:
|
||||
|
||||
- Array of file paths to process
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
- Sets `CHOICES` array for whiptail checklist
|
||||
- Sets `COUNT` variable with number of keys found
|
||||
- Creates `MAPFILE` for key tag to content mapping
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `CHOICES`, `COUNT`, `MAPFILE`
|
||||
|
||||
### Settings Persistence Functions
|
||||
|
||||
#### `default_var_settings()`
|
||||
|
||||
**Purpose**: Offer to save current settings as defaults
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Prompts user to save settings
|
||||
- Saves to default.vars file
|
||||
- Saves to app-specific .vars file
|
||||
**Dependencies**: `maybe_offer_save_app_defaults()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
**Dependencies**: `maybe_offer_save_app_defaults()`
|
||||
**Environment Variables Used**: All configuration variables
|
||||
|
||||
#### `maybe_offer_save_app_defaults()`
|
||||
|
||||
**Purpose**: Offer to save app-specific defaults
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Prompts user to save app-specific settings
|
||||
- Saves to app.vars file
|
||||
- Updates app-specific configuration
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `APP`, `SAVE_APP_DEFAULTS`
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `APP`, `SAVE_APP_DEFAULTS`
|
||||
|
||||
### Utility Functions
|
||||
|
||||
#### `validate_settings()`
|
||||
|
||||
**Purpose**: Validate all configuration settings
|
||||
**Parameters**: None
|
||||
**Returns**: 0 if valid, 1 if invalid
|
||||
**Side Effects**:
|
||||
|
||||
- Checks for configuration conflicts
|
||||
- Validates resource limits
|
||||
- Validates network configuration
|
||||
- Validates storage configuration
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: All configuration variables
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: All configuration variables
|
||||
|
||||
#### `check_conflicts()`
|
||||
|
||||
**Purpose**: Check for configuration conflicts
|
||||
**Parameters**: None
|
||||
**Returns**: 0 if no conflicts, 1 if conflicts found
|
||||
**Side Effects**:
|
||||
|
||||
- Checks for conflicting settings
|
||||
- Validates resource allocation
|
||||
- Checks network configuration
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: All configuration variables
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: All configuration variables
|
||||
|
||||
#### `cleanup_on_error()`
|
||||
|
||||
**Purpose**: Clean up resources on error
|
||||
**Parameters**: None
|
||||
**Returns**: None
|
||||
**Side Effects**:
|
||||
|
||||
- Removes partially created containers
|
||||
- Cleans up temporary files
|
||||
- Resets configuration
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `CTID`
|
||||
**Dependencies**: None
|
||||
**Environment Variables Used**: `CTID`
|
||||
|
||||
## Function Call Flow
|
||||
|
||||
### Main Installation Flow
|
||||
|
||||
```
|
||||
start()
|
||||
├── variables()
|
||||
@ -259,6 +347,7 @@ start()
|
||||
```
|
||||
|
||||
### Error Handling Flow
|
||||
|
||||
```
|
||||
Error Detection
|
||||
├── validate_settings()
|
||||
@ -271,24 +360,29 @@ Error Detection
|
||||
## Function Dependencies
|
||||
|
||||
### Core Dependencies
|
||||
|
||||
- `start()` → `install_script()` → `build_container()` → `create_lxc_container()`
|
||||
- `variables()` → `base_settings()`
|
||||
- `advanced_settings()` → `select_storage()` → `detect_gpu_devices()`
|
||||
|
||||
### Storage Dependencies
|
||||
|
||||
- `select_storage()` → `resolve_storage_preselect()`
|
||||
- `select_storage()` → `choose_and_set_storage_for_file()`
|
||||
|
||||
### GPU Dependencies
|
||||
|
||||
- `configure_gpu_passthrough()` → `detect_gpu_devices()`
|
||||
- `fix_gpu_gids()` → `configure_gpu_passthrough()`
|
||||
|
||||
### Settings Dependencies
|
||||
|
||||
- `default_var_settings()` → `maybe_offer_save_app_defaults()`
|
||||
|
||||
## Function Usage Examples
|
||||
|
||||
### Basic Container Creation
|
||||
|
||||
```bash
|
||||
# Set required variables
|
||||
export APP="plex"
|
||||
@ -304,6 +398,7 @@ start() # Entry point
|
||||
```
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
```bash
|
||||
# Set advanced variables
|
||||
export var_os="debian"
|
||||
@ -319,6 +414,7 @@ advanced_settings() # Interactive configuration
|
||||
```
|
||||
|
||||
### GPU Passthrough
|
||||
|
||||
```bash
|
||||
# Enable GPU passthrough
|
||||
export GPU_APPS="plex"
|
||||
@ -331,6 +427,7 @@ fix_gpu_gids() # Fix permissions
|
||||
```
|
||||
|
||||
### Settings Persistence
|
||||
|
||||
```bash
|
||||
# Save settings as defaults
|
||||
export SAVE_DEFAULTS="true"
|
||||
@ -344,15 +441,18 @@ maybe_offer_save_app_defaults() # Save app defaults
|
||||
## Function Error Handling
|
||||
|
||||
### Validation Functions
|
||||
|
||||
- `validate_settings()`: Returns 0 for valid, 1 for invalid
|
||||
- `check_conflicts()`: Returns 0 for no conflicts, 1 for conflicts
|
||||
|
||||
### Error Recovery
|
||||
|
||||
- `cleanup_on_error()`: Cleans up on any error
|
||||
- Error codes are propagated up the call stack
|
||||
- Critical errors cause script termination
|
||||
|
||||
### Error Types
|
||||
|
||||
1. **Configuration Errors**: Invalid settings or conflicts
|
||||
2. **Resource Errors**: Insufficient resources or conflicts
|
||||
3. **Network Errors**: Invalid network configuration
|
||||
|
||||
22
frontend/bun.lock
generated
22
frontend/bun.lock
generated
@ -31,7 +31,7 @@
|
||||
"lucide-react": "^0.554.0",
|
||||
"mini-svg-data-uri": "^1.4.4",
|
||||
"motion": "^12.23.12",
|
||||
"next": "15.5.2",
|
||||
"next": "15.5.7",
|
||||
"next-themes": "^0.4.4",
|
||||
"nuqs": "^2.4.1",
|
||||
"prettier-plugin-organize-imports": "^4.1.0",
|
||||
@ -331,25 +331,25 @@
|
||||
|
||||
"@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@0.2.12", "", { "dependencies": { "@emnapi/core": "^1.4.3", "@emnapi/runtime": "^1.4.3", "@tybys/wasm-util": "^0.10.0" } }, "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ=="],
|
||||
|
||||
"@next/env": ["@next/env@15.5.2", "", {}, "sha512-Qe06ew4zt12LeO6N7j8/nULSOe3fMXE4dM6xgpBQNvdzyK1sv5y4oAP3bq4LamrvGCZtmRYnW8URFCeX5nFgGg=="],
|
||||
"@next/env": ["@next/env@15.5.7", "", {}, "sha512-4h6Y2NyEkIEN7Z8YxkA27pq6zTkS09bUSYC0xjd0NpwFxjnIKeZEeH591o5WECSmjpUhLn3H2QLJcDye3Uzcvg=="],
|
||||
|
||||
"@next/eslint-plugin-next": ["@next/eslint-plugin-next@15.5.6", "", { "dependencies": { "fast-glob": "3.3.1" } }, "sha512-YxDvsT2fwy1j5gMqk3ppXlsgDopHnkM4BoxSVASbvvgh5zgsK8lvWerDzPip8k3WVzsTZ1O7A7si1KNfN4OZfQ=="],
|
||||
|
||||
"@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.5.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-8bGt577BXGSd4iqFygmzIfTYizHb0LGWqH+qgIF/2EDxS5JsSdERJKA8WgwDyNBZgTIIA4D8qUtoQHmxIIquoQ=="],
|
||||
"@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.5.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-IZwtxCEpI91HVU/rAUOOobWSZv4P2DeTtNaCdHqLcTJU4wdNXgAySvKa/qJCgR5m6KI8UsKDXtO2B31jcaw1Yw=="],
|
||||
|
||||
"@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.5.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-2DjnmR6JHK4X+dgTXt5/sOCu/7yPtqpYt8s8hLkHFK3MGkka2snTv3yRMdHvuRtJVkPwCGsvBSwmoQCHatauFQ=="],
|
||||
"@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.5.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-UP6CaDBcqaCBuiq/gfCEJw7sPEoX1aIjZHnBWN9v9qYHQdMKvCKcAVs4OX1vIjeE+tC5EIuwDTVIoXpUes29lg=="],
|
||||
|
||||
"@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.5.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-3j7SWDBS2Wov/L9q0mFJtEvQ5miIqfO4l7d2m9Mo06ddsgUK8gWfHGgbjdFlCp2Ek7MmMQZSxpGFqcC8zGh2AA=="],
|
||||
"@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.5.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-NCslw3GrNIw7OgmRBxHtdWFQYhexoUCq+0oS2ccjyYLtcn1SzGzeM54jpTFonIMUjNbHmpKpziXnpxhSWLcmBA=="],
|
||||
|
||||
"@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.5.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-s6N8k8dF9YGc5T01UPQ08yxsK6fUow5gG1/axWc1HVVBYQBgOjca4oUZF7s4p+kwhkB1bDSGR8QznWrFZ/Rt5g=="],
|
||||
"@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.5.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-nfymt+SE5cvtTrG9u1wdoxBr9bVB7mtKTcj0ltRn6gkP/2Nu1zM5ei8rwP9qKQP0Y//umK+TtkKgNtfboBxRrw=="],
|
||||
|
||||
"@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.5.2", "", { "os": "linux", "cpu": "x64" }, "sha512-o1RV/KOODQh6dM6ZRJGZbc+MOAHww33Vbs5JC9Mp1gDk8cpEO+cYC/l7rweiEalkSm5/1WGa4zY7xrNwObN4+Q=="],
|
||||
"@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.5.7", "", { "os": "linux", "cpu": "x64" }, "sha512-hvXcZvCaaEbCZcVzcY7E1uXN9xWZfFvkNHwbe/n4OkRhFWrs1J1QV+4U1BN06tXLdaS4DazEGXwgqnu/VMcmqw=="],
|
||||
|
||||
"@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.5.2", "", { "os": "linux", "cpu": "x64" }, "sha512-/VUnh7w8RElYZ0IV83nUcP/J4KJ6LLYliiBIri3p3aW2giF+PAVgZb6mk8jbQSB3WlTai8gEmCAr7kptFa1H6g=="],
|
||||
"@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.5.7", "", { "os": "linux", "cpu": "x64" }, "sha512-4IUO539b8FmF0odY6/SqANJdgwn1xs1GkPO5doZugwZ3ETF6JUdckk7RGmsfSf7ws8Qb2YB5It33mvNL/0acqA=="],
|
||||
|
||||
"@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.5.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-sMPyTvRcNKXseNQ/7qRfVRLa0VhR0esmQ29DD6pqvG71+JdVnESJaHPA8t7bc67KD5spP3+DOCNLhqlEI2ZgQg=="],
|
||||
"@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.5.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-CpJVTkYI3ZajQkC5vajM7/ApKJUOlm6uP4BknM3XKvJ7VXAvCqSjSLmM0LKdYzn6nBJVSjdclx8nYJSa3xlTgQ=="],
|
||||
|
||||
"@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.5.2", "", { "os": "win32", "cpu": "x64" }, "sha512-W5VvyZHnxG/2ukhZF/9Ikdra5fdNftxI6ybeVKYvBPDtyx7x4jPPSNduUkfH5fo3zG0JQ0bPxgy41af2JX5D4Q=="],
|
||||
"@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.5.7", "", { "os": "win32", "cpu": "x64" }, "sha512-gMzgBX164I6DN+9/PGA+9dQiwmTkE4TloBNx8Kv9UiGARsr9Nba7IpcBRA1iTV9vwlYnrE3Uy6I7Aj6qLjQuqw=="],
|
||||
|
||||
"@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],
|
||||
|
||||
@ -1331,7 +1331,7 @@
|
||||
|
||||
"natural-orderby": ["natural-orderby@5.0.0", "", {}, "sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg=="],
|
||||
|
||||
"next": ["next@15.5.2", "", { "dependencies": { "@next/env": "15.5.2", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.5.2", "@next/swc-darwin-x64": "15.5.2", "@next/swc-linux-arm64-gnu": "15.5.2", "@next/swc-linux-arm64-musl": "15.5.2", "@next/swc-linux-x64-gnu": "15.5.2", "@next/swc-linux-x64-musl": "15.5.2", "@next/swc-win32-arm64-msvc": "15.5.2", "@next/swc-win32-x64-msvc": "15.5.2", "sharp": "^0.34.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-H8Otr7abj1glFhbGnvUt3gz++0AF1+QoCXEBmd/6aKbfdFwrn0LpA836Ed5+00va/7HQSDD+mOoVhn3tNy3e/Q=="],
|
||||
"next": ["next@15.5.7", "", { "dependencies": { "@next/env": "15.5.7", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.5.7", "@next/swc-darwin-x64": "15.5.7", "@next/swc-linux-arm64-gnu": "15.5.7", "@next/swc-linux-arm64-musl": "15.5.7", "@next/swc-linux-x64-gnu": "15.5.7", "@next/swc-linux-x64-musl": "15.5.7", "@next/swc-win32-arm64-msvc": "15.5.7", "@next/swc-win32-x64-msvc": "15.5.7", "sharp": "^0.34.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-+t2/0jIJ48kUpGKkdlhgkv+zPTEOoXyr60qXe68eB/pl3CMJaLeIGjzp5D6Oqt25hCBiBTt8wEeeAzfJvUKnPQ=="],
|
||||
|
||||
"next-themes": ["next-themes@0.4.6", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="],
|
||||
|
||||
|
||||
2
frontend/package.json
generated
2
frontend/package.json
generated
@ -43,7 +43,7 @@
|
||||
"lucide-react": "^0.554.0",
|
||||
"mini-svg-data-uri": "^1.4.4",
|
||||
"motion": "^12.23.12",
|
||||
"next": "15.5.2",
|
||||
"next": "15.5.7",
|
||||
"next-themes": "^0.4.4",
|
||||
"nuqs": "^2.4.1",
|
||||
"prettier-plugin-organize-imports": "^4.1.0",
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"ram": 1024,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -33,8 +33,12 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Bookstack works only with static ip. If you Change the IP of your LXC, you Need to edit the .env File `nano /opt/bookstack/.env`",
|
||||
"text": "Bookstack works only with static IP. If you change the IP of your LXC, you need to edit the .env file",
|
||||
"type": "warning"
|
||||
},
|
||||
{
|
||||
"text": "To see database credentials, type `cat ~/bookstack.creds` in LXC console",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
52
frontend/public/json/coolify.json
Normal file
52
frontend/public/json/coolify.json
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "Coolify",
|
||||
"slug": "coolify",
|
||||
"categories": [
|
||||
6
|
||||
],
|
||||
"date_created": "2025-12-09",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8000,
|
||||
"documentation": "https://coolify.io/docs",
|
||||
"config_path": "/data/coolify",
|
||||
"website": "https://coolify.io/",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/coolify.webp",
|
||||
"description": "Coolify is an open-source & self-hostable alternative to Heroku, Netlify, and Vercel. It helps you manage your servers, applications, and databases on your own hardware with Docker. Deploy any application from Git repositories, Docker images, or use pre-built templates.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/coolify.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 4096,
|
||||
"hdd": 30,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Initial setup will be done via the web interface on first access.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Coolify has built-in auto-updates. You can configure update frequency in Settings.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Coolify requires SSH access to manage deployments. SSH is enabled automatically.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "This container uses Docker-in-Docker (nesting) for application deployments.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
48
frontend/public/json/dokploy.json
Normal file
48
frontend/public/json/dokploy.json
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "Dokploy",
|
||||
"slug": "dokploy",
|
||||
"categories": [
|
||||
6
|
||||
],
|
||||
"date_created": "2025-12-09",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://docs.dokploy.com/",
|
||||
"config_path": "/etc/dokploy",
|
||||
"website": "https://dokploy.com/",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/dokploy.png",
|
||||
"description": "Dokploy is a free, self-hostable Platform as a Service (PaaS) that simplifies the deployment and management of applications and databases. Built with Docker and Traefik, it offers features like automatic SSL, Docker Compose support, database backups, and a real-time monitoring dashboard.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/dokploy.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 10,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Initial setup will be done via the web interface on first access.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Dokploy has built-in auto-updates via the web interface.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "This container uses Docker-in-Docker (nesting) for application deployments.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
40
frontend/public/json/endurain.json
Normal file
40
frontend/public/json/endurain.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "Endurain",
|
||||
"slug": "endurain",
|
||||
"categories": [
|
||||
24
|
||||
],
|
||||
"date_created": "2025-12-05",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8080,
|
||||
"documentation": "https://docs.endurain.com/",
|
||||
"website": "https://github.com/joaovitoriasilva/endurain",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/endurain.webp",
|
||||
"config_path": "/opt/endurain/.env",
|
||||
"description": "Endurain is a self-hosted fitness tracking service designed to give users full control over their data and hosting environment. It's similar to Strava but focused on privacy and customization",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/endurain.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 5,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin",
|
||||
"password": "admin"
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "When using a reverse proxy, edit `/opt/endurain/frontend/app/dist/env.js`.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -22,8 +22,8 @@
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 6,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
"os": "ubuntu",
|
||||
"version": "24.04"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
35
frontend/public/json/metube.json
Normal file
35
frontend/public/json/metube.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "MeTube",
|
||||
"slug": "metube",
|
||||
"categories": [
|
||||
11
|
||||
],
|
||||
"date_created": "2025-12-05",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8081,
|
||||
"documentation": "https://github.com/alexta69/metube/blob/master/README.md",
|
||||
"website": "https://github.com/alexta69/metube",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icon@master/webp/metube.webp",
|
||||
"config_path": "/opt/metube/.env",
|
||||
"description": "MeTube allows you to download videos from YouTube and dozens of other sites.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/metube.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 2048,
|
||||
"hdd": 10,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
@ -10,7 +10,7 @@
|
||||
"privileged": false,
|
||||
"interface_port": 60072,
|
||||
"documentation": "https://github.com/mayanayza/netvisor",
|
||||
"config_path": "/opt/netvisor/.env",
|
||||
"config_path": "/opt/netvisor/.env, OIDC: /opt/netvisor/oidc.toml",
|
||||
"website": "https://github.com/mayanayza/netvisor",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/png/netvisor.png",
|
||||
"description": "Automatically discover and visually document network infrastructure",
|
||||
@ -33,11 +33,11 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "The integrated daemon config is located at `/root/.config/daemon/config.json`",
|
||||
"text": "To configure the integrated daemon after install is complete, either use the `Create Daemon` menu in the UI, or run `/root/configure_daemon.sh` for automatic configuration",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "When using a reverse proxy, edit `/opt/netvisor/ui/build/_app/env.js`: add 443 to `PUBLIC_SERVER_PORT` and remove 'default' from `PUBLIC_SERVER_HOSTNAME`.",
|
||||
"text": "The integrated daemon config is located at `/root/.config/daemon/config.json`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/opnsense.webp",
|
||||
"config_path": "",
|
||||
"description": "OPNsense is an open-source firewall and routing platform based on FreeBSD. It provides advanced security features, including intrusion detection, VPN support, traffic shaping, and web filtering, with an intuitive web interface for easy management. Known for its reliability and regular updates, OPNsense is a popular choice for both businesses and home networks.",
|
||||
"disable": true,
|
||||
"disable": false,
|
||||
"disable_description": "This script has been temporarily disabled due to installation failures. The OPNsense bootstrap process was not completing successfully, resulting in a plain FreeBSD VM instead of a functional OPNsense installation. The issue is being investigated and the script will be re-enabled once resolved. For more details, see: https://github.com/community-scripts/ProxmoxVE/issues/6183",
|
||||
"install_methods": [
|
||||
{
|
||||
|
||||
@ -35,10 +35,6 @@
|
||||
{
|
||||
"text": "Set a root password if using autologin. This will be the Proxmox-Datacenter-Manager password. `sudo passwd root`",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Proxmox Datacenter Manager is in an alpha stage of development. Use it cautiously, as bugs, incomplete features, and potential instabilities are expected.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
35
frontend/public/json/snowshare.json
Normal file
35
frontend/public/json/snowshare.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "SnowShare",
|
||||
"slug": "snowshare",
|
||||
"categories": [
|
||||
11
|
||||
],
|
||||
"date_created": "2025-12-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://github.com/TuroYT/snowshare",
|
||||
"config_path": "/opt/snowshare/.env",
|
||||
"website": "https://github.com/TuroYT/snowshare",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/png/snowshare.png",
|
||||
"description": "A modern, secure file and link sharing platform built with Next.js, Prisma, and NextAuth. Share URLs, code snippets, and files with customizable expiration, privacy, and QR codes.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/snowshare.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 1024,
|
||||
"hdd": 5,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
35
frontend/public/json/speedtest-tracker.json
Normal file
35
frontend/public/json/speedtest-tracker.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Speedtest-Tracker",
|
||||
"slug": "speedtest-tracker",
|
||||
"categories": [
|
||||
4
|
||||
],
|
||||
"date_created": "2025-12-09",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://docs.speedtest-tracker.dev/",
|
||||
"website": "https://github.com/alexjustesen/speedtest-tracker",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/speedtest-tracker.webp",
|
||||
"config_path": "/opt/speedtest-tracker/.env",
|
||||
"description": "Speedtest Tracker is a self-hosted application that runs scheduled speed tests using the Ookla Speedtest CLI and saves the results to a database for historical tracking and visualization.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/speedtest-tracker.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin@example.com",
|
||||
"password": "password"
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
@ -12,7 +12,7 @@
|
||||
"documentation": "https://swizzin.ltd/getting-started",
|
||||
"config_path": "/etc/swizzin/",
|
||||
"website": "https://swizzin.ltd/",
|
||||
"logo": "https://swizzin.ltd/img/logo-sm.png",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/swizzin.webp",
|
||||
"description": "Swizzin is a light-weight, modular, and user-friendly seedbox solution for Debian-based servers. It allows for the easy installation and management of a wide variety of applications commonly used for torrenting and media management, such as rTorrent, Sonarr, Radarr, and Plex, all accessible through a command-line utility or a web-based dashboard.",
|
||||
"install_methods": [
|
||||
{
|
||||
|
||||
@ -31,5 +31,10 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
"notes": [
|
||||
{
|
||||
"text": "Show Login Credentials, type `cat ~/valkey.creds` in the LXC console",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
"name": "Wanderer",
|
||||
"slug": "wanderer",
|
||||
"categories": [
|
||||
0
|
||||
24
|
||||
],
|
||||
"date_created": "2025-12-01",
|
||||
"type": "ct",
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"ram": 4096,
|
||||
"hdd": 8,
|
||||
"os": "debian",
|
||||
"version": "13"
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@ -11,18 +11,16 @@ import {
|
||||
Trophy,
|
||||
XCircle,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
Bar,
|
||||
BarChart,
|
||||
CartesianGrid,
|
||||
Cell,
|
||||
LabelList,
|
||||
XAxis,
|
||||
} from "recharts";
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { Bar, BarChart, CartesianGrid, Cell, LabelList, XAxis } from "recharts";
|
||||
|
||||
import type { ChartConfig } from "@/components/ui/chart";
|
||||
|
||||
import { formattedBadge } from "@/components/command-menu";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { ChartContainer, ChartTooltip, ChartTooltipContent } from "@/components/ui/chart";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@ -31,37 +29,10 @@ import {
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import {
|
||||
ChartContainer,
|
||||
ChartTooltip,
|
||||
ChartTooltipContent,
|
||||
} from "@/components/ui/chart";
|
||||
import { formattedBadge } from "@/components/command-menu";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
|
||||
type DataModel = {
|
||||
id: number;
|
||||
@ -141,7 +112,8 @@ export default function DataPage() {
|
||||
const [summaryRes, dataRes] = await Promise.all([
|
||||
fetch("https://api.htl-braunau.at/data/summary"),
|
||||
fetch(
|
||||
`https://api.htl-braunau.at/data/paginated?page=${currentPage}&limit=${itemsPerPage === 0 ? "" : itemsPerPage
|
||||
`https://api.htl-braunau.at/data/paginated?page=${currentPage}&limit=${
|
||||
itemsPerPage === 0 ? "" : itemsPerPage
|
||||
}`,
|
||||
),
|
||||
]);
|
||||
@ -158,11 +130,9 @@ export default function DataPage() {
|
||||
|
||||
setSummary(summaryData);
|
||||
setData(pageData);
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
setError((err as Error).message);
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
@ -171,8 +141,7 @@ export default function DataPage() {
|
||||
}, [currentPage, itemsPerPage]);
|
||||
|
||||
const sortedData = useMemo(() => {
|
||||
if (!sortConfig)
|
||||
return data;
|
||||
if (!sortConfig) return data;
|
||||
return [...data].sort((a, b) => {
|
||||
if (a[sortConfig.key] < b[sortConfig.key]) {
|
||||
return sortConfig.direction === "ascending" ? -1 : 1;
|
||||
@ -186,11 +155,7 @@ export default function DataPage() {
|
||||
|
||||
const requestSort = (key: string) => {
|
||||
let direction: "ascending" | "descending" = "ascending";
|
||||
if (
|
||||
sortConfig
|
||||
&& sortConfig.key === key
|
||||
&& sortConfig.direction === "ascending"
|
||||
) {
|
||||
if (sortConfig && sortConfig.key === key && sortConfig.direction === "ascending") {
|
||||
direction = "descending";
|
||||
}
|
||||
setSortConfig({ key, direction });
|
||||
@ -205,10 +170,8 @@ export default function DataPage() {
|
||||
};
|
||||
|
||||
const getTypeBadge = (type: string) => {
|
||||
if (type === "lxc")
|
||||
return formattedBadge("ct");
|
||||
if (type === "vm")
|
||||
return formattedBadge("vm");
|
||||
if (type === "lxc") return formattedBadge("ct");
|
||||
if (type === "vm") return formattedBadge("vm");
|
||||
return null;
|
||||
};
|
||||
|
||||
@ -219,8 +182,7 @@ export default function DataPage() {
|
||||
const successRate = totalCount > 0 ? (successCount / totalCount) * 100 : 0;
|
||||
|
||||
const allApps = useMemo(() => {
|
||||
if (!summary?.nsapp_count)
|
||||
return [];
|
||||
if (!summary?.nsapp_count) return [];
|
||||
return Object.entries(summary.nsapp_count).sort(([, a], [, b]) => b - a);
|
||||
}, [summary]);
|
||||
|
||||
@ -255,9 +217,7 @@ export default function DataPage() {
|
||||
{/* Header */}
|
||||
<div>
|
||||
<h1 className="text-3xl font-bold tracking-tight">Analytics</h1>
|
||||
<p className="text-muted-foreground">
|
||||
Overview of container installations and system statistics.
|
||||
</p>
|
||||
<p className="text-muted-foreground">Overview of container installations and system statistics.</p>
|
||||
</div>
|
||||
|
||||
{/* Widgets */}
|
||||
@ -269,9 +229,7 @@ export default function DataPage() {
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-2xl font-bold">{nf.format(totalCount)}</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Total LXC/VM entries found
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">Total LXC/VM entries found</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@ -281,15 +239,8 @@ export default function DataPage() {
|
||||
<CheckCircle2 className="h-4 w-4 text-green-500" />
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-2xl font-bold">
|
||||
{successRate.toFixed(1)}
|
||||
%
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{nf.format(successCount)}
|
||||
{" "}
|
||||
successful installations
|
||||
</p>
|
||||
<div className="text-2xl font-bold">{successRate.toFixed(1)}%</div>
|
||||
<p className="text-xs text-muted-foreground">{nf.format(successCount)} successful installations</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@ -300,9 +251,7 @@ export default function DataPage() {
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-2xl font-bold">{nf.format(failureCount)}</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Installations encountered errors
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">Installations encountered errors</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@ -312,13 +261,9 @@ export default function DataPage() {
|
||||
<Trophy className="h-4 w-4 text-yellow-500" />
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="truncate text-2xl font-bold">
|
||||
{mostPopularApp ? mostPopularApp[0] : "N/A"}
|
||||
</div>
|
||||
<div className="truncate text-2xl font-bold">{mostPopularApp ? mostPopularApp[0] : "N/A"}</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{mostPopularApp ? nf.format(mostPopularApp[1]) : 0}
|
||||
{" "}
|
||||
installations
|
||||
{mostPopularApp ? nf.format(mostPopularApp[1]) : 0} installations
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@ -329,9 +274,7 @@ export default function DataPage() {
|
||||
<CardHeader className="flex flex-row items-center justify-between">
|
||||
<div className="space-y-1.5">
|
||||
<CardTitle>Top Applications</CardTitle>
|
||||
<CardDescription>
|
||||
The most frequently installed applications.
|
||||
</CardDescription>
|
||||
<CardDescription>The most frequently installed applications.</CardDescription>
|
||||
</div>
|
||||
<Dialog>
|
||||
<DialogTrigger asChild>
|
||||
@ -343,26 +286,14 @@ export default function DataPage() {
|
||||
<DialogContent className="max-h-[80vh] sm:max-w-md">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Application Statistics</DialogTitle>
|
||||
<DialogDescription>
|
||||
Installation counts for all
|
||||
{" "}
|
||||
{allApps.length}
|
||||
{" "}
|
||||
applications.
|
||||
</DialogDescription>
|
||||
<DialogDescription>Installation counts for all {allApps.length} applications.</DialogDescription>
|
||||
</DialogHeader>
|
||||
<ScrollArea className="h-[60vh] w-full rounded-md border p-4">
|
||||
<div className="space-y-4">
|
||||
{allApps.map(([name, count], index) => (
|
||||
<div
|
||||
key={name}
|
||||
className="flex items-center justify-between text-sm"
|
||||
>
|
||||
<div key={name} className="flex items-center justify-between text-sm">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="w-8 font-mono text-muted-foreground">
|
||||
{index + 1}
|
||||
.
|
||||
</span>
|
||||
<span className="w-8 font-mono text-muted-foreground">{index + 1}.</span>
|
||||
<span className="font-medium">{name}</span>
|
||||
</div>
|
||||
<span className="font-mono">{nf.format(count)}</span>
|
||||
@ -375,47 +306,37 @@ export default function DataPage() {
|
||||
</CardHeader>
|
||||
<CardContent className="pl-2">
|
||||
<div className="h-[300px] w-full">
|
||||
{loading
|
||||
? (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||
</div>
|
||||
)
|
||||
: (
|
||||
<ChartContainer config={chartConfigApps} className="h-full w-full">
|
||||
<BarChart
|
||||
accessibilityLayer
|
||||
data={appsChartData}
|
||||
margin={{
|
||||
top: 20,
|
||||
}}
|
||||
>
|
||||
<CartesianGrid vertical={false} />
|
||||
<XAxis
|
||||
dataKey="app"
|
||||
tickLine={false}
|
||||
tickMargin={10}
|
||||
axisLine={false}
|
||||
tickFormatter={value => (value.length > 8 ? `${value.slice(0, 8)}...` : value)}
|
||||
/>
|
||||
<ChartTooltip
|
||||
cursor={false}
|
||||
content={<ChartTooltipContent nameKey="app" />}
|
||||
/>
|
||||
<Bar dataKey="count" radius={8}>
|
||||
{appsChartData.map((entry, index) => (
|
||||
<Cell key={`cell-${index}`} fill={entry.fill} />
|
||||
))}
|
||||
<LabelList
|
||||
position="top"
|
||||
offset={12}
|
||||
className="fill-foreground"
|
||||
fontSize={12}
|
||||
/>
|
||||
</Bar>
|
||||
</BarChart>
|
||||
</ChartContainer>
|
||||
)}
|
||||
{loading ? (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||
</div>
|
||||
) : (
|
||||
<ChartContainer config={chartConfigApps} className="h-full w-full">
|
||||
<BarChart
|
||||
accessibilityLayer
|
||||
data={appsChartData}
|
||||
margin={{
|
||||
top: 20,
|
||||
}}
|
||||
>
|
||||
<CartesianGrid vertical={false} />
|
||||
<XAxis
|
||||
dataKey="app"
|
||||
tickLine={false}
|
||||
tickMargin={10}
|
||||
axisLine={false}
|
||||
tickFormatter={(value) => (value.length > 8 ? `${value.slice(0, 8)}...` : value)}
|
||||
/>
|
||||
<ChartTooltip cursor={false} content={<ChartTooltipContent nameKey="app" />} />
|
||||
<Bar dataKey="count" radius={8}>
|
||||
{appsChartData.map((entry, index) => (
|
||||
<Cell key={`cell-${index}`} fill={entry.fill} />
|
||||
))}
|
||||
<LabelList position="top" offset={12} className="fill-foreground" fontSize={12} />
|
||||
</Bar>
|
||||
</BarChart>
|
||||
</ChartContainer>
|
||||
)}
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@ -425,15 +346,10 @@ export default function DataPage() {
|
||||
<CardHeader className="flex flex-row items-center justify-between">
|
||||
<div>
|
||||
<CardTitle>Installation Log</CardTitle>
|
||||
<CardDescription>
|
||||
Detailed records of all container creation attempts.
|
||||
</CardDescription>
|
||||
<CardDescription>Detailed records of all container creation attempts.</CardDescription>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Select
|
||||
value={String(itemsPerPage)}
|
||||
onValueChange={val => setItemsPerPage(Number(val))}
|
||||
>
|
||||
<Select value={String(itemsPerPage)} onValueChange={(val) => setItemsPerPage(Number(val))}>
|
||||
<SelectTrigger className="w-[80px]">
|
||||
<SelectValue placeholder="Limit" />
|
||||
</SelectTrigger>
|
||||
@ -451,161 +367,108 @@ export default function DataPage() {
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead
|
||||
className="w-[100px] cursor-pointer"
|
||||
onClick={() => requestSort("status")}
|
||||
>
|
||||
<TableHead className="w-[100px] cursor-pointer" onClick={() => requestSort("status")}>
|
||||
Status
|
||||
{sortConfig?.key === "status" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "status" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="cursor-pointer"
|
||||
onClick={() => requestSort("type")}
|
||||
>
|
||||
<TableHead className="cursor-pointer" onClick={() => requestSort("type")}>
|
||||
Type
|
||||
{sortConfig?.key === "type" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "type" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="cursor-pointer"
|
||||
onClick={() => requestSort("nsapp")}
|
||||
>
|
||||
<TableHead className="cursor-pointer" onClick={() => requestSort("nsapp")}>
|
||||
Application
|
||||
{sortConfig?.key === "nsapp" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "nsapp" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="hidden cursor-pointer md:table-cell"
|
||||
onClick={() => requestSort("os_type")}
|
||||
>
|
||||
<TableHead className="hidden cursor-pointer md:table-cell" onClick={() => requestSort("os_type")}>
|
||||
OS
|
||||
{sortConfig?.key === "os_type" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "os_type" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="hidden cursor-pointer md:table-cell"
|
||||
onClick={() => requestSort("disk_size")}
|
||||
>
|
||||
Disk Size
|
||||
{sortConfig?.key === "disk_size" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "disk_size" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="hidden cursor-pointer lg:table-cell"
|
||||
onClick={() => requestSort("core_count")}
|
||||
>
|
||||
Core Count
|
||||
{sortConfig?.key === "core_count" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "core_count" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="hidden cursor-pointer lg:table-cell"
|
||||
onClick={() => requestSort("ram_size")}
|
||||
>
|
||||
RAM Size
|
||||
{sortConfig?.key === "ram_size" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "ram_size" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
<TableHead
|
||||
className="cursor-pointer text-right"
|
||||
onClick={() => requestSort("created_at")}
|
||||
>
|
||||
<TableHead className="cursor-pointer text-right" onClick={() => requestSort("created_at")}>
|
||||
Created At
|
||||
{sortConfig?.key === "created_at" && (
|
||||
<ArrowUpDown className="ml-2 inline h-4 w-4" />
|
||||
)}
|
||||
{sortConfig?.key === "created_at" && <ArrowUpDown className="ml-2 inline h-4 w-4" />}
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{loading
|
||||
? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={8} className="h-24 text-center">
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<Loader2 className="h-4 w-4 animate-spin" />
|
||||
{" "}
|
||||
Loading data...
|
||||
</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)
|
||||
: sortedData.length > 0
|
||||
? (
|
||||
sortedData.map((item, idx) => (
|
||||
<TableRow key={`${item.id}-${idx}`}>
|
||||
<TableCell>
|
||||
{item.status === "done"
|
||||
? (
|
||||
<Badge className="text-green-500/75 border-green-500/75">
|
||||
Success
|
||||
</Badge>
|
||||
)
|
||||
: item.status === "failed"
|
||||
? (
|
||||
<Badge className="text-red-500/75 border-red-500/75">
|
||||
Failed
|
||||
</Badge>
|
||||
)
|
||||
: item.status === "installing"
|
||||
? (
|
||||
<Badge className="text-blue-500/75 border-blue-500/75">
|
||||
Installing
|
||||
</Badge>
|
||||
)
|
||||
: (
|
||||
<Badge variant="outline">
|
||||
{item.status}
|
||||
</Badge>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{getTypeBadge(item.type) || (
|
||||
<Badge variant="outline">
|
||||
{item.type}
|
||||
</Badge>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell className="font-medium">
|
||||
{item.nsapp}
|
||||
</TableCell>
|
||||
<TableCell className="hidden md:table-cell">
|
||||
{item.os_type}
|
||||
{" "}
|
||||
{item.os_version}
|
||||
</TableCell>
|
||||
<TableCell className="hidden md:table-cell">
|
||||
{item.disk_size}
|
||||
MB
|
||||
</TableCell>
|
||||
<TableCell className="hidden lg:table-cell">
|
||||
{item.core_count}
|
||||
</TableCell>
|
||||
<TableCell className="hidden lg:table-cell">
|
||||
{item.ram_size}
|
||||
MB
|
||||
</TableCell>
|
||||
<TableCell className="text-right">
|
||||
{formatDate(item.created_at)}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))
|
||||
)
|
||||
: (
|
||||
<TableRow>
|
||||
<TableCell colSpan={8} className="h-24 text-center">
|
||||
No results found.
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)}
|
||||
{loading ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={8} className="h-24 text-center">
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<Loader2 className="h-4 w-4 animate-spin" /> Loading data...
|
||||
</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : sortedData.length > 0 ? (
|
||||
sortedData.map((item, idx) => (
|
||||
<TableRow key={`${item.id}-${idx}`}>
|
||||
<TableCell>
|
||||
{item.status === "done" ? (
|
||||
<Badge className="text-green-500/75 border-green-500/75">Success</Badge>
|
||||
) : item.status === "failed" ? (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Badge className="text-red-500/75 border-red-500/75 cursor-help">Failed</Badge>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="max-w-xs">
|
||||
<p className="font-semibold">Error:</p>
|
||||
<p className="text-sm">{item.error || "Unknown error"}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
) : item.status === "installing" ? (
|
||||
<Badge className="text-blue-500/75 border-blue-500/75">Installing</Badge>
|
||||
) : (
|
||||
<Badge variant="outline">{item.status}</Badge>
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{getTypeBadge(item.type) || <Badge variant="outline">{item.type}</Badge>}
|
||||
</TableCell>
|
||||
<TableCell className="font-medium">{item.nsapp}</TableCell>
|
||||
<TableCell className="hidden md:table-cell">
|
||||
{item.os_type} {item.os_version}
|
||||
</TableCell>
|
||||
<TableCell className="hidden md:table-cell">
|
||||
{item.disk_size}
|
||||
GB
|
||||
</TableCell>
|
||||
<TableCell className="hidden lg:table-cell">{item.core_count}</TableCell>
|
||||
<TableCell className="hidden lg:table-cell">
|
||||
{item.ram_size}
|
||||
MB
|
||||
</TableCell>
|
||||
<TableCell className="text-right">{formatDate(item.created_at)}</TableCell>
|
||||
</TableRow>
|
||||
))
|
||||
) : (
|
||||
<TableRow>
|
||||
<TableCell colSpan={8} className="h-24 text-center">
|
||||
No results found.
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
@ -614,21 +477,17 @@ export default function DataPage() {
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => setCurrentPage(prev => Math.max(prev - 1, 1))}
|
||||
onClick={() => setCurrentPage((prev) => Math.max(prev - 1, 1))}
|
||||
disabled={currentPage === 1 || loading}
|
||||
>
|
||||
<ChevronLeft className="mr-2 h-4 w-4" />
|
||||
Previous
|
||||
</Button>
|
||||
<div className="text-sm text-muted-foreground">
|
||||
Page
|
||||
{" "}
|
||||
{currentPage}
|
||||
</div>
|
||||
<div className="text-sm text-muted-foreground">Page {currentPage}</div>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => setCurrentPage(prev => prev + 1)}
|
||||
onClick={() => setCurrentPage((prev) => prev + 1)}
|
||||
disabled={loading || sortedData.length < itemsPerPage}
|
||||
>
|
||||
Next
|
||||
|
||||
@ -34,7 +34,7 @@ export default function CodeCopyButton({
|
||||
localStorage.setItem("warning", "1");
|
||||
setTimeout(() => {
|
||||
toast.error(
|
||||
"Be careful when copying scripts from the internet. Always remember check the source!",
|
||||
"Be careful when copying scripts from the internet. Always remember to check the source!",
|
||||
{ duration: 8000 },
|
||||
);
|
||||
}, 500);
|
||||
|
||||
@ -34,9 +34,4 @@ export const FAQ_Items = [
|
||||
content:
|
||||
"If an LXC script fails, run it again using Verbose mode. Standard mode hides detailed output for neatness, showing only progress. Verbose mode displays all messages, which helps you (and us) diagnose the error. Include this verbose output if you report the issue.",
|
||||
},
|
||||
{
|
||||
title: "What does \"Updatable\" and \"Not updatable\" mean?",
|
||||
content:
|
||||
"Updatable means that script has a function that is used to update the installed application to the latest version available. Not updatable means that script doesn't have a function that can safely update the application to the latest version available, so only the LXC OS is updated.",
|
||||
},
|
||||
];
|
||||
|
||||
@ -14,43 +14,26 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
lsb-release \
|
||||
nginx
|
||||
$STD apt install -y nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,mysql,cli" PHP_FPM="YES" setup_php
|
||||
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,mysql,cli,tokenizer,dom,redis,session,openssl" PHP_FPM="YES" setup_php
|
||||
setup_composer
|
||||
setup_mariadb
|
||||
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME=2fauth_db
|
||||
DB_USER=2fauth
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "2FAuth Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/2FAuth.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
MARIADB_DB_NAME="2fauth_db" MARIADB_DB_USER="2fauth" setup_mariadb_db
|
||||
import_local_ip
|
||||
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
|
||||
|
||||
msg_info "Setup 2FAuth"
|
||||
cd /opt/2fauth || exit
|
||||
cd /opt/2fauth
|
||||
cp .env.example .env
|
||||
IPADDRESS=$(hostname -I | awk '{print $1}')
|
||||
sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \
|
||||
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
|
||||
-e "s|^DB_DATABASE=$|DB_DATABASE=$DB_NAME|" \
|
||||
-e "s|^DB_HOST=$|DB_HOST=127.0.0.1|" \
|
||||
-e "s|^DB_PORT=$|DB_PORT=3306|" \
|
||||
-e "s|^DB_USERNAME=$|DB_USERNAME=$DB_USER|" \
|
||||
-e "s|^DB_PASSWORD=$|DB_PASSWORD=$DB_PASS|" .env
|
||||
sed -i -e "s|^APP_URL=.*|APP_URL=http://$LOCAL_IP|" \
|
||||
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
|
||||
-e "s|^DB_DATABASE=$|DB_DATABASE=$MARIADB_DB_NAME|" \
|
||||
-e "s|^DB_HOST=$|DB_HOST=127.0.0.1|" \
|
||||
-e "s|^DB_PORT=$|DB_PORT=3306|" \
|
||||
-e "s|^DB_USERNAME=$|DB_USERNAME=$MARIADB_DB_USER|" \
|
||||
-e "s|^DB_PASSWORD=$|DB_PASSWORD=$MARIADB_DB_PASS|" .env
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer update --no-plugins --no-scripts
|
||||
$STD composer install --no-dev --prefer-dist --no-plugins --no-scripts
|
||||
@ -68,7 +51,7 @@ cat <<EOF >/etc/nginx/conf.d/2fauth.conf
|
||||
server {
|
||||
listen 80;
|
||||
root /opt/2fauth/public;
|
||||
server_name $IPADDRESS;
|
||||
server_name $LOCAL_IP;
|
||||
index index.php;
|
||||
charset utf-8;
|
||||
|
||||
|
||||
@ -25,38 +25,20 @@ msg_ok "Installed Dependencies"
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
|
||||
PG_VERSION="17" PG_MODULES="postgis" setup_postgresql
|
||||
|
||||
msg_info "Set up PostgreSQL Database"
|
||||
DB_NAME="adventurelog_db"
|
||||
DB_USER="adventurelog_user"
|
||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
||||
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$STD sudo -u postgres psql -c "CREATE EXTENSION IF NOT EXISTS postgis;" $DB_NAME
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||
{
|
||||
echo "AdventureLog-Credentials"
|
||||
echo "AdventureLog Database User: $DB_USER"
|
||||
echo "AdventureLog Database Password: $DB_PASS"
|
||||
echo "AdventureLog Database Name: $DB_NAME"
|
||||
echo "AdventureLog Secret: $SECRET_KEY"
|
||||
} >>~/adventurelog.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" PG_DB_EXTENSIONS="postgis" setup_postgresql_db
|
||||
fetch_and_deploy_gh_release "adventurelog" "seanmorley15/adventurelog"
|
||||
import_local_ip
|
||||
|
||||
msg_info "Installing AdventureLog (Patience)"
|
||||
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
|
||||
echo "AdventureLog Secret: $SECRET_KEY" >>~/adventurelog.creds
|
||||
DJANGO_ADMIN_USER="djangoadmin"
|
||||
DJANGO_ADMIN_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
||||
cat <<EOF >/opt/adventurelog/backend/server/.env
|
||||
PGHOST='localhost'
|
||||
PGDATABASE='${DB_NAME}'
|
||||
PGUSER='${DB_USER}'
|
||||
PGPASSWORD='${DB_PASS}'
|
||||
PGDATABASE='${PG_DB_NAME}'
|
||||
PGUSER='${PG_DB_USER}'
|
||||
PGPASSWORD='${PG_DB_PASS}'
|
||||
SECRET_KEY='${SECRET_KEY}'
|
||||
PUBLIC_URL='http://$LOCAL_IP:8000'
|
||||
DEBUG=True
|
||||
@ -74,7 +56,7 @@ DISABLE_REGISTRATION=False
|
||||
# EMAIL_HOST_PASSWORD='password'
|
||||
# DEFAULT_FROM_EMAIL='user@example.com'
|
||||
EOF
|
||||
cd /opt/adventurelog/backend/server || exit
|
||||
cd /opt/adventurelog/backend/server
|
||||
mkdir -p /opt/adventurelog/backend/server/media
|
||||
$STD uv venv /opt/adventurelog/backend/server/.venv
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m ensurepip --upgrade
|
||||
@ -88,13 +70,13 @@ PUBLIC_SERVER_URL=http://$LOCAL_IP:8000
|
||||
BODY_SIZE_LIMIT=Infinity
|
||||
ORIGIN='http://$LOCAL_IP:3000'
|
||||
EOF
|
||||
cd /opt/adventurelog/frontend || exit
|
||||
cd /opt/adventurelog/frontend
|
||||
$STD pnpm i
|
||||
$STD pnpm build
|
||||
msg_ok "Installed AdventureLog"
|
||||
|
||||
msg_info "Setting up Django Admin"
|
||||
cd /opt/adventurelog/backend/server || exit
|
||||
cd /opt/adventurelog/backend/server
|
||||
$STD .venv/bin/python -m manage shell <<EOF
|
||||
from django.contrib.auth import get_user_model
|
||||
UserModel = get_user_model()
|
||||
|
||||
@ -43,6 +43,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
jq
|
||||
|
||||
sed -i 's|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf
|
||||
sed -i 's|/usr/bin/php-cgi|/usr/bin/php-cgi83|g' /etc/lighttpd/mod_fastcgi.conf
|
||||
mkdir -p /var/www/localhost/htdocs
|
||||
ADMINER_VERSION=$(curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/^v//')
|
||||
curl -fsSL "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" -o /var/www/localhost/htdocs/adminer.php
|
||||
|
||||
@ -56,6 +56,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
jq
|
||||
|
||||
sed -i 's|# *include "mod_fastcgi.conf"|include "mod_fastcgi.conf"|' /etc/lighttpd/lighttpd.conf
|
||||
sed -i 's|/usr/bin/php-cgi|/usr/bin/php-cgi83|g' /etc/lighttpd/mod_fastcgi.conf
|
||||
mkdir -p /var/www/localhost/htdocs
|
||||
ADMINER_VERSION=$(curl -fsSL https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/^v//')
|
||||
curl -fsSL "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php" -o /var/www/localhost/htdocs/adminer.php
|
||||
|
||||
@ -18,7 +18,7 @@ $STD apt-get install -y nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "booklore" "booklore-app/BookLore"
|
||||
JAVA_VERSION="25" setup_java
|
||||
JAVA_VERSION="21" setup_java
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
setup_mariadb
|
||||
setup_yq
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user