Compare commits

...

25 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
e1b13cda63 refactor(nextcloud): extract inline OAuth2 client PHP into standalone script
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/b35a7dbb-ff0a-483c-9bc7-1cf43a192e92

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 16:37:23 +00:00
copilot-swe-agent[bot]
8925baf12f nc entrypoint: improve Windmill OAuth failure diagnostic message
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/ad1489a0-4da0-41fd-b1d0-46da7ef545c3

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 12:31:37 +00:00
copilot-swe-agent[bot]
b3f66b4c50 nc entrypoint: replace fake windmill_admin_token with real NC OAuth2 SSO setup
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/ad1489a0-4da0-41fd-b1d0-46da7ef545c3

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 12:29:43 +00:00
copilot-swe-agent[bot]
e1e85c5ca9 nc entrypoint: include HTTP status in Windmill auth failure message
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/b977bac7-8311-4877-ba23-92438ed0a4fe

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 12:04:58 +00:00
copilot-swe-agent[bot]
1ee3db8195 nc entrypoint: set windmill_admin_token and verify API auth against Windmill
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/b977bac7-8311-4877-ba23-92438ed0a4fe

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 12:03:44 +00:00
copilot-swe-agent[bot]
56afde115d windmill: secret protection, socket-only postgres, volume rename/backup
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/8bfb1fa8-7878-434e-ab4d-1034067e5ad0

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 11:30:53 +00:00
copilot-swe-agent[bot]
b205e46976 windmill: move dump to dedicated volume, remove unix_http_server, simplify upgrade path
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/d87bac25-9c31-4c46-ad37-1e6426a3af2e

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 11:23:20 +00:00
copilot-swe-agent[bot]
e077aea86d Fix windmill postgres upgrade reliability: persistent-volume staging dir, tighten sentinels, supervisorctl
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/5e1df9cc-b63e-4a5a-9148-38907b6d8db9

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-28 11:15:38 +00:00
copilot-swe-agent[bot]
c60861d79c Replace pg_upgrade with pg_dump/restore for windmill postgres major-version upgrade
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/58741c1d-7822-425b-a995-deab87e5901c

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 14:54:28 +00:00
copilot-swe-agent[bot]
1823336f89 Pin exact postgres/windmill versions, add auto pg_upgrade, extend healthcheck
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/505f902b-a447-4fcc-9203-f11119207409

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 14:26:08 +00:00
copilot-swe-agent[bot]
d63f0afc63 Remove WINDMILL_ENABLED from apache start.sh, simplify windmill cert config, add cache invalidation on image update
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/6ba2c0de-f503-4989-9dea-4bc64a51e4f9

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 09:45:42 +00:00
copilot-swe-agent[bot]
9f90afbc5e Add Windmill as optional container, served on /windmill subpath
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/e78b6157-a4ea-4185-bf37-1659a458d4db

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 09:41:09 +00:00
copilot-swe-agent[bot]
51124784c2 Serve windmill on /windmill subpath instead of port 3100; add to disable-containers.js
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/3c346202-c2e6-4e97-bf61-a1f5d42670fd

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 09:30:29 +00:00
copilot-swe-agent[bot]
f08103ca15 Fix rootless windmill container: use uid=1000, fix tmpfs modes, CA certs, WINDMILL_DIR
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/81d1b5cc-ab2d-4337-801b-25755355183e

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 09:16:25 +00:00
copilot-swe-agent[bot]
312acddf27 Changes before error encountered
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/6f198732-63c3-41b7-8b2e-1b5fa565ee21

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 02:12:13 +00:00
copilot-swe-agent[bot]
5cbdb00ff4 WIP: windmill derived image builds successfully, adding rootless + read-only
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/6f198732-63c3-41b7-8b2e-1b5fa565ee21

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 02:10:58 +00:00
copilot-swe-agent[bot]
4b27d6954f WIP: implementing windmill container changes
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/6f198732-63c3-41b7-8b2e-1b5fa565ee21

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
2026-04-27 01:58:39 +00:00
Simon L.
8727df147d Add disclaimer and clarify migration steps for snap installation
Added a disclaimer regarding the accuracy of the migration guide and clarified the use of a temporary Docker container for database conversion.

Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-26 19:59:36 +02:00
Simon L.
a747ab1c5e migration.md: add snap-to-AIO migration procedure using temporary Docker container (#8003) 2026-04-26 18:11:17 +02:00
copilot-swe-agent[bot]
f28d94c30c migration.md: add snap-to-AIO migration procedure using temporary Docker container
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/64e677c8-17ac-4c15-93db-e7375d2a2084

docs: address code review feedback on snap migration section

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/64e677c8-17ac-4c15-93db-e7375d2a2084

docs: improve snap migration section per feedback

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/f71332ba-4e6b-465b-8278-6767fe3a62d3

docs: add snap removal step after successful migration to AIO

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/b3c5c0c5-79dd-4fa3-b617-6db88ee99431

Apply suggestion from @szaimen

Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-26 18:08:40 +02:00
Simon L.
6dc1cd6ebd adjust community-container readme
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-25 17:09:23 +02:00
Simon L.
670e38969c docs: add Pangolin to reverse proxy guide (#7996) 2026-04-25 16:25:04 +02:00
copilot-swe-agent[bot]
ae5a21eadf docs: add Pangolin to reverse proxy guide
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/c7f8b130-4edd-4fcc-b218-1522ba88eae8

docs: add Pangolin option to local-instance docs

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/0ad32b82-c0ae-46f4-9849-af64ae130dbd

docs: address review feedback on Pangolin section

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/c7f8b130-4edd-4fcc-b218-1522ba88eae8
Co-Authored-By: szaimen <42591237+szaimen@users.noreply.github.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-25 16:24:13 +02:00
Simon L.
39f30a6609 docs: add mermaid architecture diagrams to readme files (#7992) 2026-04-24 19:42:03 +02:00
copilot-swe-agent[bot]
5cf4580a86 docs: add mermaid architecture diagrams to readme files
Co-Authored-By: szaimen <42591237+szaimen@users.noreply.github.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-04-24 19:40:05 +02:00
21 changed files with 902 additions and 20 deletions

View File

@@ -63,6 +63,12 @@ http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI req
reverse_proxy {$WHITEBOARD_HOST}:3002
}
# Windmill
route /windmill/* {
uri strip_prefix /windmill
reverse_proxy {$WINDMILL_HOST}:8000
}
# HaRP (ExApps)
route /exapps/* {
reverse_proxy {$HARP_HOST}:8780

View File

@@ -263,6 +263,8 @@ RUN set -ex; \
mkdir -p /nc-updater; \
chmod -R 777 /nc-updater
COPY --chmod=775 Containers/nextcloud/create-oauth2-client.php /create-oauth2-client.php
# hadolint ignore=DL3002
USER root
ENTRYPOINT ["/start.sh"]

View File

@@ -0,0 +1,60 @@
<?php
declare(strict_types=1);
/**
* Creates a Nextcloud OAuth2 client and prints its credentials to stdout.
*
* Usage: php create-oauth2-client.php <name> <redirect-uri>
*
* Output (two lines):
* <client_id>
* <client_secret>
*
* Any existing client with the same name is deleted first so that the
* operation is idempotent (stale clients whose secret has been lost are
* replaced by a fresh one).
*/
if ($argc !== 3) {
fwrite(STDERR, "Usage: php create-oauth2-client.php <name> <redirect-uri>\n");
exit(1);
}
$name = $argv[1];
$redirectUri = $argv[2];
define('OC_CONSOLE', 1);
require_once '/var/www/html/lib/base.php';
\OC_App::loadApp('oauth2');
$container = \OC::getContainer();
/** @var \OCA\OAuth2\Db\ClientMapper $mapper */
$mapper = $container->get(\OCA\OAuth2\Db\ClientMapper::class);
/** @var \OCP\Security\ICrypto $crypto */
$crypto = $container->get(\OCP\Security\ICrypto::class);
/** @var \OCP\Security\ISecureRandom $random */
$random = $container->get(\OCP\Security\ISecureRandom::class);
// Delete any stale client with the same name that might have lost its secret.
foreach ($mapper->getClients() as $existing) {
if ($existing->getName() === $name) {
$mapper->delete($existing);
}
}
$client = new \OCA\OAuth2\Db\Client();
$client->setName($name);
$client->setRedirectUri($redirectUri);
$secret = $random->generate(64, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');
$client->setSecret(bin2hex($crypto->calculateHMAC($secret)));
$clientId = $random->generate(64, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');
$client->setClientIdentifier($clientId);
$mapper->insert($client);
echo $clientId . "\n";
echo $secret . "\n";

View File

@@ -1090,5 +1090,41 @@ else
fi
fi
# Windmill app
if [ "$WINDMILL_ENABLED" = 'yes' ]; then
if ! [ -d "/var/www/html/custom_apps/windmill" ]; then
php /var/www/html/occ app:install windmill
elif [ "$(php /var/www/html/occ config:app:get windmill enabled)" != "yes" ]; then
php /var/www/html/occ app:enable windmill
elif [ "$SKIP_UPDATE" != 1 ]; then
php /var/www/html/occ app:update windmill
fi
php /var/www/html/occ config:app:set windmill windmill_url --value="https://$NC_DOMAIN/windmill"
php /var/www/html/occ config:app:set windmill windmill_instance_url --value="http://$WINDMILL_HOST:8000"
# Create an NC OAuth2 client for Windmill (idempotent: reuse stored credentials if already created)
WINDMILL_NC_OAUTH_CLIENT_ID="$(php /var/www/html/occ config:app:get windmill nc_oauth_client_id 2>/dev/null)"
WINDMILL_NC_OAUTH_CLIENT_SECRET="$(php /var/www/html/occ config:app:get windmill nc_oauth_client_secret 2>/dev/null)"
if [ -z "$WINDMILL_NC_OAUTH_CLIENT_ID" ] || [ -z "$WINDMILL_NC_OAUTH_CLIENT_SECRET" ]; then
WINDMILL_NC_REDIRECT_URI="https://$NC_DOMAIN/windmill/user/login_callback/nextcloud"
WINDMILL_OAUTH_OUTPUT="$(php /create-oauth2-client.php "Windmill" "$WINDMILL_NC_REDIRECT_URI" 2>/dev/null)"
WINDMILL_NC_OAUTH_CLIENT_ID="$(printf '%s' "$WINDMILL_OAUTH_OUTPUT" | head -1)"
WINDMILL_NC_OAUTH_CLIENT_SECRET="$(printf '%s' "$WINDMILL_OAUTH_OUTPUT" | tail -1)"
php /var/www/html/occ config:app:set windmill nc_oauth_client_id --value="$WINDMILL_NC_OAUTH_CLIENT_ID"
php /var/www/html/occ config:app:set windmill nc_oauth_client_secret --value="$WINDMILL_NC_OAUTH_CLIENT_SECRET"
fi
# Configure Windmill to use NC as OAuth SSO provider
WINDMILL_OAUTH_BODY="{\"value\":{\"nextcloud\":{\"id\":\"$WINDMILL_NC_OAUTH_CLIENT_ID\",\"secret\":\"$WINDMILL_NC_OAUTH_CLIENT_SECRET\",\"login_config\":{\"auth_url\":\"https://$NC_DOMAIN/apps/oauth2/authorize\",\"token_url\":\"https://$NC_DOMAIN/apps/oauth2/api/v1/token\",\"userinfo_url\":\"https://$NC_DOMAIN/ocs/v2.php/cloud/user?format=json\",\"scopes\":[]}}}}"
WINDMILL_OAUTH_RESPONSE="$(curl -s -w '\n%{http_code}' -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $WINDMILL_SECRET" -d "$WINDMILL_OAUTH_BODY" "http://$WINDMILL_HOST:8000/api/settings/global/oauths")"
WINDMILL_OAUTH_STATUS="$(echo "$WINDMILL_OAUTH_RESPONSE" | tail -1)"
if [ "$WINDMILL_OAUTH_STATUS" != "200" ]; then
echo "Failed to configure Windmill OAuth against http://$WINDMILL_HOST:8000 (HTTP $WINDMILL_OAUTH_STATUS). Response: $(echo "$WINDMILL_OAUTH_RESPONSE" | head -1). Exiting!"
exit 1
fi
else
if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/windmill" ]; then
php /var/www/html/occ app:remove windmill
fi
fi
# Remove the update skip file always
rm -f "$NEXTCLOUD_DATA_DIR"/skip.update

View File

@@ -0,0 +1,116 @@
# syntax=docker/dockerfile:latest
# Stage 1: Current PostgreSQL server version is pinned to a full patch
# release so builds are reproducible and the exact version is auditable.
# (matches the Debian bookworm base used by windmill-labs/windmill)
FROM postgres:17.9-bookworm AS postgres-base
# Final stage: derive from the official Windmill image and bundle PostgreSQL
FROM ghcr.io/windmill-labs/windmill:1.691.1
USER root
ARG DEBIAN_FRONTEND=noninteractive
# Copy PostgreSQL server binaries, libraries, and utilities from the postgres stage
COPY --from=postgres-base /usr/lib/postgresql /usr/lib/postgresql
COPY --from=postgres-base /usr/share/postgresql /usr/share/postgresql
COPY --from=postgres-base /usr/bin/pg_dump \
/usr/bin/pg_dumpall \
/usr/bin/pg_restore \
/usr/bin/
# Install supervisor from standard Debian repos (remove broken external sources first)
# hadolint ignore=DL3008
RUN set -ex; \
rm -f \
/etc/apt/sources.list.d/nodesource.sources \
/etc/apt/sources.list.d/pgdg.list; \
apt-get update; \
apt-get upgrade -y; \
apt-get install -y --no-install-recommends \
ca-certificates \
supervisor \
tzdata \
netcat-openbsd; \
rm -rf /var/lib/apt/lists/*; \
update-ca-certificates; \
# Copy the CA bundle to a world-readable path so uid=1000 can access it.
# /etc/ssl/certs/ is persistently mode 700 in the base image's layer and
# cannot be chmod'd in a derived image, so we copy the regenerated bundle.
cp /etc/ssl/certs/ca-certificates.crt /etc/ssl/ca-bundle.crt; \
chmod 644 /etc/ssl/ca-bundle.crt; \
\
# The base image already ships a 'windmill' user/group at uid/gid 1000.
# Create the directories our services need and hand them to that user.
# /tmp/windmill/cache is intentionally excluded: the base image pre-creates
# it as 777 so any UID can write to it; a recursive chown on ~340 MB of
# pre-installed runtimes would create a huge and unnecessary image layer.
mkdir -p \
/var/lib/postgresql/data \
/var/lib/windmill-dump \
/var/run/postgresql \
/var/log/supervisord \
/var/run/supervisord; \
chown -R windmill:windmill \
/var/lib/postgresql \
/var/lib/windmill-dump \
/var/run/postgresql \
/var/log/supervisord \
/var/run/supervisord; \
chmod 1777 \
/var/run/postgresql \
/var/log/supervisord \
/var/run/supervisord; \
\
# Create symlinks so postgres tools are on PATH
ln -sf /usr/lib/postgresql/17/bin/postgres /usr/local/bin/postgres; \
ln -sf /usr/lib/postgresql/17/bin/initdb /usr/local/bin/initdb; \
ln -sf /usr/lib/postgresql/17/bin/pg_ctl /usr/local/bin/pg_ctl; \
ln -sf /usr/lib/postgresql/17/bin/pg_isready /usr/local/bin/pg_isready; \
\
# Record the current PostgreSQL major version so start.sh can detect when
# the bundled major version has changed and trigger an automatic dump/restore upgrade.
echo "17" > /etc/postgres-major-version; \
\
# Write a build-time marker so start.sh can detect image updates and
# clear the cache volume when a new image version is deployed.
date -u +%s > /etc/windmill-image-build-epoch
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
COPY --chmod=775 windmill-start.sh /windmill-start.sh
COPY --chmod=664 supervisord.conf /supervisord.conf
# Redirect writable tool dirs to the persistent cache volume so the
# container can run with a read-only root filesystem.
# HOME is already correct (/home/windmill) for the pre-existing uid=1000 user.
# WINDMILL_DIR is set to the cache volume so Windmill's logs/worker dirs
# are inside the volume and writable (Docker creates the volume mount-point
# parent /tmp/windmill as root:root, making /tmp/windmill/logs inaccessible
# for uid=1000 when /tmp is a tmpfs).
ENV UV_TOOL_BIN_DIR=/tmp/windmill/cache/uv/bin \
UV_TOOL_DIR=/tmp/windmill/cache/uv/tools \
WINDMILL_DIR=/tmp/windmill/cache \
SSL_CERT_FILE=/etc/ssl/ca-bundle.crt \
CURL_CA_BUNDLE=/etc/ssl/ca-bundle.crt \
REQUESTS_CA_BUNDLE=/etc/ssl/ca-bundle.crt \
NODE_EXTRA_CA_CERTS=/etc/ssl/ca-bundle.crt
VOLUME ["/var/lib/postgresql/data", "/var/lib/windmill-dump", "/tmp/windmill/cache"]
# Use the pre-existing windmill user (uid=1000) from the base image
USER 1000
EXPOSE 8000
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD /healthcheck.sh
LABEL com.centurylinklabs.watchtower.enable="false" \
wud.watch="false" \
org.opencontainers.image.title="Windmill for Nextcloud AIO" \
org.opencontainers.image.description="Windmill workflow engine with bundled PostgreSQL for Nextcloud All-in-One" \
org.opencontainers.image.url="https://github.com/nextcloud/all-in-one" \
org.opencontainers.image.source="https://github.com/nextcloud/all-in-one" \
org.opencontainers.image.vendor="Nextcloud" \
org.opencontainers.image.documentation="https://github.com/nextcloud/all-in-one/blob/main/readme.md"

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Check if PostgreSQL is accepting connections on the Unix socket
if ! pg_isready -h /var/run/postgresql -q 2>/dev/null; then
exit 1
fi
# Check if Windmill is accepting connections on port 8000
if ! nc -z localhost 8000; then
exit 1
fi

View File

@@ -0,0 +1,202 @@
#!/bin/bash
set -e
# Validate required environment variables
if [ -z "$BASE_URL" ]; then
echo "BASE_URL must be provided. Exiting!"
exit 1
fi
export TZ="${TZ:-Etc/UTC}"
# Clear the cache volume when the image has been updated.
# /etc/windmill-image-build-epoch is written at image build time.
# A copy is stored in the cache volume after first start.
# If the two differ the image was updated and any stale cached artefacts
# (uv tools, worker dirs) should be removed so Windmill starts clean.
IMAGE_EPOCH_FILE="/etc/windmill-image-build-epoch"
CACHE_EPOCH_FILE="/tmp/windmill/cache/.image-build-epoch"
if [ -f "$IMAGE_EPOCH_FILE" ]; then
IMAGE_EPOCH="$(cat "$IMAGE_EPOCH_FILE")"
if [ -f "$CACHE_EPOCH_FILE" ]; then
CACHE_EPOCH="$(cat "$CACHE_EPOCH_FILE")"
if [ "$IMAGE_EPOCH" != "$CACHE_EPOCH" ]; then
echo "Windmill image updated (was $CACHE_EPOCH, now $IMAGE_EPOCH). Clearing cache..."
find /tmp/windmill/cache -mindepth 1 -maxdepth 1 ! -name '.image-build-epoch' -exec rm -rf {} +
fi
fi
echo "$IMAGE_EPOCH" > "$CACHE_EPOCH_FILE"
fi
PGDATA="/var/lib/postgresql/data"
# The dump and its sentinel/log files live on a dedicated Docker volume that is
# separate from the postgres data directory. This means the dump survives a
# complete PGDATA wipe (which happens during a major-version upgrade) and there
# is no need for a staging subdirectory or complex file exclusion logic.
DUMP_DIR="/var/lib/windmill-dump"
DUMP_FILE="$DUMP_DIR/windmill-db-dump.sql"
# Current PG major version as shipped in this image
CURRENT_PG_MAJOR=$(cat /etc/postgres-major-version 2>/dev/null)
# ── Don't start if previous import failed ────────────────────────────────────
if [ -f "$DUMP_DIR/import.failed" ]; then
echo "The database import failed the last time. Please restore a backup and try again."
echo "For further clues on what went wrong, look at the logs above."
exit 1
fi
# ── Don't start if previous export failed ────────────────────────────────────
if [ -f "$DUMP_DIR/export.failed" ]; then
echo "Database export failed the last time. Most likely was the export time not high enough."
echo "Please report this to https://github.com/nextcloud/all-in-one/issues. Thanks!"
exit 1
fi
# Write the standard pg_hba.conf and listen_addresses settings into a data directory.
configure_pg() {
local datadir="$1"
cat > "$datadir/pg_hba.conf" << 'HBAEOF'
# TYPE DATABASE USER ADDRESS METHOD
local all all trust
HBAEOF
# Disable TCP entirely; all communication uses the Unix socket.
echo "listen_addresses = ''" >> "$datadir/postgresql.conf"
}
# ── PostgreSQL major-version upgrade via dump/restore ────────────────────────
if [ -f "$PGDATA/PG_VERSION" ]; then
DATA_PG_MAJOR=$(cat "$PGDATA/PG_VERSION")
if [ "$DATA_PG_MAJOR" -gt "$CURRENT_PG_MAJOR" ]; then
echo "ERROR: Data directory was created by PostgreSQL $DATA_PG_MAJOR but this image ships $CURRENT_PG_MAJOR."
echo "Downgrade is not supported. Please use a newer image version."
exit 1
fi
if [ "$DATA_PG_MAJOR" -lt "$CURRENT_PG_MAJOR" ]; then
echo "PostgreSQL major-version upgrade required: $DATA_PG_MAJOR$CURRENT_PG_MAJOR"
if ! [ -f "$DUMP_FILE" ]; then
echo "Unable to upgrade because the database dump is missing."
echo "Please restore a backup and try again."
exit 1
fi
# Write output to logfile so the import can be inspected later
exec > >(tee -i "$DUMP_DIR/database-import.log")
exec 2>&1
echo "Restoring database from dump into new PostgreSQL $CURRENT_PG_MAJOR cluster."
# Set the sentinel BEFORE any destructive operation so that a crash at
# any point leaves the guard in place and blocks the next start.
# The sentinel lives on the dump volume and therefore survives the PGDATA wipe.
touch "$DUMP_DIR/import.failed"
set -ex
# Wipe the old cluster and initialise a fresh one.
# The dump file is on a separate volume and is not affected.
rm -rf "${PGDATA:?}/"*
initdb -D "$PGDATA" \
--username=windmill \
--auth-local=trust \
--auth-host=trust \
--no-instructions
configure_pg "$PGDATA"
# Start postgres temporarily on a socket in /tmp so we can import.
# No TCP port is needed since we connect via the socket.
postgres -D "$PGDATA" -k /tmp -h "" &
TEMP_PG_PID=$!
# Wait until postgres accepts connections
while ! psql -h /tmp -U windmill -d postgres -c "select now()" > /dev/null 2>&1; do
echo "Waiting for the temporary database to start..."
sleep 5
done
# Create the windmill database
psql -h /tmp -U windmill -d postgres \
-c "CREATE DATABASE windmill OWNER windmill;"
# Restore from dump
echo "Restoring the database from dump..."
psql -h /tmp -U windmill -d windmill < "$DUMP_FILE"
# Stop the temporary postgres cleanly
pg_ctl -D "$PGDATA" stop -m smart -t 1800
wait "$TEMP_PG_PID" 2>/dev/null || true
set +ex
# Remove the sentinel only after the restore has fully completed
rm "$DUMP_DIR/import.failed"
echo "PostgreSQL upgrade to $CURRENT_PG_MAJOR complete."
fi
fi
# ── End of major-version upgrade section ─────────────────────────────────────
# ── Initialize PostgreSQL data directory on first run ────────────────────────
if [ -z "$(ls -A "$PGDATA" 2>/dev/null)" ]; then
echo "Initializing PostgreSQL database for Windmill..."
initdb -D "$PGDATA" \
--username=windmill \
--auth-local=trust \
--auth-host=trust \
--no-instructions
configure_pg "$PGDATA"
# Start PostgreSQL temporarily to create the windmill database, then stop it.
# supervisord will restart it properly afterward.
pg_ctl -D "$PGDATA" start -w -o "-k /var/run/postgresql"
psql -h /var/run/postgresql -U windmill postgres \
-c "CREATE DATABASE windmill OWNER windmill;"
pg_ctl -D "$PGDATA" stop -w
echo "PostgreSQL initialization complete."
fi
# ── Dump database and shut down on container stop ────────────────────────────
do_database_dump() {
# pg_dump uses a consistent transaction snapshot, so it is safe to run
# while Windmill is still connected — no need to stop it beforehand.
# Verify postgres is still accepting connections before attempting the dump.
if ! pg_isready -h /var/run/postgresql -U windmill -q; then
echo "WARNING: postgres is not ready; skipping dump."
kill "$SUPERVISORD_PID" 2>/dev/null || true
wait "$SUPERVISORD_PID" 2>/dev/null || true
return
fi
set -x
touch "$DUMP_DIR/export.failed"
rm -f "$DUMP_FILE.temp"
if pg_dump -h /var/run/postgresql -U windmill windmill > "$DUMP_FILE.temp"; then
mv "$DUMP_FILE.temp" "$DUMP_FILE"
rm "$DUMP_DIR/export.failed"
echo "Database dump successful!"
else
rm -f "$DUMP_FILE.temp"
echo "Database dump unsuccessful!"
fi
set +x
# Stop supervisord (which stops postgres and windmill)
kill "$SUPERVISORD_PID" 2>/dev/null || true
wait "$SUPERVISORD_PID" 2>/dev/null || true
}
trap do_database_dump SIGTERM SIGINT
# ── Start services ────────────────────────────────────────────────────────────
supervisord -c /supervisord.conf &
SUPERVISORD_PID=$!
wait "$SUPERVISORD_PID"

View File

@@ -0,0 +1,29 @@
[supervisord]
nodaemon=true
logfile=/var/log/supervisord/supervisord.log
pidfile=/var/run/supervisord/supervisord.pid
childlogdir=/var/log/supervisord/
logfile_maxbytes=50MB
logfile_backups=10
loglevel=error
[program:postgresql]
command=postgres -D /var/lib/postgresql/data -k /var/run/postgresql
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
# Start first: Windmill depends on PostgreSQL being ready
priority=10
autorestart=true
startsecs=5
[program:windmill]
command=/windmill-start.sh
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
priority=20
autorestart=true
startsecs=10

View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Wait for PostgreSQL to accept connections
until pg_isready -h /var/run/postgresql -q 2>/dev/null; do
echo "Waiting for PostgreSQL to be ready..."
sleep 2
done
# Start Windmill
exec windmill

View File

@@ -4,9 +4,65 @@ This directory features containers that are built for AIO which allows to add ad
## Disclaimers
All containers that are in this directory are community maintained so the responsibility is on the community to keep them updated and secure. There is no guarantee that this will be the case in the future.
## Overview
```mermaid
flowchart TD
%% ── Styles ───────────────────────────────────────────────────────────────────
classDef community fill:#FDEBD0,stroke:#E67E22,color:#222
classDef group fill:#FEF9E7,stroke:#F39C12,color:#333
subgraph COMM_AI["🤖 AI & Language"]
LAI(["🧠 Local AI\nPrivate AI assistant"]):::community
LT(["✏️ LanguageTool\nSpell & grammar check"]):::community
LTRANS(["🌐 LibreTranslate\nTranslation engine"]):::community
FACE(["🙂 FaceRecognition\nPhoto AI processor"]):::community
end
subgraph COMM_BACKUP["💾 Backup & Storage"]
BV(["📦 Borgbackup Viewer\nBrowse backups"]):::community
CALB(["📅 CalCardBackup\nCalendar/Contacts backup"]):::community
MINIO(["🗃️ MinIO\nS3-compatible storage"]):::community
SMB(["📂 SMB Server\nWindows file sharing"]):::community
end
subgraph COMM_EXTRA["🌟 Extra Services"]
HA(["🏠 Home Assistant\nHome automation"]):::community
STLW(["📧 Stalwart\nMail server"]):::community
NOCO(["🗂️ NocoDB\nNo-code database"]):::community
JSER(["🎯 Jellyseerr\nMedia request manager"]):::community
NOTIF(["📣 Notifications\nExternal push notify"]):::community
end
subgraph COMM_MEDIA["🎬 Media"]
PLEX(["🎞️ Plex\nMedia Server"]):::community
JELLY(["🎬 Jellyfin\nMedia Server"]):::community
DLNA(["📡 DLNA\nMedia Streaming"]):::community
MEMTR(["📸 Memories\nVideo Transcoder"]):::community
MKV(["💿 MakeMKV\nBlu-ray / DVD rip"]):::community
end
subgraph COMM_MONITOR["📊 Monitoring & Infra"]
GLAN(["📈 Glances\nSystem monitoring"]):::community
EXP(["📊 Nextcloud Exporter\nPrometheus metrics"]):::community
SCRU(["💽 Scrutiny\nDisk health (S.M.A.R.T.)"]):::community
CMGMT(["🐳 Container Mgmt\nDocker web console"]):::community
end
subgraph COMM_SEC["🔒 Security & Network"]
F2B(["🚫 Fail2ban\nBrute-force protection"]):::community
PIH(["🕳️ Pi-hole\nAd & DNS blocker"]):::community
VW(["🔐 Vaultwarden\nPassword Manager"]):::community
LDAP(["👥 LLDAP\nLight LDAP / Users"]):::community
CADDY(["🌐 Caddy\nReverse Proxy + Geoblocking"]):::community
NPMPLUS(["🌐 NPMplus\nNginx Proxy Manager"]):::community
end
```
## How to use this?
Starting with v11 of AIO, the management of Community Containers is done via the AIO interface (it is the last section in the AIO interface, so only visible if you scroll down).
⚠️⚠️⚠️ Please review the folder for documentation on each of the containers before adding them! Not reviewing the documentation for each of them first might break starting the AIO containers because e.g. fail2ban only works on Linux and not on Docker Desktop! **Hint:** If the containers where running already, in order to actually start the added container, you need to click on `Stop containers` and the `Update and start containers` in order to actually start it.
⚠️⚠️⚠️ Please review the folder for documentation on each of the containers before adding them! Not reviewing the documentation for each of them first might break starting the AIO containers because some containers are not compatible with each other and more.
## How to add containers?
Simply submit a PR by creating a new folder in this directory: https://github.com/nextcloud/all-in-one/tree/main/community-containers with the name of your container. It must include a json file with the same name and with correct syntax and a readme.md with additional information. You might get inspired by caddy, fail2ban, local-ai, libretranslate, plex, pi-hole or vaultwarden (subfolders in this directory). For a full-blown example of the json file, see https://github.com/nextcloud/all-in-one/blob/main/php/containers.json. The json-schema that it validates against can be found here: https://github.com/nextcloud/all-in-one/blob/main/php/containers-schema.json.

View File

@@ -3,15 +3,23 @@ It is possible due to several reasons that you do not want or cannot open Nextcl
### Content
- [1. Tailscale](#1-tailscale)
- [2. The normal way](#2-the-normal-way)
- [3. Use the ACME DNS-challenge](#3-use-the-acme-dns-challenge)
- [4. Use Cloudflare](#4-use-cloudflare)
- [5. Buy a certificate and use that](#5-buy-a-certificate-and-use-that)
- [2. Pangolin](#2-pangolin)
- [3. The normal way](#3-the-normal-way)
- [4. Use the ACME DNS-challenge](#4-use-the-acme-dns-challenge)
- [5. Use Cloudflare](#5-use-cloudflare)
- [6. Buy a certificate and use that](#6-buy-a-certificate-and-use-that)
## 1. Tailscale
This is the recommended way. For a reverse proxy example guide for Tailscale, see this guide by [@Perseus333](https://github.com/Perseus333): https://github.com/nextcloud/all-in-one/discussions/6817
## 2. The normal way
## 2. Pangolin
[Pangolin](https://pangolin.net/) is an open-source, WireGuard-based remote access platform similar in concept to Tailscale. It uses the **Newt** connector to create outbound-only encrypted tunnels — no inbound ports need to be opened on your firewall. Pangolin handles TLS automatically, providing a valid certificate for your Nextcloud domain.
You can use either [Pangolin Cloud](https://app.pangolin.net/) (free tier available) or [self-host your own Pangolin server](https://docs.pangolin.net/self-host/quick-install) on a VPS. For private/local-only access, self-hosting Pangolin on a machine within your local network means that Nextcloud never needs to be exposed to the public internet.
For the reverse proxy configuration details and a step-by-step setup guide, see the [Pangolin section in the reverse proxy documentation](./reverse-proxy.md#pangolin).
## 3. The normal way
The normal way is the following:
1. Set up your domain correctly to point to your home network
1. Set up a reverse proxy by following the [reverse proxy documentation](./reverse-proxy.md) but only open port 80 (which is needed for the ACME challenge to work - however no real traffic will use this port).
@@ -21,12 +29,12 @@ The normal way is the following:
**Hint:** You may have a look at [this video](https://youtu.be/zk-y2wVkY4c) for a more complete but possibly outdated example.
## 3. Use the ACME DNS-challenge
## 4. Use the ACME DNS-challenge
You can alternatively use the ACME DNS-challenge to get a valid certificate for Nextcloud. Here is described how to set it up using an external caddy reverse proxy: https://github.com/nextcloud/all-in-one#how-to-get-nextcloud-running-using-the-acme-dns-challenge
## 4. Use Cloudflare
## 5. Use Cloudflare
If you do not have any control over the network, you may think about using Cloudflare Tunnel to get a valid certificate for your Nextcloud. However it will be opened to the public internet then. See https://github.com/nextcloud/all-in-one#how-to-run-nextcloud-behind-a-cloudflare-tunnel how to set this up.
## 5. Buy a certificate and use that
## 6. Buy a certificate and use that
If none of the above ways work for you, you may simply buy a certificate from an issuer for your domain. You then download the certificate onto your server, configure AIO in [reverse proxy mode](./reverse-proxy.md) and use the certificate for your domain in your reverse proxy config.

View File

@@ -3,7 +3,7 @@
There are basically three ways how to migrate from an already existing Nextcloud installation to Nextcloud AIO (if you ran AIO on the former installation already, you can follow [these steps](https://github.com/nextcloud/all-in-one#how-to-migrate-from-aio-to-aio)):
1. Migrate only the files which is the easiest way (this excludes all calendar data for example)
1. Migrate the files and the database which is much more complicated (and doesn't work on former snap installations)
1. Migrate the files and the database which is much more complicated (with special handling required for former snap installations, see [below](#migrating-from-a-snap-installation))
1. Use the user_migration app that allows to migrate some of the user's data from a former instance to a new instance but needs to be done manually for each user
## Migrate only the files
@@ -21,7 +21,7 @@ The procedure for migrating only the files works like this:
1. If the restored data is older than any clients you want to continue to sync, for example if the server was down for a period of time during migration, you may want to take a look at [Synchronising with clients after migration](/migration.md#synchronising-with-clients-after-migration) below.
## Migrate the files and the database
**Please note**: this is much more complicated than migrating only the files and also not as failproof so be warned! Also, this will not work on former snap installations as the snap is read-only and thus you cannot install the necessary `pdo_pgsql` PHP extension. So if migrating from snap, you will need to use one of the other methods. However you could try to ask if the snaps maintainer could add this one small PHP extension to the snap here: https://github.com/nextcloud-snap/nextcloud-snap/issues which would allow for an easy migration.
**Please note**: this is much more complicated than migrating only the files and also not as failproof so be warned! If you are migrating from a snap installation, please first follow the [dedicated snap migration steps](#migrating-from-a-snap-installation) below, which show you how to perform the database conversion using a temporary Docker container. Once done, you can continue from step 5 of this guide.
The procedure for migrating the files and the database works like this:
1. Make sure that your old instance is on exactly the same version like the version used in Nextcloud AIO. (e.g. 23.0.0) You can find the used version here: [click here](https://github.com/nextcloud/all-in-one/search?l=Dockerfile&q=NEXTCLOUD_VERSION&type=). If not, simply upgrade your former installation to that version or wait until the version used in Nextcloud AIO got updated to the same version of your former installation or the other way around.
@@ -87,6 +87,130 @@ If not, feel free to restore the AIO instance from backup and start at step 8 ag
If the restored data is older than any clients you want to continue to sync, for example if the server was down for a period of time during migration, you may want to take a look at [Synchronising with clients after migration](/migration.md#synchronising-with-clients-after-migration) below.
### Migrating from a snap installation
**Disclaimer:** it might be possible that the guide below is not working 100% correctly, yet. Improvements to it are very welcome!
Since the Nextcloud snap is read-only, it is not possible to install the `pdo_pgsql` PHP extension inside the snap to perform the MySQL-to-PostgreSQL database conversion required by AIO. As a workaround, a temporary [nextcloud/docker](https://github.com/nextcloud/docker) container can be used as an intermediate environment that already includes `pdo_pgsql` and can convert the snap's MySQL database to PostgreSQL for you.
This procedure covers steps 13 of the regular migration above (version matching, app updates, and database conversion) and also produces the `database-dump.sql` needed for step 4. Once finished, continue from step 5 of the [Migrate the files and the database](#migrate-the-files-and-the-database) procedure above.
1. **Create a backup of the snap before doing anything else**, so you can restore the snap to its current state if anything goes wrong:
```
sudo snap save nextcloud
```
This creates a snapshot that can be restored later with `sudo snap restore <snapshot-id>`. The snapshot ID is shown in the output of `snap save`. You can also list existing snapshots with `snap saved`.
1. Note the exact Nextcloud version of your snap installation:
```
sudo nextcloud.occ -V
```
1. Make sure that this version matches exactly the version used in Nextcloud AIO. You can find the AIO version here: [click here](https://github.com/nextcloud/all-in-one/search?l=Dockerfile&q=NEXTCLOUD_VERSION&type=). If they do not match, upgrade your snap with `sudo snap refresh nextcloud --channel=<major-version>/stable` or wait for AIO to be updated to the same version.
1. Update all installed Nextcloud apps to their latest versions:
```
sudo nextcloud.occ app:update --all
```
1. Retrieve the necessary configuration values from the snap using `nextcloud.occ` and store them in environment variables. Do this **before** stopping the snap, as `nextcloud.occ` requires the snap services to be running:
```
export INSTANCEID=$(sudo nextcloud.occ config:system:get instanceid)
export PASSWORDSALT=$(sudo nextcloud.occ config:system:get passwordsalt)
export SECRET=$(sudo nextcloud.occ config:system:get secret)
export TABLE_PREFIX=$(sudo nextcloud.occ config:system:get dbtableprefix || echo "oc_")
export SNAP_DATA=$(sudo nextcloud.occ config:system:get datadirectory)
# Note down SNAP_DATA — you will need it later when copying files
echo "Snap data directory: $SNAP_DATA"
```
1. Export a dump of the snap's MySQL database:
```
sudo nextcloud.mysqldump > ~/mysql-dump.sql
```
1. Stop the snap to prevent further writes during the migration:
```
sudo snap stop nextcloud
```
1. Set up environment variables for the temporary containers (adjust the version and passwords as needed):
```
export NEXTCLOUD_VERSION="29.0.0" # Replace with the exact version from step 2
export MYSQL_PASSWORD="mysql-temp-password"
export PG_USER="ncadmin"
export PG_PASSWORD="my-temporary-pg-password"
export PG_DATABASE="nextcloud_db"
```
1. Create a Docker network for the temporary migration containers:
```
docker network create nextcloud-migration
```
1. Start a temporary MySQL container and import the snap database dump into it:
```
docker run -d \
--name mysql-migration \
--network nextcloud-migration \
-e MYSQL_ROOT_PASSWORD="mysql-root-temp" \
-e MYSQL_DATABASE="nextcloud" \
-e MYSQL_USER="nextcloud" \
-e MYSQL_PASSWORD="$MYSQL_PASSWORD" \
mysql:8
# Wait for MySQL to finish starting up before importing
until docker exec mysql-migration mysqladmin ping -h localhost --silent 2>/dev/null; do sleep 1; done
docker exec -i mysql-migration mysql -u nextcloud -p"$MYSQL_PASSWORD" nextcloud < ~/mysql-dump.sql
```
1. Start a temporary PostgreSQL container as the migration target:
```
docker run -d \
--name postgres-migration \
--network nextcloud-migration \
-e POSTGRES_USER="$PG_USER" \
-e POSTGRES_PASSWORD="$PG_PASSWORD" \
-e POSTGRES_DB="$PG_DATABASE" \
postgres:16
```
1. Create a temporary config file for the migration container using the values retrieved in step 5:
```
cat > /tmp/migration-config.php << EOF
<?php
\$CONFIG = array(
'instanceid' => '$INSTANCEID',
'passwordsalt' => '$PASSWORDSALT',
'secret' => '$SECRET',
'dbtype' => 'mysql',
'dbname' => 'nextcloud',
'dbhost' => 'mysql-migration',
'dbport' => '',
'dbtableprefix' => '$TABLE_PREFIX',
'dbuser' => 'nextcloud',
'dbpassword' => '$MYSQL_PASSWORD',
'datadirectory' => '$SNAP_DATA',
'installed' => true,
);
EOF
```
1. Run a temporary nextcloud/docker container to convert the MySQL database to PostgreSQL. Note that the container image version must match the Nextcloud version you noted in step 2, and that `pdo_pgsql` is already included in the `nextcloud` Docker image:
```
docker run --rm \
--network nextcloud-migration \
--entrypoint bash \
-v /tmp/migration-config.php:/var/www/html/config/config.php:rw \
-v "${SNAP_DATA}:${SNAP_DATA}:ro" \
nextcloud:${NEXTCLOUD_VERSION}-apache \
-c "php /var/www/html/occ db:convert-type --all-apps --password '$PG_PASSWORD' pgsql '$PG_USER' postgres-migration '$PG_DATABASE'"
```
**Please note:** The `occ` command may print a warning about being run as root — this can be safely ignored for this migration step.
1. Export the converted PostgreSQL database:
```
docker exec postgres-migration pg_dump -U "$PG_USER" "$PG_DATABASE" > ~/database-dump.sql
```
**Please note:** The exact name of the database export file is important! (`database-dump.sql`)
1. Clean up the temporary containers and network:
```
docker rm -f mysql-migration postgres-migration
docker network rm nextcloud-migration
```
1. You now have a `~/database-dump.sql`. Continue from step 5 of the [Migrate the files and the database](#migrate-the-files-and-the-database) procedure above. When those steps ask for your old data directory path, use the `$SNAP_DATA` value noted in step 5 (typically `/var/snap/nextcloud/common`). If you have opened a new shell session since then, you can retrieve it again with `sudo nextcloud.occ config:system:get datadirectory` (requires the snap to be running) or read it directly from `/var/snap/nextcloud/current/nextcloud/config/config.php`.
1. Once you have verified that the migration to AIO was successful and everything is working correctly, you can permanently remove the Nextcloud snap from your system:
```
sudo snap remove --purge nextcloud
```
The `--purge` flag removes the snap along with all its saved snapshots and data. Omit it if you want to keep the snap snapshots as a fallback. **Only do this after you are fully satisfied that your AIO instance is working correctly**, as this action cannot be undone.
## Use the user_migration app
A new way since the Nextcloud update to 24 is to use the new [user_migration app](https://apps.nextcloud.com/apps/user_migration#app-gallery). It allows to export the most important data on one instance and import it on a different Nextcloud instance. For that, you need to install and enable the user_migration app on your old instance, trigger the export for the user, create the user on the new instance, log in with that user and import the archive that was created during the export. This then needs to be done for each user that you want to migrate.

View File

@@ -11,6 +11,7 @@
"nextcloud-aio-notify-push",
"nextcloud-aio-whiteboard",
"nextcloud-aio-harp",
"nextcloud-aio-windmill",
"nextcloud-aio-nextcloud"
],
"display_name": "Apache & Caddy",
@@ -51,7 +52,8 @@
"APACHE_MAX_TIME=%NEXTCLOUD_MAX_TIME%",
"NOTIFY_PUSH_HOST=nextcloud-aio-notify-push",
"WHITEBOARD_HOST=nextcloud-aio-whiteboard",
"HARP_HOST=nextcloud-aio-harp"
"HARP_HOST=nextcloud-aio-harp",
"WINDMILL_HOST=nextcloud-aio-windmill"
],
"volumes": [
{
@@ -148,7 +150,8 @@
"nextcloud-aio-fulltextsearch",
"nextcloud-aio-talk-recording",
"nextcloud-aio-imaginary",
"nextcloud-aio-docker-socket-proxy"
"nextcloud-aio-docker-socket-proxy",
"nextcloud-aio-windmill"
],
"display_name": "Nextcloud",
"image": "ghcr.io/nextcloud-releases/aio-nextcloud",
@@ -175,7 +178,8 @@
"FULLTEXTSEARCH_PASSWORD",
"IMAGINARY_SECRET",
"WHITEBOARD_SECRET",
"HP_SHARED_KEY"
"HP_SHARED_KEY",
"WINDMILL_SECRET"
],
"volumes": [
{
@@ -263,7 +267,10 @@
"WHITEBOARD_SECRET=%WHITEBOARD_SECRET%",
"WHITEBOARD_ENABLED=%WHITEBOARD_ENABLED%",
"HARP_ENABLED=%HARP_ENABLED%",
"HP_SHARED_KEY=%HP_SHARED_KEY%"
"HP_SHARED_KEY=%HP_SHARED_KEY%",
"WINDMILL_ENABLED=%WINDMILL_ENABLED%",
"WINDMILL_HOST=nextcloud-aio-windmill",
"WINDMILL_SECRET=%WINDMILL_SECRET%"
],
"stop_grace_period": 600,
"restart": "unless-stopped",
@@ -949,6 +956,74 @@
"cap_drop": [
"NET_RAW"
]
},
{
"container_name": "nextcloud-aio-windmill",
"image_tag": "%AIO_CHANNEL%",
"display_name": "Windmill",
"image": "ghcr.io/nextcloud-releases/aio-windmill",
"user": "1000",
"init": true,
"internal_port": "8000",
"expose": [
"8000"
],
"healthcheck": {
"start_period": "0s",
"test": "/healthcheck.sh",
"interval": "30s",
"timeout": "30s",
"start_interval": "5s",
"retries": 3
},
"environment": [
"BASE_URL=https://%NC_DOMAIN%/windmill",
"TZ=%TIMEZONE%",
"NUM_WORKERS=1",
"MODE=standalone",
"DISABLE_NSJAIL=true",
"DATABASE_URL=postgresql://windmill@localhost/windmill?host=/var/run/postgresql",
"SUPERADMIN_SECRET=%WINDMILL_SECRET%"
],
"secrets": [
"WINDMILL_SECRET"
],
"volumes": [
{
"source": "nextcloud_aio_windmill_db",
"destination": "/var/lib/postgresql/data",
"writeable": true
},
{
"source": "nextcloud_aio_windmill_dump",
"destination": "/var/lib/windmill-dump",
"writeable": true
},
{
"source": "nextcloud_aio_windmill_cache",
"destination": "/tmp/windmill/cache",
"writeable": true
}
],
"backup_volumes": [
"nextcloud_aio_windmill_db",
"nextcloud_aio_windmill_dump"
],
"restart": "unless-stopped",
"stop_grace_period": 1800,
"read_only": true,
"tmpfs": [
"/tmp",
"/var/run/postgresql",
"/var/log/supervisord",
"/var/run/supervisord"
],
"profiles": [
"windmill"
],
"cap_drop": [
"NET_RAW"
]
}
]
}

View File

@@ -41,4 +41,10 @@ document.addEventListener("DOMContentLoaded", function(event) {
// Whiteboard
let whiteboard = document.getElementById("whiteboard");
whiteboard.disabled = true;
// Windmill
let windmill = document.getElementById("windmill");
if (windmill) {
windmill.disabled = true;
}
});

View File

@@ -177,6 +177,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled,
'is_harp_enabled' => $configurationManager->isHarpEnabled,
'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled,
'is_windmill_enabled' => $configurationManager->isWindmillEnabled,
'community_containers' => $configurationManager->listAvailableCommunityContainers(),
'community_containers_enabled' => $configurationManager->aioCommunityContainers,
'bypass_container_update' => $bypass_container_update,

View File

@@ -109,6 +109,10 @@ readonly class ContainerDefinitionFetcher {
if (!$this->configurationManager->isWhiteboardEnabled) {
continue;
}
} elseif ($entry['container_name'] === 'nextcloud-aio-windmill') {
if (!$this->configurationManager->isWindmillEnabled) {
continue;
}
}
$ports = new ContainerPorts();
@@ -222,6 +226,10 @@ readonly class ContainerDefinitionFetcher {
if (!$this->configurationManager->isWhiteboardEnabled) {
continue;
}
} elseif ($value === 'nextcloud-aio-windmill') {
if (!$this->configurationManager->isWindmillEnabled) {
continue;
}
} else {
// Skip dependencies on community containers that are not currently enabled.
// Only apply this when the current entry is itself a community container,

View File

@@ -98,6 +98,7 @@ readonly class ConfigurationController {
$this->configurationManager->isDockerSocketProxyEnabled = isset($request->getParsedBody()['docker-socket-proxy']);
$this->configurationManager->isHarpEnabled = isset($request->getParsedBody()['harp']);
$this->configurationManager->isWhiteboardEnabled = isset($request->getParsedBody()['whiteboard']);
$this->configurationManager->isWindmillEnabled = isset($request->getParsedBody()['windmill']);
}
if (isset($request->getParsedBody()['community-form'])) {

View File

@@ -45,6 +45,12 @@ class ConfigurationManager
set { $this->set('isWhiteboardEnabled', $value); }
}
public bool $isWindmillEnabled {
// Type-cast because old configs could have 1/0 for this key.
get => (bool) $this->get('isWindmillEnabled', false);
set { $this->set('isWindmillEnabled', $value); }
}
public bool $restoreExcludePreviews {
// Type-cast because old configs could have '1'/'' for this key.
get => (bool) $this->get('restore-exclude-previews', false);
@@ -1108,6 +1114,7 @@ class ConfigurationManager
// Allow to get local ip-address of caddy container and add it to trusted proxies automatically
'CADDY_IP_ADDRESS' => in_array('caddy', $this->aioCommunityContainers, true) ? gethostbyname('nextcloud-aio-caddy') : '',
'WHITEBOARD_ENABLED' => $this->isWhiteboardEnabled ? 'yes' : '',
'WINDMILL_ENABLED' => $this->isWindmillEnabled ? 'yes' : '',
'AIO_VERSION' => $this->getAioVersion(),
default => $this->getRegisteredSecret($placeholder),
};

View File

@@ -220,6 +220,20 @@
>
<label for="whiteboard">Whiteboard</label>
</p>
<p>
<input
type="checkbox"
id="windmill"
name="windmill"
{% if is_windmill_enabled == true %}
checked="checked"
data-initial-state="true"
{% else %}
data-initial-state="false"
{% endif %}
>
<label for="windmill">Windmill (workflow automation. Access the Windmill UI at <code>https://{{ domain }}/windmill</code>)</label>
</p>
<input class="options-form-submit" type="submit" value="Save changes" />
</form>
<p><strong>Minimal system requirements:</strong> When any optional container is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV, Nextcloud Talk Recording-server or Fulltextsearch, at least 3GB RAM are required. For Talk Recording-server additional 2 vCPUs are required. When enabling everything, at least 5GB RAM and a quad-core CPU are required. Recommended are at least 1GB more RAM than the minimal requirement. For further advice and recommendations see <strong><a target="_blank" href="https://github.com/nextcloud/all-in-one/discussions/1335">this documentation</a></strong></p>

View File

@@ -87,6 +87,70 @@ Included are:
|---|---|
| ![image](https://github.com/user-attachments/assets/6ef5d7b5-86f2-402c-bc6c-b633af2ca7dd) | ![image](https://github.com/user-attachments/assets/939d0fdf-436f-433d-82d3-27548263a040) |
## Architecture overview
```mermaid
flowchart TB
%% ── Styles ───────────────────────────────────────────────────────────────────
classDef user fill:#FFF3CD,stroke:#F0AD4E,color:#333
classDef master fill:#E8D5F5,stroke:#9B59B6,color:#222
classDef core fill:#D6EAF8,stroke:#2E86C1,color:#222
classDef opt fill:#D5F5E3,stroke:#27AE60,color:#222
classDef community fill:#FDEBD0,stroke:#E67E22,color:#222
classDef access fill:#EAFAF1,stroke:#1E8449,color:#222
%% ── Top row: people ─────────────────────────────────────────────────────────
YOU(["🧑‍💻 Admin\n(You)"]):::user
ENDUSER(["🧑‍🤝‍🧑 Users\n(family / team)"]):::user
%% ── Everything that runs inside AIO ─────────────────────────────────────────
subgraph AIO[" 🐳 Nextcloud AIO "]
MC(["🧠 Mastercontainer\n─────────────────────────\n▸ AIO interface :8080 / :8443\n▸ Manages & updates containers\n▸ Handles backups"]):::master
subgraph CORE[" 📦 Core Stack (auto-started) "]
PROXY(["🔀 Apache\nProxy & HTTPS"]):::core
NC(["☁️ Nextcloud\nApp Server"]):::core
DB(["🗄️ PostgreSQL\nDatabase"]):::core
CACHE(["⚡ Redis\nCache"]):::core
PUSH(["🔔 Notify Push\nReal-time sync"]):::core
end
subgraph OPT[" 🧩 Optional Built-in Containers (enable in AIO interface) "]
COLLA(["📄 Nextcloud Office"]):::opt
OO(["📄 OnlyOffice\nDocument Server"]):::opt
TALK(["🎙️ Talk\nVideo & Voice calls"]):::opt
TALKREC(["🎬 Talk Recording"]):::opt
FTS(["🔎 Full-text Search\n(Elasticsearch)"]):::opt
IMAG(["🖼️ Imaginary\nImage previews"]):::opt
CLAM(["🦠 ClamAV\nAntivirus"]):::opt
WB(["🖊️ Whiteboard"]):::opt
end
COMM(["🌍 Community Containers\n──────────────────────\n30+ optional add-ons\nSee community-containers/"]):::community
click COMM "https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers" "Browse community containers"
end
%% ── Result node (outside AIO) ────────────────────────────────────────────────
NC_URL(["🌐 https://your-domain.com\n✅ Nextcloud — ready to use!"]):::access
%% ── Flows ────────────────────────────────────────────────────────────────────
YOU -->|"① open :8080 or :8443 in browser"| MC
MC -->|"② auto-starts & wires up"| CORE
MC -. "③ enable in AIO interface" .-> OPT
MC -. "④ add via AIO interface" .-> COMM
PROXY --> NC
NC --- DB
NC --- CACHE
NC --- PUSH
OPT -->|"integrate with"| NC
COMM -.->|"integrate with"| NC
CORE -->|"⑤ stack is ready!"| NC_URL
ENDUSER -->|"⑥ browser / app"| NC_URL
YOU -->|"⑥ use normally"| NC_URL
```
## How to use this?
The steps below are written for Linux. For platform-specific guidance see:

View File

@@ -6,7 +6,7 @@ This guide explains how to connect to Nextcloud AIO securely via HTTPS (TLS) usi
- **Integrated**: AIO's built-in reverse proxy with automatic HTTPS
- **External**: An external reverse proxy (such as Caddy or Nginx or Cloudflare Proxy)
- **Secure tunnel**: Tunneling services for private network access or public access without port forwarding (such as Tailscale Serve or Cloudflare Tunnel)
- **Secure tunnel**: Tunneling services for private network access or public access without port forwarding (such as Tailscale Serve, Cloudflare Tunnel, or Pangolin)
## Choosing Your Approach
@@ -23,6 +23,7 @@ This guide explains how to connect to Nextcloud AIO securely via HTTPS (TLS) usi
| **Integrated** | Simple setups, single service on port 443 | Public IP, dedicated port 443 | Yes (443) |
| **External Reverse Proxy** (including Cloudflare Proxy) | Multiple services, existing web server, or users wanting DDoS protection | Existing reverse proxy, willingness to set one up, or Cloudflare account | Yes (443) |
| **Cloudflare Tunnel** | No port forwarding possible/desired, public access | Cloudflare account | No |
| **Pangolin** | No port forwarding possible/desired, public or private access, self-hostable tunnel | Pangolin Cloud account or self-hosted Pangolin server | No |
| **Tailscale Serve** | Private access (tailnet only) | Tailscale account | No |
| **Tailscale Funnel** | Public access via Tailscale | Tailscale account | No |
@@ -68,29 +69,32 @@ Using an existing external reverse proxy is required in particular if port `443/
> [!NOTE]
> An external reverse proxy can also facilitate other routing approaches, but Nextcloud AIO only supports having its own dedicated hostname (e.g., `cloud.example.com`). You cannot run it in a subfolder like `example.com/nextcloud/`.[^shared]
### Secure tunnel: Using AIO with a secure tunneling service (*Tailscale, Cloudflare*)
### Secure tunnel: Using AIO with a secure tunneling service (*Tailscale, Cloudflare, Pangolin*)
Cloudflare and Tailscale offer secure tunneling services that let you access your Nextcloud without opening ports on your firewall.
Cloudflare, Tailscale, and Pangolin offer secure tunneling services that let you access your Nextcloud without opening ports on your firewall.
#### Private network access
For Nextcloud AIO, you can use:
- **Cloudflare Tunnel (`cloudflared`)** - Secure outbound-only tunnels that don't require exposing ports
- **Tailscale Serve** - Expose services privately on your Tailscale network (tailnet only)
- **Pangolin** - WireGuard-based outbound tunnels using the Newt connector; can be used for both private and public access
Both options provide private network access to your Nextcloud AIO instance.
All three options provide private network access to your Nextcloud AIO instance.
#### Public Internet access (without port forwarding)
To make your Nextcloud AIO instance accessible from the public Internet (not just your private network), you can use:
- **Cloudflare Tunnel** with public routes enabled (which combines Cloudflare Tunnel with Cloudflare's proxy features)
- **Tailscale Funnel** - Expose services to the public Internet via Tailscale's infrastructure
- **Pangolin** - Expose services publicly via Pangolin Cloud or a self-hosted Pangolin server
**Comparison of Cloudflare and Tailscale options:**
**Comparison of Cloudflare, Tailscale, and Pangolin options:**
| Feature | Access Scope | Inbound Ports Required | Use Case |
|---------|--------------|----------------|----------|
| **Cloudflare Tunnel** | Public Internet | None | Public access without port forwarding |
| **Pangolin** | Public Internet or private | None | Public or private access; self-hostable |
| **Tailscale Serve** | Your Tailscale network only | None | Private access for you and invited users |
| **Tailscale Funnel** | Public Internet | None | Public access through Tailscale |
@@ -737,6 +741,48 @@ httpServer.on('upgrade', (req, socket, head) => {
</details>
##### Pangolin
<details>
<summary>click here to expand</summary>
[Pangolin](https://pangolin.net/) is an open-source, identity-based remote access platform built on WireGuard that enables secure connectivity to private resources without opening inbound firewall ports. It uses the **Newt** connector as an outbound-only WireGuard tunnel client that runs alongside AIO on your server and connects to a Pangolin server (either Pangolin Cloud or your own self-hosted instance). From AIO's perspective, Pangolin works like a reverse proxy: Pangolin handles TLS and routes public traffic through the tunnel to AIO.
**Requirements:**
- A [Pangolin Cloud](https://app.pangolin.net/) account **or** a [self-hosted Pangolin server](https://docs.pangolin.net/self-host/quick-install)
- No open inbound ports required
**Setup:**
1. **Set up Pangolin**: Either sign up for a free [Pangolin Cloud](https://app.pangolin.net/) account, or [self-host Pangolin](https://docs.pangolin.net/self-host/quick-install) on a VPS with a public IP address.
1. **Create a site**: In the Pangolin dashboard, create a new site for the machine that will run AIO. Follow the instructions to generate a **Newt ID** and **Newt secret** for the site.
1. **Deploy Newt on the AIO host**: Run the Newt connector on the same machine as AIO. You can deploy it as a Docker container alongside AIO:
```yaml
services:
newt:
image: fosrl/newt
restart: unless-stopped
environment:
- PANGOLIN_ENDPOINT=https://app.pangolin.net # For Pangolin Cloud; replace with your self-hosted server URL if self-hosting
- NEWT_ID=<your-newt-id>
- NEWT_SECRET=<your-newt-secret>
```
Or as a standalone binary — see the [Newt documentation](https://github.com/fosrl/newt) for details.
1. **Create a resource**: In the Pangolin dashboard, create a new resource for the site. Set the target to `http://private.ip.address.of.server:11000`.<br>
⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the port and address to match your `APACHE_PORT` and `APACHE_IP_BINDING` settings.
1. **Configure AIO**: When starting AIO, add `--env SKIP_DOMAIN_VALIDATION=true` to disable domain validation (domain validation is known to not work through Pangolin tunnels). Use the domain assigned by Pangolin as your Nextcloud domain when opening the AIO interface.
1. Now continue with [point 2](#2-use-this-startup-command).
</details>
##### Synology Reverse Proxy
<details>