Compare commits

..

2 Commits

Author SHA1 Message Date
bff7933b10 git 2025-06-24 16:16:11 +02:00
41e64e7d83 GoMFT: tmpl bugfix to work with current version until a new release pushed 2025-06-24 16:14:25 +02:00
22 changed files with 189 additions and 316 deletions

View File

@ -14,19 +14,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
## 2025-06-25
### 🚀 Updated Scripts
- #### ✨ New Features
- tools.func: new helper for imagemagick [@MickLesk](https://github.com/MickLesk) ([#5452](https://github.com/community-scripts/ProxmoxVE/pull/5452))
- YunoHost: add Update-Function [@MickLesk](https://github.com/MickLesk) ([#5450](https://github.com/community-scripts/ProxmoxVE/pull/5450))
- #### 🔧 Refactor
- Refactor: Tailscale [@MickLesk](https://github.com/MickLesk) ([#5454](https://github.com/community-scripts/ProxmoxVE/pull/5454))
## 2025-06-24
### 🆕 New Scripts
@ -37,18 +24,13 @@ All LXC instances created using this repository come pre-installed with Midnight
- #### 🐞 Bug Fixes
- GoMFT: tmpl bugfix to work with current version until a new release pushed [@MickLesk](https://github.com/MickLesk) ([#5435](https://github.com/community-scripts/ProxmoxVE/pull/5435))
- Update all Alpine Scripts to atleast 1GB HDD [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#5418](https://github.com/community-scripts/ProxmoxVE/pull/5418))
- #### ✨ New Features
- general: update all alpine scripts to version 3.22 [@MickLesk](https://github.com/MickLesk) ([#5428](https://github.com/community-scripts/ProxmoxVE/pull/5428))
- Minio: use latest version or latest feature rich version [@MickLesk](https://github.com/MickLesk) ([#5423](https://github.com/community-scripts/ProxmoxVE/pull/5423))
- [core]: Improve GitHub release fetch robustness with split timeouts and retry logic [@MickLesk](https://github.com/MickLesk) ([#5422](https://github.com/community-scripts/ProxmoxVE/pull/5422))
- #### 💥 Breaking Changes
- bump scripts (Installer) from Ubuntu 22.04 to Ubuntu 24.04 (agentdvr, emby, jellyfin, plex, shinobi) [@MickLesk](https://github.com/MickLesk) ([#5434](https://github.com/community-scripts/ProxmoxVE/pull/5434))
- Minio: use latest version or latest feature rich version [@MickLesk](https://github.com/MickLesk) ([#5423](https://github.com/community-scripts/ProxmoxVE/pull/5423))
- #### 🔧 Refactor

View File

@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_version="${var_version:-22.04}"
var_unprivileged="${var_unprivileged:-0}"
header_info "$APP"
@ -20,15 +20,15 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/agentdvr ]]; then
msg_error "No ${APP} Installation Found!"
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/agentdvr ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_error "Currently we don't provide an update function for this ${APP}."
exit
fi
msg_error "Currently we don't provide an update function for this ${APP}."
exit
}
start
@ -38,4 +38,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}:8090${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8090${CL}"

View File

@ -8,8 +8,8 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="Docmost"
var_tags="${var_tags:-documents}"
var_cpu="${var_cpu:-3}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-8}"
var_ram="${var_ram:-3072}"
var_disk="${var_disk:-7}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"

View File

@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_version="${var_version:-22.04}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"

View File

@ -1,6 +1,6 @@
____ _ ______ ______ ____________________________
/ __ \/ | / / /\ \/ / __ \/ ____/ ____/ _/ ____/ ____/
/ / / / |/ / / \ / / / / /_ / /_ / // / / __/
/ /_/ / /| / /___/ / /_/ / __/ / __/ _/ // /___/ /___
\____/_/ |_/_____/_/\____/_/ /_/ /___/\____/_____/
____ _ ______ ______ ____________________________ ____
/ __ \/ | / / /\ \/ / __ \/ ____/ ____/ _/ ____/ ____/ / __ \____ __________
/ / / / |/ / / \ / / / / /_ / /_ / // / / __/ / / / / __ \/ ___/ ___/
/ /_/ / /| / /___/ / /_/ / __/ / __/ _/ // /___/ /___ / /_/ / /_/ / /__(__ )
\____/_/ |_/_____/_/\____/_/ /_/ /___/\____/_____/ /_____/\____/\___/____/

View File

@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_version="${var_version:-22.04}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
@ -20,19 +20,19 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /usr/lib/jellyfin ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP} LXC"
$STD apt-get update
$STD apt-get -y upgrade
$STD apt-get -y --with-new-pkgs upgrade jellyfin jellyfin-server
msg_ok "Updated ${APP} LXC"
exit
header_info
check_container_storage
check_container_resources
if [[ ! -d /usr/lib/jellyfin ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP} LXC"
$STD apt-get update
$STD apt-get -y upgrade
$STD apt-get -y --with-new-pkgs upgrade jellyfin jellyfin-server
msg_ok "Updated ${APP} LXC"
exit
}
start
@ -42,4 +42,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}:8096${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8096${CL}"

View File

@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.onlyoffice.com/
APP="ONLYOFFICE"
APP="ONLYOFFICE Docs"
var_tags="${var_tags:-word;excel;powerpoint;pdf}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"

View File

@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_version="${var_version:-22.04}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"

View File

@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_version="${var_version:-22.04}"
var_unprivileged="${var_unprivileged:-0}"
header_info "$APP"
@ -44,4 +44,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}:8080/super${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080/super${CL}"

View File

@ -20,24 +20,18 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then
msg_error "No ${APP} Installation Found!"
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
fi
msg_info "Updating OS"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated OS"
msg_info "Updating $APP LXC"
$STD yunohost tools update
$STD yunohost tools upgrade system
$STD yunohost tools upgrade apps
msg_ok "Updated $APP LXC"
exit
}
start
@ -47,4 +41,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}${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

View File

@ -32,6 +32,10 @@
"password": null
},
"notes": [
{
"text": "Only supported on Debian 12 LXCs",
"type": "warning"
},
{
"text": "After the script finishes, reboot the LXC then run `tailscale up` in the LXC console",
"type": "info"

View File

@ -23,7 +23,7 @@
"ram": 2048,
"hdd": 8,
"os": "ubuntu",
"version": "24.04"
"version": "22.04"
}
}
],

View File

@ -20,8 +20,8 @@
"script": "ct/docmost.sh",
"resources": {
"cpu": 3,
"ram": 4096,
"hdd": 8,
"ram": 3072,
"hdd": 7,
"os": "debian",
"version": "12"
}

View File

@ -23,7 +23,7 @@
"ram": 2048,
"hdd": 8,
"os": "ubuntu",
"version": "24.04"
"version": "22.04"
}
}
],

View File

@ -23,7 +23,7 @@
"ram": 2048,
"hdd": 8,
"os": "ubuntu",
"version": "24.04"
"version": "22.04"
}
}
],

View File

@ -23,7 +23,7 @@
"ram": 2048,
"hdd": 8,
"os": "ubuntu",
"version": "24.04"
"version": "22.04"
}
}
],

View File

@ -23,7 +23,7 @@
"ram": 2048,
"hdd": 8,
"os": "ubuntu",
"version": "24.04"
"version": "22.04"
}
}
],

View File

@ -23,7 +23,7 @@
"ram": 512,
"hdd": 2,
"os": "ubuntu",
"version": "24.04"
"version": "22.04"
}
}
],

View File

@ -1,59 +1,4 @@
[
{
"name": "duplicati/duplicati",
"version": "v2.1.0.120-2.1.0.120_canary_2025-06-24",
"date": "2025-06-24T22:39:50Z"
},
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.516",
"date": "2025-06-24T21:06:15Z"
},
{
"name": "ollama/ollama",
"version": "v0.9.3-rc1",
"date": "2025-06-24T20:26:55Z"
},
{
"name": "evcc-io/evcc",
"version": "0.204.5",
"date": "2025-06-24T19:17:16Z"
},
{
"name": "ErsatzTV/ErsatzTV",
"version": "v25.2.0",
"date": "2025-06-24T17:06:31Z"
},
{
"name": "arunavo4/gitea-mirror",
"version": "v2.18.0",
"date": "2025-06-24T08:29:55Z"
},
{
"name": "element-hq/synapse",
"version": "v1.132.0",
"date": "2025-06-17T13:49:30Z"
},
{
"name": "docker/compose",
"version": "v2.37.3",
"date": "2025-06-24T14:05:33Z"
},
{
"name": "influxdata/influxdb",
"version": "v3.2.0",
"date": "2025-06-24T13:20:53Z"
},
{
"name": "Checkmk/checkmk",
"version": "v2.4.0p5",
"date": "2025-06-24T13:06:53Z"
},
{
"name": "home-assistant/core",
"version": "2025.6.3",
"date": "2025-06-24T13:00:12Z"
},
{
"name": "rcourtman/Pulse",
"version": "v3.31.2",
@ -64,6 +9,11 @@
"version": "preview-fix-proxy-axios",
"date": "2025-06-24T08:50:22Z"
},
{
"name": "arunavo4/gitea-mirror",
"version": "v2.18.0",
"date": "2025-06-24T08:29:55Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.22.2052",
@ -74,6 +24,11 @@
"version": "coverity-w26-4.13.0",
"date": "2025-06-24T02:02:34Z"
},
{
"name": "evcc-io/evcc",
"version": "0.204.4",
"date": "2025-06-23T22:21:08Z"
},
{
"name": "meilisearch/meilisearch",
"version": "prototype-incremental-vector-store-1",
@ -99,6 +54,16 @@
"version": "v4.2.1",
"date": "2025-06-03T20:04:28Z"
},
{
"name": "home-assistant/core",
"version": "2025.6.2",
"date": "2025-06-23T18:38:37Z"
},
{
"name": "Checkmk/checkmk",
"version": "v2.4.0p5-rc2",
"date": "2025-06-23T15:50:55Z"
},
{
"name": "VictoriaMetrics/VictoriaMetrics",
"version": "pmm-6401-v1.120.0",
@ -249,6 +214,11 @@
"version": "testing",
"date": "2025-06-16T18:10:42Z"
},
{
"name": "docker/compose",
"version": "v2.37.2",
"date": "2025-06-20T13:25:03Z"
},
{
"name": "zabbix/zabbix",
"version": "7.2.9",
@ -309,6 +279,11 @@
"version": "v1.11.11",
"date": "2025-06-18T18:04:50Z"
},
{
"name": "ollama/ollama",
"version": "v0.9.2",
"date": "2025-06-18T14:29:39Z"
},
{
"name": "NodeBB/NodeBB",
"version": "v3.12.7",
@ -349,6 +324,11 @@
"version": "v11.5.6",
"date": "2025-06-17T22:00:40Z"
},
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.515",
"date": "2025-06-17T19:17:56Z"
},
{
"name": "project-zot/zot",
"version": "v2.1.5",
@ -359,6 +339,11 @@
"version": "v25.05.1",
"date": "2025-06-17T14:38:04Z"
},
{
"name": "element-hq/synapse",
"version": "v1.132.0",
"date": "2025-06-17T13:49:30Z"
},
{
"name": "cloudflare/cloudflared",
"version": "2025.6.1",
@ -664,6 +649,11 @@
"version": "2.0.0-beta.2-temp",
"date": "2025-03-28T08:45:58Z"
},
{
"name": "influxdata/influxdb",
"version": "v1.12.1rc3",
"date": "2025-06-03T14:05:52Z"
},
{
"name": "Pf2eToolsOrg/Pf2eTools",
"version": "v0.9.0",
@ -729,6 +719,11 @@
"version": "0.19.2",
"date": "2025-05-29T14:39:17Z"
},
{
"name": "duplicati/duplicati",
"version": "v2.1.0.119-2.1.0.119_canary_2025-05-29",
"date": "2025-05-29T06:14:27Z"
},
{
"name": "apache/cassandra",
"version": "cassandra-4.0.18",
@ -1234,6 +1229,11 @@
"version": "0.7.2",
"date": "2025-01-13T22:17:18Z"
},
{
"name": "ErsatzTV/ErsatzTV",
"version": "v25.1.0",
"date": "2025-01-10T18:14:54Z"
},
{
"name": "go-vikunja/vikunja",
"version": "v0.24.6",

View File

@ -1,40 +1,40 @@
{
"name": "YunoHost",
"slug": "yunohost",
"categories": [
2
],
"date_created": "2024-05-02",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": null,
"website": "https://yunohost.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/yunohost.webp",
"config_path": "",
"description": "YunoHost is an operating system aiming for the simplest administration of a server, and therefore democratize self-hosting, while making sure it stays reliable, secure, ethical and lightweight.",
"install_methods": [
{
"type": "default",
"script": "ct/yunohost.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 20,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
"type": "warning"
}
]
"name": "YunoHost",
"slug": "yunohost",
"categories": [
2
],
"date_created": "2024-05-02",
"type": "ct",
"updateable": false,
"privileged": false,
"interface_port": 80,
"documentation": null,
"website": "https://yunohost.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/yunohost.webp",
"config_path": "",
"description": "YunoHost is an operating system aiming for the simplest administration of a server, and therefore democratize self-hosting, while making sure it stays reliable, secure, ethical and lightweight.",
"install_methods": [
{
"type": "default",
"script": "ct/yunohost.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 20,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
"type": "warning"
}
]
}

View File

@ -1538,73 +1538,3 @@ function setup_yq() {
msg_error "yq installation incomplete or version mismatch"
fi
}
# ------------------------------------------------------------------------------
# Installs ImageMagick 7 from source (Debian/Ubuntu only).
#
# Description:
# - Downloads the latest ImageMagick source tarball
# - Builds and installs ImageMagick to /usr/local
# - Configures dynamic linker (ldconfig)
#
# Notes:
# - Requires: build-essential, libtool, libjpeg-dev, libpng-dev, etc.
# ------------------------------------------------------------------------------
function setup_imagemagick() {
local TMP_DIR
TMP_DIR=$(mktemp -d)
local VERSION=""
local BINARY_PATH="/usr/local/bin/magick"
if command -v magick &>/dev/null; then
VERSION=$(magick -version | awk '/^Version/ {print $3}')
msg_ok "ImageMagick already installed ($VERSION)"
return 0
fi
msg_info "Setup ImageMagick (Patience)"
$STD apt-get update
$STD apt-get install -y \
build-essential \
libtool \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libwebp-dev \
libheif-dev \
libde265-dev \
libopenjp2-7-dev \
libxml2-dev \
liblcms2-dev \
libfreetype6-dev \
libraw-dev \
libfftw3-dev \
liblqr-1-0-dev \
libgsl-dev \
pkg-config \
ghostscript
curl -fsSL https://imagemagick.org/archive/ImageMagick.tar.gz -o "$TMP_DIR/ImageMagick.tar.gz"
tar -xzf "$TMP_DIR/ImageMagick.tar.gz" -C "$TMP_DIR"
cd "$TMP_DIR"/ImageMagick-* || {
msg_error "Source extraction failed"
rm -rf "$TMP_DIR"
return 1
}
./configure --disable-static >/dev/null
$STD make
$STD make install
$STD ldconfig /usr/local/lib
if [[ ! -x "$BINARY_PATH" ]]; then
msg_error "ImageMagick installation failed"
rm -rf "$TMP_DIR"
return 1
fi
VERSION=$("$BINARY_PATH" -version | awk '/^Version/ {print $3}')
rm -rf "$TMP_DIR"
ensure_usr_local_bin_persist
msg_ok "Setup ImageMagick $VERSION"
}

View File

@ -2,12 +2,10 @@
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
set -Eeuo pipefail
trap 'echo -e "\n[ERROR] in line $LINENO: exit code $?"' ERR
function header_info() {
function header_info {
clear
cat <<"EOF"
______ _ __ __
@ -18,95 +16,60 @@ function header_info() {
EOF
}
function msg_info() { echo -e " \e[1;36m➤\e[0m $1"; }
function msg_ok() { echo -e " \e[1;32m✔\e[0m $1"; }
function msg_error() { echo -e " \e[1;31m✖\e[0m $1"; }
header_info
if ! command -v pveversion &>/dev/null; then
msg_error "This script must be run on the Proxmox VE host (not inside an LXC container)"
exit 1
fi
set -e
while true; do
read -rp "This will add Tailscale to an existing LXC Container ONLY. Proceed (y/n)? " yn
case "$yn" in
read -p "This will add Tailscale to an existing LXC Container ONLY. Proceed(y/n)?" yn
case $yn in
[Yy]*) break ;;
[Nn]*) exit 0 ;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
done
header_info
msg_info "Loading container list..."
echo "Loading..."
function msg() {
local TEXT="$1"
echo -e "$TEXT"
}
NODE=$(hostname)
MSG_MAX_LENGTH=0
CTID_MENU=()
while read -r line; do
TAG=$(echo "$line" | awk '{print $1}')
ITEM=$(echo "$line" | awk '{print substr($0,36)}')
OFFSET=2
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=$((${#ITEM} + OFFSET))
CTID_MENU+=("$TAG" "$ITEM" "OFF")
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
fi
CTID_MENU+=("$TAG" "$ITEM " "OFF")
done < <(pct list | awk 'NR>1')
CTID=""
while [[ -z "${CTID}" ]]; do
while [ -z "${CTID:+x}" ]; do
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
"\nSelect a container to add Tailscale to:\n" \
16 $((MSG_MAX_LENGTH + 23)) 6 \
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit 1
16 $(($MSG_MAX_LENGTH + 23)) 6 \
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
done
CTID_CONFIG_PATH="/etc/pve/lxc/${CTID}.conf"
# Skip if already configured
grep -q "lxc.cgroup2.devices.allow: c 10:200 rwm" "$CTID_CONFIG_PATH" || echo "lxc.cgroup2.devices.allow: c 10:200 rwm" >>"$CTID_CONFIG_PATH"
grep -q "lxc.mount.entry: /dev/net/tun" "$CTID_CONFIG_PATH" || echo "lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file" >>"$CTID_CONFIG_PATH"
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
cat <<EOF >>$CTID_CONFIG_PATH
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
EOF
header_info
msg_info "Installing Tailscale in CT $CTID"
msg "Installing Tailscale..."
pct exec "$CTID" -- bash -c '
set -e
export DEBIAN_FRONTEND=noninteractive
ID=$(grep "^ID=" /etc/os-release | cut -d"=" -f2)
VER=$(grep "^VERSION_CODENAME=" /etc/os-release | cut -d"=" -f2)
# fallback if DNS is poisoned or blocked
ORIG_RESOLV="/etc/resolv.conf"
BACKUP_RESOLV="/tmp/resolv.conf.backup"
if ! dig +short pkgs.tailscale.com | grep -qvE "^127\.|^0\.0\.0\.0$"; then
echo "[INFO] DNS resolution for pkgs.tailscale.com failed (blocked or redirected)."
echo "[INFO] Temporarily overriding /etc/resolv.conf with Cloudflare DNS (1.1.1.1)"
cp "$ORIG_RESOLV" "$BACKUP_RESOLV"
echo "nameserver 1.1.1.1" >"$ORIG_RESOLV"
fi
curl -fsSL https://pkgs.tailscale.com/stable/${ID}/${VER}.noarmor.gpg \
| tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/${ID} ${VER} main" \
>/etc/apt/sources.list.d/tailscale.list
apt-get update -qq
apt-get install -y tailscale >/dev/null
if [[ -f /tmp/resolv.conf.backup ]]; then
echo "[INFO] Restoring original /etc/resolv.conf"
mv /tmp/resolv.conf.backup /etc/resolv.conf
fi
curl -fsSL https://pkgs.tailscale.com/stable/$ID/$VER.noarmor.gpg | tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/$ID $VER main" >/etc/apt/sources.list.d/tailscale.list
apt-get update &>/dev/null
apt-get install -y tailscale &>/dev/null
'
TAGS=$(awk -F': ' '/^tags:/ {print $2}' "$CTID_CONFIG_PATH")
TAGS=$(awk -F': ' '/^tags:/ {print $2}' /etc/pve/lxc/${CTID}.conf)
TAGS="${TAGS:+$TAGS; }tailscale"
pct set "$CTID" -tags "$TAGS"
pct set "$CTID" -tags "${TAGS}"
msg "\e[1;32m ✔ Installed Tailscale\e[0m"
msg_ok "Tailscale installed on CT $CTID"
msg_info "Reboot the container, then run 'tailscale up' inside the container to activate."
msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console\e[0m"