Compare commits

...

29 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
69fe038ceb aio-interface: handle SSH key authorization error explicitly in remote backup setup
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-05-21 12:19:04 +02:00
Simon L.
5a474d92d9 notify-push: fix startup on ipv6 disabled servers (#8188) 2026-05-21 12:06:28 +02:00
Simon L.
795baf903b server.config.php: downstream sync serverid upstream change (#8187) 2026-05-21 12:01:49 +02:00
Simon L.
b4c0266461 notify-push: fix startup on ipv6 disabled servers
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-05-21 10:53:49 +02:00
Simon L.
3a988938b2 server.config.php: downstream sync serverid upstream change
Signed-off-by: Simon L. <szaimen@e.mail.de>
2026-05-21 10:48:37 +02:00
Simon L.
7c0df4f701 build(deps): bump nats from 2.14.0-scratch to 2.14.1-scratch in /Containers/talk (#8185) 2026-05-21 10:40:41 +02:00
dependabot[bot]
1d27e165e6 build(deps): bump nats in /Containers/talk
Bumps nats from 2.14.0-scratch to 2.14.1-scratch.

---
updated-dependencies:
- dependency-name: nats
  dependency-version: 2.14.1-scratch
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-21 04:23:15 +00:00
Simon L.
a75d1c48bf Small improvements to /app/readme (#8179) 2026-05-20 17:15:51 +02:00
Simon L.
74b98b369e PHP dependency updates (#8180) 2026-05-20 16:36:42 +02:00
Simon L.
74dee77fac Add top-level .editorconfig; improve app/.editorconfig (#8178) 2026-05-20 15:54:33 +02:00
szaimen
70100ba5ef php dependency updates
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-20 13:42:43 +00:00
Gaetano Giunta
de72608519 Use proper name for AIP and Nextcloud in readme file
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-20 11:12:51 +00:00
Gaetano Giunta
02c9a7475b Small improvements to /app/readme
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-20 11:02:14 +00:00
Gaetano Giunta
c2e48d3524 add a comment to .editorconfig
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-20 10:56:10 +00:00
Gaetano Giunta
b615acf413 tabs to spaces for php/psalm.xml
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-20 10:55:39 +00:00
Gaetano Giunta
379b3d9e5a add top-level .editorconfig; improve app/.editorconfig
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-20 10:46:15 +00:00
Simon L.
abbe6a85cf build(deps): bump docker from 29.5.0-cli to 29.5.1-cli in /Containers/mastercontainer (#8177) 2026-05-20 10:50:58 +02:00
dependabot[bot]
20835baa0c build(deps): bump docker in /Containers/mastercontainer
Bumps docker from 29.5.0-cli to 29.5.1-cli.

---
updated-dependencies:
- dependency-name: docker
  dependency-version: 29.5.1-cli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-20 08:36:32 +00:00
Simon L.
a32568cc9c mastercontainer: run session-deduplicator as www-data (#8175) 2026-05-20 10:20:56 +02:00
Dimas D. Angga
c6748dc450 fix(mastercontainer): run session-deduplicator as www-data
The session-deduplicator only touches files under /mnt/docker-aio-config/session/, which is already owned by www-data, so running it as root grants more privilege than it needs. Dropping to www-data reduces the number of root-owned processes in the mastercontainer and follows least-privilege for the supervisord program set.
2026-05-20 09:32:49 +07:00
Tim Alexander Neuenbauer
6288665170 home-assistant: Update readme.md (#8055) 2026-05-19 16:25:28 +02:00
Simon L.
a3d84cce7b add warning notice to minio container that minio is not maintained any more (#8131) 2026-05-18 19:18:01 +02:00
Simon L.
535a0ffbd2 add a comment to clarify the reason for the condition added in PR 8145 (#8147) 2026-05-18 19:16:13 +02:00
Simon L.
1d947355ab Yaml updates (#8152) 2026-05-18 19:15:33 +02:00
Gaetano Giunta
fdfd479db7 aio-interface: make sure ublock does not break the log viewer (#8148) 2026-05-18 18:55:18 +02:00
gggeek
d4da301c9a improve the notice about minio deprecation in the readme of the community container
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-18 15:57:15 +00:00
gggeek
4c0b28f70d add warning notice to minio container that minio is not maintained any more
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-18 15:57:15 +00:00
gggeek
34429865fe add a comment to clarify the reason for the condition added in PR 8145
Signed-off-by: Gaetano Giunta <giunta.gaetano@gmail.com>
2026-05-18 15:56:22 +00:00
szaimen
aa115110d5 Yaml updates
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-18 13:28:25 +00:00
24 changed files with 187 additions and 96 deletions

20
.editorconfig Normal file
View File

@@ -0,0 +1,20 @@
# https://editorconfig.org
# Tip: to find files violating the rules set out here, run `docker run --rm --volume=$PWD:/check mstruebing/editorconfig-checker`
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.yaml]
indent_size = 2
[*.yml]
indent_size = 2

View File

@@ -10,6 +10,8 @@ on:
jobs:
release:
# Do not run this workflow on forked repositories, as they might not have the `gh-pages` branch created, or might
# want to use it for other purposes than publishing helm charts
if: github.repository == 'nextcloud/all-in-one'
runs-on: ubuntu-latest
steps:

View File

@@ -18,6 +18,30 @@ get_expiration_time() {
DURATION_HOUR=$((DURATION / 3600))
DURATION_READABLE=$(printf "%02d hours %02d minutes %02d seconds" $DURATION_HOUR $DURATION_MIN $DURATION_SEC)
}
# Run "borg info" and handle the exit code.
# If the exit code indicates a connection failure (80 = ConnectionClosed,
# 81 = ConnectionClosedWithHint) and a remote repo is configured, the SSH
# auth error signal file is created so the mastercontainer can show a
# targeted error message. Returns the original borg exit code.
borg_info() {
borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null
local _exit=$?
if [ -n "$BORG_REMOTE_REPO" ] && { [ "$_exit" -eq 80 ] || [ "$_exit" -eq 81 ]; }; then
touch "$SSH_AUTH_ERROR_FILE"
fi
return $_exit
}
# Signal file written when an SSH authentication failure is detected so the
# mastercontainer can show a targeted error without needing to scan container logs.
# Borg exit codes 80 (ConnectionClosed) and 81 (ConnectionClosedWithHint) indicate
# connection failures that occur before the Borg protocol is established, which covers
# SSH authentication errors and host-key verification failures.
# These codes are available because BORG_EXIT_CODES=modern is set in start.sh.
SSH_AUTH_ERROR_FILE="/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg_ssh_auth_error"
# Start with a clean state for every run
rm -f "$SSH_AUTH_ERROR_FILE"
# Test if all volumes aren't empty
VOLUME_DIRS="$(find /nextcloud_aio_volumes -mindepth 1 -maxdepth 1 -type d)"
@@ -127,7 +151,7 @@ if [ "$BORG_MODE" = backup ]; then
fi
# Initialize the repository if can't get info from target
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
if ! borg_info; then
# Don't initialize if already initialized
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
if [ -n "$BORG_REMOTE_REPO" ]; then
@@ -588,7 +612,7 @@ fi
# Do the backup test
if [ "$BORG_MODE" = test ]; then
if [ -n "$BORG_REMOTE_REPO" ]; then
if ! borg "$BORG_LOG_LEVEL_FLAG" info > /dev/null; then
if ! borg_info; then
echo "Borg could not get info from the remote repo."
echo "See the above borg info output for details."
exit 1

View File

@@ -29,6 +29,8 @@ else
fi
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
# Use specific exit codes (80/81 for connection failures) instead of the legacy generic exit code 2
export BORG_EXIT_CODES=modern
if [ -n "$BORG_REMOTE_REPO" ]; then
export BORG_REPO="$BORG_REMOTE_REPO"

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:latest
# Docker CLI is a requirement
FROM docker:29.5.0-cli AS docker
FROM docker:29.5.1-cli AS docker
ARG CADDY_REMOTE_HOST_HASH=e80a9931765a8dbcbb47db415863387f0df0e1b3

View File

@@ -54,7 +54,7 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=/session-deduplicator.sh
user=root
user=www-data
[program:domain-validator]
# Logging is disabled as otherwise all attempts will be logged which spams the logs

View File

@@ -1,4 +1,4 @@
<?php
$CONFIG = array (
'serverid' => crc32(gethostname()) % 512,
'serverid' => hexdec(hash('xxh32', gethostname()) & 0x1FF,
);

View File

@@ -42,6 +42,15 @@ if ! [ -f /var/www/html/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push ] &&
exit 1
fi
# Logic for ipv6 disabled servers
BIND="::"
if grep -q "1" /sys/module/ipv6/parameters/disable \
|| grep -q "1" /proc/sys/net/ipv6/conf/all/disable_ipv6 \
|| grep -q "1" /proc/sys/net/ipv6/conf/default/disable_ipv6; then
BIND="0.0.0.0"
fi
export BIND
echo "notify-push was started"

View File

@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:latest
FROM nats:2.14.0-scratch AS nats
FROM nats:2.14.1-scratch AS nats
FROM eturnal/eturnal:1.12.2-alpine AS eturnal
FROM strukturag/nextcloud-spreed-signaling:2.1.1 AS signaling
FROM alpine:3.23.4 AS janus

View File

@@ -1,19 +1,12 @@
# https://editorconfig.org
# note: the files in ./composer actually use 4 spaces instead of tabs
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[*.feature]
indent_size = 2
indent_style = space
[*.yml]
indent_size = 2
indent_style = space

View File

@@ -1,7 +1,10 @@
# AIO app for Nextcloud
This folder contains a Nextcloud app, which will be automatically installed within the Nextcloud instance.
It adds a link to the admin settings page that gives access to the AIO interface.
## How to develop the app?
Please note that in order to check if an app is already downloaded
Nextcloud will look for a folder with the same name as the app.
Please note that in order to check if an app is already downloaded Nextcloud will look for a folder with the same name as the app.
Therefore you need to add the app to one of the app directories
naming the directory `nextcloud-aio`.
Therefore you need to add the app to one of the app directories naming the directory `nextcloud-aio`.

View File

@@ -6,6 +6,8 @@ This container bundles Home Assistant and auto-configures it for you.
- After adding and starting the container, you can visit `http://ip.address.of.this.server:8123` in order to set up your Home Assistant instance.
- The data of Home Assistant will be automatically included in AIOs backup solution!
- In order to access your Home Assistant outside the local network, you have to set up your own reverse proxy. You can set up a reverse proxy following [these instructions](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md).
- And to allow the traffic from the reverse proxy to be accepted by Home Assistant, follow [these instructions](https://www.home-assistant.io/integrations/http/#reverse-proxies) from the Home Assistant documentation.
- Or, to use the Caddy with geoblocking community container, follow the following instruction to add your own Caddyfile, to use it for Home Assistant: https://github.com/nextcloud/all-in-one/tree/main/community-containers/caddy#notes
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack
### Repository

View File

@@ -1,6 +1,9 @@
## Minio
This container bundles minio s3 storage and auto-configures it for you.
> [!CAUTION]
> The Minio upstream project is no longer maintained. The container should still work in its current form...
>[!WARNING]
> Enabling this container will remove access to all the files formerly written to the data directory.
> So only enable this on a clean instance directly after installing AIO.

View File

@@ -46,7 +46,6 @@ services:
- APACHE_MAX_TIME=${NEXTCLOUD_MAX_TIME}
- NOTIFY_PUSH_HOST=nextcloud-aio-notify-push
- WHITEBOARD_HOST=nextcloud-aio-whiteboard
- HARP_HOST=nextcloud-aio-harp
volumes:
- nextcloud_aio_nextcloud:/var/www/html:ro
- nextcloud_aio_apache:/mnt/data:rw

73
php/composer.lock generated
View File

@@ -64,16 +64,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "7.10.0",
"version": "7.10.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4"
"reference": "aed36fd5fb4844f284252a999d9abf35d3a9a1ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/aed36fd5fb4844f284252a999d9abf35d3a9a1ae",
"reference": "aed36fd5fb4844f284252a999d9abf35d3a9a1ae",
"shasum": ""
},
"require": {
@@ -91,8 +91,9 @@
"bamarni/composer-bin-plugin": "^1.8.2",
"ext-curl": "*",
"guzzle/client-integration-tests": "3.0.2",
"guzzlehttp/test-server": "^0.3.2",
"php-http/message-factory": "^1.1",
"phpunit/phpunit": "^8.5.39 || ^9.6.20",
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"suggest": {
@@ -170,7 +171,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/7.10.0"
"source": "https://github.com/guzzle/guzzle/tree/7.10.2"
},
"funding": [
{
@@ -186,20 +187,20 @@
"type": "tidelift"
}
],
"time": "2025-08-23T22:36:01+00:00"
"time": "2026-05-20T11:58:52+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "2.3.0",
"version": "2.3.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "481557b130ef3790cf82b713667b43030dc9c957"
"reference": "d2d8dfae4757f384d630fdffc2d8d6618d8f4c5e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957",
"reference": "481557b130ef3790cf82b713667b43030dc9c957",
"url": "https://api.github.com/repos/guzzle/promises/zipball/d2d8dfae4757f384d630fdffc2d8d6618d8f4c5e",
"reference": "d2d8dfae4757f384d630fdffc2d8d6618d8f4c5e",
"shasum": ""
},
"require": {
@@ -207,7 +208,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^8.5.44 || ^9.6.25"
"phpunit/phpunit": "^8.5.52 || ^9.6.34"
},
"type": "library",
"extra": {
@@ -253,7 +254,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/2.3.0"
"source": "https://github.com/guzzle/promises/tree/2.3.1"
},
"funding": [
{
@@ -269,20 +270,20 @@
"type": "tidelift"
}
],
"time": "2025-08-22T14:34:08+00:00"
"time": "2026-05-19T18:30:48+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "2.9.0",
"version": "2.10.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884"
"reference": "73ab136360b5dfd858006eae9795e8fe43c80361"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/7d0ed42f28e42d61352a7a79de682e5e67fec884",
"reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/73ab136360b5dfd858006eae9795e8fe43c80361",
"reference": "73ab136360b5dfd858006eae9795e8fe43c80361",
"shasum": ""
},
"require": {
@@ -297,9 +298,9 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "0.9.0",
"http-interop/http-factory-tests": "1.1.0",
"jshttp/mime-db": "1.54.0.1",
"phpunit/phpunit": "^8.5.44 || ^9.6.25"
"phpunit/phpunit": "^8.5.52 || ^9.6.34"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
@@ -370,7 +371,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.9.0"
"source": "https://github.com/guzzle/psr7/tree/2.10.1"
},
"funding": [
{
@@ -386,7 +387,7 @@
"type": "tidelift"
}
],
"time": "2026-03-10T16:41:02+00:00"
"time": "2026-05-20T09:27:36+00:00"
},
{
"name": "http-interop/http-factory-guzzle",
@@ -1784,16 +1785,16 @@
},
{
"name": "twig/twig",
"version": "v3.25.0",
"version": "v3.26.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "0dade995be754556af4dcbf8721d45cb3271f9b4"
"reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/0dade995be754556af4dcbf8721d45cb3271f9b4",
"reference": "0dade995be754556af4dcbf8721d45cb3271f9b4",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/1fcae487b180d78e6351f4e0afa91f9eab96a2bc",
"reference": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc",
"shasum": ""
},
"require": {
@@ -1848,7 +1849,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.25.0"
"source": "https://github.com/twigphp/Twig/tree/v3.26.0"
},
"funding": [
{
@@ -1860,7 +1861,7 @@
"type": "tidelift"
}
],
"time": "2026-05-17T07:41:26+00:00"
"time": "2026-05-20T07:31:59+00:00"
}
],
"packages-dev": [
@@ -4898,16 +4899,16 @@
},
{
"name": "webmozart/assert",
"version": "2.3.0",
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "eb0d790f735ba6cff25c683a85a1da0eadeff9e4"
"reference": "9007ea6f45ecf352a9422b36644e4bfc039b9155"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/eb0d790f735ba6cff25c683a85a1da0eadeff9e4",
"reference": "eb0d790f735ba6cff25c683a85a1da0eadeff9e4",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/9007ea6f45ecf352a9422b36644e4bfc039b9155",
"reference": "9007ea6f45ecf352a9422b36644e4bfc039b9155",
"shasum": ""
},
"require": {
@@ -4923,7 +4924,11 @@
},
"type": "library",
"extra": {
"psalm": {
"pluginClass": "Webmozart\\Assert\\PsalmPlugin"
},
"branch-alias": {
"dev-master": "2.0-dev",
"dev-feature/2-0": "2.0-dev"
}
},
@@ -4954,9 +4959,9 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/2.3.0"
"source": "https://github.com/webmozarts/assert/tree/2.4.0"
},
"time": "2026-04-11T10:33:05+00:00"
"time": "2026-05-20T13:07:01+00:00"
}
],
"aliases": [],

View File

@@ -1,29 +1,29 @@
<?xml version="1.0"?>
<psalm
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="templates"/>
<directory name="src"/>
<file name="public/index.php"/>
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<extraFiles>
<directory name="vendor" />
</extraFiles>
<issueHandlers>
<ClassMustBeFinal errorLevel="suppress" />
<projectFiles>
<directory name="templates"/>
<directory name="src"/>
<file name="public/index.php"/>
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<extraFiles>
<directory name="vendor" />
</extraFiles>
<issueHandlers>
<ClassMustBeFinal errorLevel="suppress" />
<MissingConstructor>
<errorLevel type="suppress">
<file name="src/Data/ConfigurationManager.php" /> <!-- We're using property hooks with virtual properties in that file, which Psalm wrongly complains about. See <https://github.com/vimeo/psalm/issues/11435>. -->
</errorLevel>
</MissingConstructor>
</issueHandlers>
</issueHandlers>
</psalm>

View File

@@ -143,6 +143,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
'has_backup_run_once' => $configurationManager->hasBackupRunOnce(),
'is_backup_container_running' => $dockerActionManager->isBackupContainerRunning(),
'backup_exit_code' => $dockerActionManager->GetBackupcontainerExitCode(),
'is_ssh_auth_error' => $dockerActionManager->isBorgBackupSshAuthError(),
'is_instance_restore_attempt' => $configurationManager->instanceRestoreAttempt,
'borg_backup_mode' => $configurationManager->backupMode,
'was_start_button_clicked' => $configurationManager->wasStartButtonClicked,

View File

@@ -68,6 +68,10 @@ class DataConst {
return (string)realpath(__DIR__ . '/../../containers.json');
}
public static function GetBorgSshAuthErrorFile() : string {
return self::GetDataDirectory() . '/borg_ssh_auth_error';
}
public static function GetAioVersionFile() : string {
return (string)realpath(__DIR__ . '/../../templates/includes/aio-version.twig');
}

View File

@@ -916,6 +916,10 @@ readonly class DockerActionManager {
}
}
public function isBorgBackupSshAuthError(): bool {
return file_exists(DataConst::GetBorgSshAuthErrorFile());
}
public function GetBackupcontainerExitCode(): int {
$containerName = 'nextcloud-aio-borgbackup';
$url = $this->BuildApiUrl(sprintf('containers/%s/json', urlencode($containerName)));

View File

@@ -191,10 +191,17 @@
{% if not hasBackupLocation or borg_backup_mode not in ['test', 'check', ''] or backup_exit_code > 0 %}
{% if borg_remote_repo and backup_exit_code > 0 %}
<p>
You may still need to authorize this pubkey on your borg remote:<br><strong>{{ borg_public_key }}</strong><br>
To try again, resubmit your location and rerun the test.
</p>
{% if is_ssh_auth_error %}
<p>
⚠️ <strong>SSH key not authorized on the remote server.</strong> You must add the following SSH public key to the <code>authorized_keys</code> file on your remote backup server before the restore test can succeed:<br><br><strong>{{ borg_public_key }}</strong><br><br>
Once you have added the key on the remote server, resubmit your location and rerun the test.
</p>
{% else %}
<p>
You may still need to authorize this pubkey on your borg remote:<br><strong>{{ borg_public_key }}</strong><br>
To try again, resubmit your location and rerun the test.
</p>
{% endif %}
{% endif %}
<p>
@@ -420,21 +427,28 @@
{% if has_backup_run_once == false %}
<p>The initial backup was not successful.</p>
{% if borg_remote_repo %}
<p>
You may still need to authorize this pubkey on your borg remote:<br><strong>{{ borg_public_key }}</strong><br>
To try again, click <strong>Create backup</strong>.
</p>
{% if borg_remote_repo and is_ssh_auth_error %}
<p>
⚠️ <strong>SSH key not authorized on the remote server.</strong> You must add the following SSH public key to the <code>authorized_keys</code> file on your remote backup server before the backup can succeed:<br><br><strong>{{ borg_public_key }}</strong><br><br>
Once you have added the key on the remote server, click <strong>Create backup</strong> to try again.
</p>
{% else %}
<p>
You may want to reset the backup location which allows you to enter a new one afterwards.
</p>
<p>
If the configured backup host location <strong>{{ borg_backup_host_location }}</strong>
{% if borg_remote_repo %}
or the remote repo <strong>{{ borg_remote_repo }}</strong>
{% endif %}
is wrong or if you want to reset the backup location due to other reasons, you can do so by clicking on the button below.
</p>
<form method="POST" action="api/docker/backup-reset-location" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" value="Reset backup location" data-confirm='Are you sure that you want to reset the backup location?' />
</form>
{% endif %}
<p>You may change the backup path again since the initial backup was not successful. After submitting the new value, you need to click on <strong>Create Backup</strong> to test the new value.</p>
<form method="POST" action="api/configuration" class="xhr">
<label>Local backup location</label> <input type="text" name="borg_backup_host_location" placeholder="/mnt/backup"/><br>
<label>Remote borg repo</label> <input type="text" name="borg_remote_repo" placeholder="ssh://user@host:port/path/to/repo"/><br>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" value="Set backup location again" />
</form>
{% endif %}
{% elseif backup_exit_code == 0 %}
{% if borg_backup_mode == "backup" %}

View File

@@ -1,9 +1,11 @@
<html lang="en">
<head>
<title>AIO</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="logs.css">
<script src="log-view.js?v1"></script>
<link rel="icon" href="img/favicon.png">
<script src="log-load.js?v1"></script>
</head>
<body data-container-id="{{ id }}">
<div id="floating-box">

View File

@@ -23,8 +23,10 @@
- [ ] Both a local backup location and a remote repo URL should not be accepted at the same time
- [ ] The page should now reload
- [ ] Now click on `Create backup`
- [ ] After the first failed backup attempt with a remote repo, the SSH public key for borg should be shown so it can be authorized on the remote server
- [ ] After authorizing the server on the remote, scroll down and click on `Create backup` again to create another backup. This time it should succeed.
- [ ] After the first failed backup attempt with a remote repo, the page should show **"The initial backup was not successful."** and one of two things depending on why it failed:
- [ ] **SSH auth error** (exit codes 80/81 connection closed before Borg protocol established): a prominent ⚠️ **"SSH key not authorized on the remote server."** warning should appear with the public key displayed. After adding the key to `~/.ssh/authorized_keys` on the remote server, click **Create backup** again to retry.
- [ ] **Other error** (wrong path, unreachable host, etc.): instead of the ⚠️ warning, a **"Reset backup location"** button should appear (with a confirmation prompt) that allows resetting the configured location so a new one can be entered. Note: there are no longer inline text inputs to re-enter the location at this point.
- [ ] After authorizing the SSH key on the remote, scroll down and click on `Create backup` again to create another backup. This time it should succeed.
- [ ] The initial Nextcloud credentials on top of the page that are visible when the containers are running should now be hidden in a details tag
- [ ] After a while and a few automatic reloads (as long as the side is focused), you should be redirected to the usual page and seen in the Backup and restore section that the last backup was successful.
- [ ] Below that you should see a details tag that allows to reveal all backup options

View File

@@ -22,7 +22,9 @@ For the below to work, you need a backup archive of an AIO instance and the loca
- [ ] Enter an invalid remote repo URL (e.g. `user` without `@` and `:`) which should send an error
- [ ] Enter a valid remote borg repo URL and the correct backup password:
- [ ] Should reload and should hide all options except the option to test the path and password
- [ ] After the first failed connection attempt, the SSH public key for borg should be shown so it can be authorized on the remote server
- [ ] After the first failed connection attempt, the behavior depends on the failure reason:
- [ ] **SSH auth error** (exit codes 80/81 connection closed before Borg protocol established): a prominent ⚠️ **"SSH key not authorized on the remote server."** warning should appear with the SSH public key displayed and instructions to add it to `~/.ssh/authorized_keys` on the remote server. After adding the key, scroll down and click on the test button again.
- [ ] **Other error** (wrong path, unreachable host, etc.): a generic message should appear noting the public key that may still need to be authorized on the remote.
- [ ] After authorizing the key on the remote server, scroll down and click on the test button again. This time it should succeed and show the options to check the integrity and list backup archives
- [ ] After the test you should see the options to check the integrity of the backup and a list of backup archives that you can choose from to restore your instance
- [ ] Clicking on either option should show a window prompt that lets you cancel the operation