Add a Private Community Apps template for the Fluxer stack.

Unraid Apps installs one container, so the template supervises the official compose bundle instead of pretending Fluxer is a single image.
This commit is contained in:
Michael Sloan committed 2026-11-23 21:47:54 -05:00
1 parent 1f6c4c0c39
commit 028c71e5a9
7 files changed
+210 -4

No files matched your search

+2
View File
@@ -3,3 +3,5 @@
*.yml text eol=lf
*.md text eol=lf
*.conf text eol=lf
*.xml text eol=lf
*.svg text eol=lf
+33 -2
View File
@@ -30,9 +30,40 @@ docker compose version
You want 2.24 or newer.
## Install
## Install from Community Apps
Run this on the Unraid server, not on your PC. Do not clone onto the USB flash drive (`/boot`).
Unraid's public app catalog only indexes GitHub, so this template is a Private app on your server. It shows up in the Apps tab after the template is copied onto the flash drive. One container, `fluxer-stack`, then starts the real Fluxer compose stack.
On the Unraid terminal:
```bash
mkdir -p /boot/config/plugins/community.applications/private/fluxer
curl -fsSL -o /boot/config/plugins/community.applications/private/fluxer/fluxer.xml \
https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid/raw/main/unraid/fluxer.xml
```
If you already cloned this repo on the server, `sh scripts/install-ca-template.sh` copies that same file.
Then:
1. Open **Apps** and refresh the page.
2. Open **Private** and install **fluxer-stack**.
3. Set **Hostname** to your real domain. Leave **Edge mode** at `proxy` when Nginx Proxy Manager, SWAG, or Traefik already uses ports 80 and 443.
4. Apply.
The supervisor clones this repo into `/mnt/user/appdata/fluxer-selfhost`, stores Fluxer's data in `/mnt/user/appdata/fluxer`, and publishes the web UI on port **18080**. Stopping `fluxer-stack` stops Fluxer. Starting it brings Fluxer back.
The setup token is in the supervisor log path and in this file:
```bash
awk -F= '$1=="FLUXER_SETUP_TOKEN"{print $2}' /mnt/user/appdata/fluxer-selfhost/stack/.env
```
Point the proxy at `http://YOUR_UNRAID_IP:18080` and use [unraid/npm-advanced.conf](unraid/npm-advanced.conf). Forward TCP 7881 and UDP 7882 for voice. The other `fluxer-*` containers belong to Compose. Leave them alone.
## Install from the Unraid terminal
Use this when you would rather not put a supervisor container in front of Compose. Run it on the Unraid server, not on your PC. Do not clone onto the USB flash drive (`/boot`).
```bash
mkdir -p /mnt/user/appdata
+14 -2
View File
@@ -163,7 +163,7 @@ The bundle was downloaded and read before the override was written, so the volum
- No domain, LAN IP, proxy brand, RAM size, or CGNAT fact was supplied. The script takes the domain as an argument. Proxy mode is the default. Nothing was invented for DNS.
- Email, Stripe, ClamAV, Cloudflare cache purge, extra voice regions, and an external S3 bucket are in the environment page and were left at the bundle defaults (off or empty).
- `rust-server.compose.yml` collapses the Rust services into one container and might use less RAM. It was not turned on. Combining it with the Unraid volume file needs a `docker compose config` against that exact release before it is the default.
- No Community Apps template, no `rexctl` install, no copy of Fluxer's images into a private registry.
- No `rexctl` install, and no copy of Fluxer's images into a private registry. The Community Apps entry uses the public `docker:28-cli` image only as a supervisor.
## How to extend this without making a mess
@@ -172,8 +172,20 @@ The bundle was downloaded and read before the override was written, so the volum
- Do not commit `stack/.env`, `stack/`, or `backups/`. They hold the database keys and the admin setup token.
- If the install is later handed to `rexctl`, point `rexctl takeover` at `stack/` and keep the same project name.
## Community Apps
The Apps tab does not accept a custom repository URL. That setting was removed in Unraid 6.10. The public catalog at ca.unraid.net only scans a public GitHub repo with `ca_profile.xml`. This project lives on Gitea, so the template is installed into the server's Private list:
`/boot/config/plugins/community.applications/private/fluxer/fluxer.xml`
Community Apps can only create one container per template. Fluxer is a compose project of about twenty containers, so the template does not pretend that `fluxer-api` alone is the product. `fluxer-stack` is `docker:28-cli` with the Docker socket mounted. Its command installs git and openssl, downloads `scripts/ca-bootstrap.sh`, clones this repo, and runs `prepare-unraid.sh` through the host engine. Paths inside the container match the host paths, because Compose sends those paths to the host daemon. Stopping the supervisor sends SIGTERM, and the script's trap runs `docker compose stop`.
The socket mount is root on the Docker engine. That is the trade for having Start and Stop in the Apps and Docker pages. The terminal install further down in the README does not need it.
`bash` is required for `prepare-unraid.sh`. Alpine's `sh` is not bash, so the bootstrap calls `bash` on purpose. `coreutils` is installed first so `sort -V` in the Compose version check exists.
## Publishing
Target remote: `https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid` public.
On 2026-11-23, before the first push, `https://git.masengr.com/` returned HTTP 502 for the site, `/api/v1/version`, and `git ls-remote` of the existing Neon Sign Converter repo. A 502 is the host being down, not a missing repository. Push again once that URL returns something other than 502.
On 2026-11-23 the site first returned HTTP 502, so the first push did not run. A later check returned HTTP 200 for the site. The repository URL was still 404 because nothing had been pushed.
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
# Runs inside the fluxer-stack container from the Community Apps template.
# Clones this repo onto the Unraid host, prepares the official compose bundle,
# and starts it through the host Docker socket. Stopping this container stops
# the Fluxer stack. Starting it brings the stack back.
set -euo pipefail
REPO_URL="${FLUXER_REPO_URL:-https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid.git}"
ROOT="${FLUXER_REPO:-/mnt/user/appdata/fluxer-selfhost}"
APPDATA="${FLUXER_APPDATA:-/mnt/user/appdata/fluxer}"
DOMAIN="${FLUXER_DOMAIN:-}"
MODE="$(printf '%s' "${FLUXER_MODE:-proxy}" | tr '[:upper:]' '[:lower:]')"
STACK=""
stop_stack() {
if [[ -n "$STACK" && -f "$STACK/docker-compose.yml" ]]; then
echo "Stopping the Fluxer compose stack."
docker compose --project-directory "$STACK" stop || true
fi
exit 0
}
if [[ -z "$DOMAIN" || "$DOMAIN" == "chat.example.com" ]]; then
echo "Set FLUXER_DOMAIN to your real hostname, not chat.example.com, then start this container again." >&2
exit 1
fi
case "$MODE" in
proxy|direct) ;;
*)
echo "FLUXER_MODE must be proxy or direct. It is: $MODE" >&2
exit 1
;;
esac
mkdir -p "$ROOT" "$APPDATA"
if [[ ! -f "$ROOT/scripts/prepare-unraid.sh" ]]; then
echo "Cloning $REPO_URL into $ROOT"
git clone --depth 1 "$REPO_URL" "$ROOT"
fi
STACK="$ROOT/stack"
export FLUXER_ALLOW_ANY_PATH=1
export FLUXER_APPDATA="$APPDATA"
export FLUXER_STACK="$STACK"
echo "Preparing Fluxer for $DOMAIN ($MODE)"
bash "$ROOT/scripts/prepare-unraid.sh" "$DOMAIN" "--$MODE"
docker compose --project-directory "$STACK" up -d
echo "Fluxer is up. This container stays running so Unraid shows the app as started."
echo "The setup token is FLUXER_SETUP_TOKEN in $STACK/.env"
trap stop_stack TERM INT
while true; do
sleep 3600
done
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# Copy the Fluxer template into Community Apps' Private folder, and into the
# Docker template dropdown. Run this on the Unraid server.
set -euo pipefail
cd "$(dirname "$0")/.."
SRC="unraid/fluxer.xml"
PRIVATE_DIR="/boot/config/plugins/community.applications/private/fluxer"
PRIVATE="${PRIVATE_DIR}/fluxer.xml"
USER_DIR="/boot/config/plugins/dockerMan/templates-user"
USER="${USER_DIR}/my-fluxer.xml"
if [[ ! -f "$SRC" ]]; then
echo "Missing $SRC" >&2
exit 1
fi
if [[ ! -d /boot/config/plugins ]]; then
echo "Unraid flash config was not found. Run this on the Unraid server." >&2
exit 1
fi
first="$(head -n 1 "$SRC")"
if [[ "$first" != '<?xml version="1.0"?>' ]]; then
echo "Template does not start with an XML declaration." >&2
exit 1
fi
mkdir -p "$PRIVATE_DIR" "$USER_DIR"
cp "$SRC" "$PRIVATE"
cp "$SRC" "$USER"
echo "Installed:"
echo " $PRIVATE"
echo " $USER"
echo
echo "Next:"
echo " 1. Open Apps and refresh the page."
echo " 2. Open the Private section and install Fluxer Stack."
echo " 3. Set FLUXER_DOMAIN to your hostname, then Apply."
echo
echo "The Docker page template dropdown also lists my-fluxer after a refresh."
+55
View File
@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<Container version="2">
<Name>fluxer-stack</Name>
<Overview>Self-hosted Fluxer chat for Unraid. This app is the supervisor. It clones the installer, downloads Fluxer's official compose bundle, and starts the stack. Chat is served to your existing proxy on port 18080. Voice uses TCP 7881 and UDP 7882.</Overview>
<Description><![CDATA[
Fluxer chat on Unraid, using the official Docker Compose bundle.
This Community Apps entry is one supervisor container named fluxer-stack. On start it clones the installer, writes stack/.env, and runs the Fluxer stack on the host Docker engine. The database, uploads, and search index are stored under /mnt/user/appdata/fluxer, not in docker.img.
After Apply, watch the fluxer-stack log until it says Fluxer is up. Then open the setup token:
awk -F= '$1=="FLUXER_SETUP_TOKEN"{print $2}' /mnt/user/appdata/fluxer-selfhost/stack/.env
Open https://your-domain, enter that token, and create the admin account. Copy stack/.env somewhere safe. The Postgres password, Meilisearch key, and VAPID keys cannot be changed after the first start.
Point Nginx Proxy Manager at http://YOUR_UNRAID_IP:18080 with WebSockets on. Paste unraid/npm-advanced.conf from the repo into the proxy host Advanced tab. Forward TCP 7881 and UDP 7882 from the router for voice.
Stopping this container stops the Fluxer stack. Starting it brings the stack back. The other fluxer-* containers are created by Compose. Leave them alone.
Set FLUXER_MODE to direct only when ports 80 and 443 on Unraid are free and DNS already points at this machine.
The official public Community Apps catalog only indexes GitHub. This template is installed into Apps, Private, on your server.
]]></Description>
<Category>Network:Messenger</Category>
<Icon>https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid/raw/main/unraid/icon.svg</Icon>
<WebUI>http://[IP]:18080/</WebUI>
<TemplateURL>https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid/raw/main/unraid/fluxer.xml</TemplateURL>
<Project>https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid</Project>
<Registry>https://hub.docker.com/_/docker</Registry>
<Repository>docker:28-cli</Repository>
<Network>bridge</Network>
<MyIP/>
<Shell>sh</Shell>
<Privileged>false</Privileged>
<Support>https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid</Support>
<Requires>Host Docker socket. The supervisor uses it to run the Fluxer compose stack.</Requires>
<ExtraParams>--entrypoint /bin/sh</ExtraParams>
<PostArgs>-c 'apk add --no-cache bash git curl openssl coreutils &amp;&amp; curl -fsSL https://git.masengr.com/Michael-A-Sloan/Fluxer-selfhost-unraid/raw/main/scripts/ca-bootstrap.sh -o /tmp/ca-bootstrap.sh &amp;&amp; bash /tmp/ca-bootstrap.sh'</PostArgs>
<CPUset/>
<DateInstalled/>
<DonateText/>
<RequiresFile/>
<TailscaleEnabled>false</TailscaleEnabled>
<TailscaleIsExitNode>false</TailscaleIsExitNode>
<TailscaleHostname/>
<TailscaleExtraArgs/>
<TailscaleUserspaceNetworking>false</TailscaleUserspaceNetworking>
<Config Name="Hostname" Target="FLUXER_DOMAIN" Default="" Mode="" Description="Required. The hostname people use, such as chat.example.com. No https:// and no path." Type="Variable" Display="always" Required="true" Mask="false"/>
<Config Name="Edge mode" Target="FLUXER_MODE" Default="proxy" Mode="" Description="proxy: plain HTTP on port 18080 for Nginx Proxy Manager, SWAG, or Traefik. direct: Fluxer's own HTTPS on ports 80 and 443." Type="Variable" Display="always" Required="true" Mask="false">proxy</Config>
<Config Name="Fluxer data" Target="/mnt/user/appdata/fluxer" Default="/mnt/user/appdata/fluxer" Mode="rw" Description="Database, uploads, and search. Keep this on a cache-only path. Container path must stay the same as the host path." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/fluxer</Config>
<Config Name="Installer files" Target="/mnt/user/appdata/fluxer-selfhost" Default="/mnt/user/appdata/fluxer-selfhost" Mode="rw" Description="Clone of this repo and the generated stack/.env. Container path must stay the same as the host path." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/fluxer-selfhost</Config>
<Config Name="Docker socket" Target="/var/run/docker.sock" Default="/var/run/docker.sock" Mode="rw" Description="Required so the supervisor can start the Fluxer stack on Unraid's Docker engine." Type="Path" Display="advanced" Required="true" Mask="false">/var/run/docker.sock</Config>
<Config Name="Data path variable" Target="FLUXER_APPDATA" Default="/mnt/user/appdata/fluxer" Mode="" Description="Must match the Fluxer data host path above." Type="Variable" Display="advanced" Required="true" Mask="false">/mnt/user/appdata/fluxer</Config>
<Config Name="Installer path variable" Target="FLUXER_REPO" Default="/mnt/user/appdata/fluxer-selfhost" Mode="" Description="Must match the installer files host path above." Type="Variable" Display="advanced" Required="true" Mask="false">/mnt/user/appdata/fluxer-selfhost</Config>
</Container>
+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<rect width="64" height="64" rx="14" fill="#312e81"/>
<path fill="#e0e7ff" d="M16 18h22a6 6 0 0 1 6 6v10a6 6 0 0 1-6 6H28l-8 8v-8h-4a6 6 0 0 1-6-6V24a6 6 0 0 1 6-6z"/>
<path fill="#a5b4fc" d="M28 28h20a5 5 0 0 1 5 5v8a5 5 0 0 1-5 5h-2v6l-6-6h-6a5 5 0 0 1-5-5v-8a5 5 0 0 1 5-5z"/>
</svg>

After

Width:  |  Height:  |  Size: 354 B