Homey Self-Hosted Server with Docker on Linux | Megathread

I have bought a mini PC and installed Ubuntu and Docker to run Homey SHS. I have one major problem: if I follow the instructions on https://support.homey.app/hc/en-us/articles/24010537261980-How-to-install-Homey-Self-Hosted-Server-with-Docker-on-Linux But with network_mode: host, I dont get a port. I see my container in Docker, with no port(s) so it won’t work. If I remove and force the port with something like this:
–name homey-shs
–restart=always
-p 4859:4859
-p 4860:4860

My Homey SHS works and I can add the IP / setup the android app and there’s a lot that works: adding Hue lights, installing apps and importing devices etc. There are als some things that will not work: adding the Homey Bridge or finding Google Cast (Chromecasts, Nest Hubs) devices for example… I cannot get it working with network_mode: host and not everything works without network_mode: host. It’s driving me crazy! Anyone has idea’s? Would be apprenticed!

Is it possible to test the alternative
https://support.homey.app/hc/en-us/articles/23975096785948-How-to-install-Homey-Self-Hosted-Server-on-Linux

I used it on a Debian host, and HSHS ran w/o network issues.

Hi thanks for your reply. But this is basically the same right? Both use Docker, one with a yaml/docker compose and one directly. But I have the same issue regarding network_mode: host

I run SHS on a Lenovo SFF, Ubunutu server 24.0.4 LTS

My compose file:

services:
  homey-shs:
    image: ghcr.io/athombv/homey-shs:latest
    container_name: homey-shs
    restart: unless-stopped
    network_mode: host
    privileged: true
    volumes:
      - ~/.homey-shs:/homey/user

uname -a
Linux homey-shs 6.17.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 9 17:01:16 UTC 2026 x86_64 GNU/Linux

Docker version 29.3.0

Are there any hints in th elog output when the container starts up? (docker run without the -d will spew it all to the terminal screen). Also logs are in the .homey-shs directory.

Not sure what you mean exactly, but you can view the logs by executing this command (in a second terminal):

$ docker compose -f homey-shs.yml logs --follow

As per KB article https://support.homey.app/hc/en-us/articles/24010537261980-How-to-install-Homey-Self-Hosted-Server-with-Docker-on-Linux

No sure what you mean either.

To verify if docker container is running as expected i usually use docker ps. It will show each docker container status (and some other details).

To get docker logs from a container docker logs <container name>.

yes, better choices to use ‘docker logs’ if the container is already running. (–follow is aslo a good option to keep watching) But that only show recent stuff.

The full log file is actually also visible in ~/.home-shs/logs if you want to root around finding specific things.

True, but it shows everything from the start on when I start that “follow” command prior to the container start.

I have a similar issue. From my HPE 2019 I can’t reach SHS by using Homesh controller APP on my HPE2019. Viceversa it is working fine: from my SHS i can reach HPE2019 by using Homesh controller APP on my SHS. Did you have any suggestion?

The error that rises on my HPE2019 side is “connect ECONNREFUSED :80”, it happens when I try to connect to the Homesh Satellite APP on SHS.

Please could anyone help me?

I’d first try the HomeyLink app instead.

Otherwise, you probably have to change the default port temporary from 4859 to 80 to see if it connects;
Make sure there’s no other local web server running on port 80.

Hi,
SHS in Docker on TerraMaster F2-223 (TOS 7, Docker Manager): every app crashes immediately on start.

Error from container logs:

CreateClientError: ManagerDrivers.getDrivers is not a function

at SDK.createClient (/app/packages/homey-local/lib/AppProcess/…)

Homey [err][ManagerAppsLocal] Error Starting: App Crashed

Exit Code: 1

SHS itself is healthy — discovery, login, app store browsing all work, trial active. Only the app spawn step fails.

Already tried, none resolved it: restart, rebuild, fresh image pull, full nuclear reinstall (deleted project + image + volume + Athom account instance), HOMEY_LOCAL_ADDRESS env var

Anyone seen this ManagerDrivers.getDrivers error

Hi All,
Just tried to follow the install in docker on Ubuntu.
I think it is running as I get the blurb that says it is…

However the Android App says it has “1 Self Hosted Server found…” at the correct IP address but then timer whirrs and nothing happens. With manual I get “unable to connect to your Self Hosted Server”.

EDIT - I had started my thread and then realised it was a firewall blocking the port 4859 and 4860.
I will still post it if this is useful to other newbies.

Dave

If it matters - Server HP box 16Gb RAM, a few Tb of disc space, Ubuntu Server 24.04.4 LTS

A backup-and-update script that runs flawlessly.
It’s not usable as-is, because it assumes specific mount points and directory layouts.

#!/usr/bin/env bash
# sudo ./backUpdate_Pi5_SHS.sh
set -Eeuo pipefail


###############################################################################
# CONFIGURATION
###############################################################################


DATE="$(date +%Y%m%d-%H%M%S)"


MOUNT="/mnt/pi5-T7B"
BACKUP_DIR="$MOUNT/Backup4/Pi5_Backup"
INFO_DIR="$BACKUP_DIR/Backup_INFO"
KEEP=31
LOG="/var/log/backup-pi5-opi.log"


USER_NAME="YOUR_USERNAME"
USER_HOME="/home/$USER_NAME"


HOMEY_CONTAINER="homey-shs"
HOMEY_IMAGE="ghcr.io/athombv/homey-shs"
HOMEY_DATA="$USER_HOME/.homey-shs"


DOCKER_DIR="$USER_HOME/homey-shs"
SCRIPTS_DIR="$USER_HOME/scripts"
COMPOSE_DIR="$USER_HOME/homey-shs"


###############################################################################
# LOGGING
###############################################################################


sudo mkdir -p "$(dirname "$LOG")"
sudo touch "$LOG"
sudo chmod 600 "$LOG"


exec > >(tee -a "$LOG") 2>&1


log() {
    printf '%s - %s\n' "$(date '+%Y-%m-%d %H:%M:%S')" "$*"
}


step() {
    printf '\n[%s] STEP %s/9 - %s\n' "$(date '+%H:%M:%S')" "$1" "$2"
}


fail() {
    log "ERROR: $*"
    exit 1
}


###############################################################################
# RESTART CONTAINERS ON EXIT OR ERROR
###############################################################################


HOMEY_WAS_RUNNING=0


restore_containers() {
    local rc=$?


    log "Running cleanup..."


    if [[ "$HOMEY_WAS_RUNNING" == 1 ]]; then
        if docker start "$HOMEY_CONTAINER" >/dev/null 2>&1; then
            log "Homey SHS restarted"
        else
            log "WARNING: Homey SHS could not be restarted"
        fi
    fi


    if [[ "$rc" -eq 0 ]]; then
        log "=== MAINTENANCE COMPLETE ==="
    else
        log "Maintenance terminated with error code $rc"
    fi


    exit "$rc"
}


trap restore_containers EXIT


###############################################################################
# STARTUP CHECKS
###############################################################################


step 1 "Startup checks"
log "=== MAINTENANCE START ==="


mountpoint -q "$MOUNT" || fail "$MOUNT is not mounted"
sudo mkdir -p "$BACKUP_DIR" "$INFO_DIR"
command -v docker >/dev/null 2>&1 || fail "docker is not available"
[[ -d "$HOMEY_DATA" ]] || fail "Homey SHS directory does not exist: $HOMEY_DATA"


###############################################################################
# COLLECT OPTIONAL DIRECTORIES
###############################################################################


step 2 "Collect optional directories"


OPTIONAL_PATHS=()


for path in "$DOCKER_DIR" "$SCRIPTS_DIR" "$COMPOSE_DIR"; do
    if [[ -d "$path" ]]; then
        if [[ ! " ${OPTIONAL_PATHS[*]} " =~ " ${path} " ]]; then
            OPTIONAL_PATHS+=("$path")
        fi
        log "Optional directory found: $path"
    else
        log "Optional directory skipped: $path"
    fi
done


###############################################################################
# PRESERVE ORIGINAL CONTAINER STATUS
###############################################################################


step 3 "Preserve container status"


if docker inspect "$HOMEY_CONTAINER" >/dev/null 2>&1; then
    if [[ "$(docker inspect -f '{{.State.Running}}' "$HOMEY_CONTAINER")" == "true" ]]; then
        HOMEY_WAS_RUNNING=1
    fi
else
    log "WARNING: container does not exist: $HOMEY_CONTAINER"
fi


###############################################################################
# BACK UP SYSTEM CONFIGURATION
###############################################################################


step 4 "Back up system configuration"


sudo tar \
    --ignore-failed-read \
    --xattrs \
    --acls \
    --numeric-owner \
    -czf "$BACKUP_DIR/system-$DATE.tar.gz" \
    -C / \
    etc \
    boot \
    -C "$USER_HOME" \
    .ssh \
    .config


log "System configuration saved"


###############################################################################
# SAVE SYSTEM INFORMATION AS TXT
###############################################################################


step 5 "Save system information"


{
    echo "=== DATE ==="
    date


    echo
    echo "=== HOSTNAME ==="
    hostnamectl 2>/dev/null || hostname


    echo
    echo "=== KERNEL ==="
    uname -a


    echo
    echo "=== OS ==="
    cat /etc/os-release


    echo
    echo "=== DISKS ==="
    lsblk -f


    echo
    echo "=== MOUNTS ==="
    findmnt


    echo
    echo "=== NETWORK ==="
    ip addr
    ip route


    echo
    echo "=== WIFI ==="
    iw dev 2>/dev/null || true
    nmcli device status 2>/dev/null || true
    nmcli connection show 2>/dev/null || true


    echo
    echo "=== ENABLED SERVICES ==="
    systemctl list-unit-files --state=enabled 2>/dev/null || true


    echo
    echo "=== ROOT CRONTAB ==="
    crontab -l 2>/dev/null || true


    echo
    echo "=== USER CRONTAB: $USER_NAME ==="
    sudo -u "$USER_NAME" crontab -l 2>/dev/null || true
} | sudo tee "$INFO_DIR/system-info-$DATE.txt" >/dev/null


sudo chmod 644 "$INFO_DIR/system-info-$DATE.txt" 2>/dev/null || true


###############################################################################
# DOCKER INFORMATION IN Backup_INFO
###############################################################################


step 6 "Save Docker information"


docker ps -a | sudo tee "$INFO_DIR/docker-containers-$DATE.txt" >/dev/null
docker image ls --no-trunc | sudo tee "$INFO_DIR/docker-images-$DATE.txt" >/dev/null
docker volume ls | sudo tee "$INFO_DIR/docker-volumes-$DATE.txt" >/dev/null
docker network ls | sudo tee "$INFO_DIR/docker-networks-$DATE.txt" >/dev/null


docker inspect \
    "$HOMEY_CONTAINER" \
    2>/dev/null \
    | sudo tee "$INFO_DIR/docker-inspect-$DATE.json" >/dev/null || true


sudo chmod 644 "$INFO_DIR/docker-containers-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-images-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-volumes-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-networks-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-inspect-$DATE.json" 2>/dev/null || true


###############################################################################
# STOP HOMEY SHS
###############################################################################


step 7 "Stop Homey SHS for backup and update"


if [[ "$HOMEY_WAS_RUNNING" == 1 ]]; then
    log "Stopping Homey SHS..."
    docker stop "$HOMEY_CONTAINER" >/dev/null 2>&1 || true
fi


###############################################################################
# HOMEY SHS BACKUP AND UPDATE
###############################################################################


step 8 "Back up and update Homey SHS"


sudo tar \
    --xattrs \
    --acls \
    --numeric-owner \
    -czf "$BACKUP_DIR/homey-shs-$DATE.tar.gz" \
    -C "$(dirname "$HOMEY_DATA")" \
    "$(basename "$HOMEY_DATA")"


log "Homey SHS backup saved"


log "Fetching new image..."
docker pull "$HOMEY_IMAGE"


log "Removing container if present..."
docker rm "$HOMEY_CONTAINER" >/dev/null 2>&1 || true


log "Starting new container..."
docker run \
  --name "$HOMEY_CONTAINER" \
  --network host \
  --privileged \
  --detach \
  --restart unless-stopped \
  --volume "$HOMEY_DATA":/homey/user/ \
  "$HOMEY_IMAGE"


sleep 5


if docker ps --format '{{.Names}}' | grep -qx "$HOMEY_CONTAINER"; then
    log "Homey SHS running again"
else
    fail "Homey SHS does not appear to have started correctly"
fi


###############################################################################
# CREATE AUTOMATION ARCHIVE
###############################################################################


step 9 "Create automation archive"


if [[ "${#OPTIONAL_PATHS[@]}" -gt 0 ]]; then
    TAR_ARGS=()


    for path in "${OPTIONAL_PATHS[@]}"; do
        TAR_ARGS+=(
            -C
            "$(dirname "$path")"
            "$(basename "$path")"
        )
    done


    log "Automation sources: ${OPTIONAL_PATHS[*]}"


    sudo tar \
        --ignore-failed-read \
        --xattrs \
        --acls \
        --numeric-owner \
        -czf "$BACKUP_DIR/automation-files-$DATE.tar.gz" \
        "${TAR_ARGS[@]}"


    log "Archive OK: automation-files-$DATE.tar.gz"
else
    log "No optional directories found; skipping automation-files archive"
fi


###############################################################################
# VERIFY AND CLEAN UP ARCHIVES
###############################################################################


log "Checking backup files..."


REQUIRED_ARCHIVES=(
    "$BACKUP_DIR/system-$DATE.tar.gz"
    "$BACKUP_DIR/homey-shs-$DATE.tar.gz"
)


for archive in "${REQUIRED_ARCHIVES[@]}"; do
    [[ -s "$archive" ]] || fail "Empty or missing archive: $archive"


    if tar -tzf "$archive" >/dev/null 2>&1; then
        log "Archive OK: $(basename "$archive")"
    else
        fail "Invalid tar archive: $archive"
    fi
done


if [[ -f "$BACKUP_DIR/automation-files-$DATE.tar.gz" ]]; then
    tar -tzf "$BACKUP_DIR/automation-files-$DATE.tar.gz" >/dev/null \
        || fail "Invalid automation archive"
fi


log "Cleaning up old tar.gz backups..."


cleanup_category() {
    local pattern="$1"
    local directory="$2"


    mapfile -t OLD_FILES < <(
        find "$directory" \
            -maxdepth 1 \
            -type f \
            -name "$pattern" \
            -printf '%T@ %p\n' |
        sort -rn |
        tail -n +$((KEEP + 1)) |
        cut -d' ' -f2-
    )


    for file in "${OLD_FILES[@]}"; do
        [[ -f "$file" ]] || continue
        rm -f -- "$file"
        log "Deleted: $file"
    done
}


cleanup_category "system-*.tar.gz" "$BACKUP_DIR"
cleanup_category "homey-shs-*.tar.gz" "$BACKUP_DIR"
cleanup_category "automation-files-*.tar.gz" "$BACKUP_DIR"
cleanup_category "*.txt" "$INFO_DIR"
cleanup_category "*.json" "$INFO_DIR"


log "Backup + update completed successfully"

there is still some Dutch comment in the version above, translation below:

#!/usr/bin/env bash
# sudo ./backUpdate_Pi5_SHS_EN.sh
set -Eeuo pipefail


###############################################################################
# CONFIGURATION
###############################################################################


DATE="$(date +%Y%m%d-%H%M%S)"


MOUNT="/mnt/pi5-T7B"
BACKUP_DIR="$MOUNT/Backup4/Pi5_Backup"
INFO_DIR="$BACKUP_DIR/Backup_INFO"
KEEP=31
LOG="/var/log/backup-pi5-opi.log"


USER_NAME="YOUR_USERNAME"
USER_HOME="/home/$USER_NAME"


HOMEY_CONTAINER="homey-shs"
HOMEY_IMAGE="ghcr.io/athombv/homey-shs"
HOMEY_DATA="$USER_HOME/.homey-shs"


DOCKER_DIR="$USER_HOME/homey-shs"
SCRIPTS_DIR="$USER_HOME/scripts"
COMPOSE_DIR="$USER_HOME/homey-shs"


###############################################################################
# LOGGING
###############################################################################


sudo mkdir -p "$(dirname "$LOG")"
sudo touch "$LOG"
sudo chmod 600 "$LOG"


exec > >(tee -a "$LOG") 2>&1


log() {
    printf '%s - %s\n' "$(date '+%Y-%m-%d %H:%M:%S')" "$*"
}


step() {
    printf '\n[%s] STEP %s/9 - %s\n' "$(date '+%H:%M:%S')" "$1" "$2"
}


fail() {
    log "ERROR: $*"
    exit 1
}


###############################################################################
# RESTART CONTAINERS ON EXIT OR ERROR
###############################################################################


HOMEY_WAS_RUNNING=0


restore_containers() {
    local rc=$?


    log "Running cleanup..."


    if [[ "$HOMEY_WAS_RUNNING" == 1 ]]; then
        if docker start "$HOMEY_CONTAINER" >/dev/null 2>&1; then
            log "Homey SHS restarted"
        else
            log "WARNING: Homey SHS could not be restarted"
        fi
    fi


    if [[ "$rc" -eq 0 ]]; then
        log "=== MAINTENANCE COMPLETE ==="
    else
        log "Maintenance terminated with error code $rc"
    fi


    exit "$rc"
}


trap restore_containers EXIT


###############################################################################
# STARTUP CHECKS
###############################################################################


step 1 "Startup checks"
log "=== MAINTENANCE START ==="


mountpoint -q "$MOUNT" || fail "$MOUNT is not mounted"
sudo mkdir -p "$BACKUP_DIR" "$INFO_DIR"
command -v docker >/dev/null 2>&1 || fail "docker is not available"
[[ -d "$HOMEY_DATA" ]] || fail "Homey SHS directory does not exist: $HOMEY_DATA"


###############################################################################
# COLLECT OPTIONAL DIRECTORIES
###############################################################################


step 2 "Collect optional directories"


OPTIONAL_PATHS=()


for path in "$DOCKER_DIR" "$SCRIPTS_DIR" "$COMPOSE_DIR"; do
    if [[ -d "$path" ]]; then
        if [[ ! " ${OPTIONAL_PATHS[*]} " =~ " ${path} " ]]; then
            OPTIONAL_PATHS+=("$path")
        fi
        log "Optional directory found: $path"
    else
        log "Optional directory skipped: $path"
    fi
done


###############################################################################
# PRESERVE ORIGINAL CONTAINER STATUS
###############################################################################


step 3 "Preserve container status"


if docker inspect "$HOMEY_CONTAINER" >/dev/null 2>&1; then
    if [[ "$(docker inspect -f '{{.State.Running}}' "$HOMEY_CONTAINER")" == "true" ]]; then
        HOMEY_WAS_RUNNING=1
    fi
else
    log "WARNING: container does not exist: $HOMEY_CONTAINER"
fi


###############################################################################
# BACK UP SYSTEM CONFIGURATION
###############################################################################


step 4 "Back up system configuration"


sudo tar \
    --ignore-failed-read \
    --xattrs \
    --acls \
    --numeric-owner \
    -czf "$BACKUP_DIR/system-$DATE.tar.gz" \
    -C / \
    etc \
    boot \
    -C "$USER_HOME" \
    .ssh \
    .config


log "System configuration saved"


###############################################################################
# SAVE SYSTEM INFORMATION AS TXT
###############################################################################


step 5 "Save system information"


{
    echo "=== DATE ==="
    date


    echo
    echo "=== HOSTNAME ==="
    hostnamectl 2>/dev/null || hostname


    echo
    echo "=== KERNEL ==="
    uname -a


    echo
    echo "=== OS ==="
    cat /etc/os-release


    echo
    echo "=== DISKS ==="
    lsblk -f


    echo
    echo "=== MOUNTS ==="
    findmnt


    echo
    echo "=== NETWORK ==="
    ip addr
    ip route


    echo
    echo "=== WIFI ==="
    iw dev 2>/dev/null || true
    nmcli device status 2>/dev/null || true
    nmcli connection show 2>/dev/null || true


    echo
    echo "=== ENABLED SERVICES ==="
    systemctl list-unit-files --state=enabled 2>/dev/null || true


    echo
    echo "=== ROOT CRONTAB ==="
    crontab -l 2>/dev/null || true


    echo
    echo "=== USER CRONTAB: $USER_NAME ==="
    sudo -u "$USER_NAME" crontab -l 2>/dev/null || true
} | sudo tee "$INFO_DIR/system-info-$DATE.txt" >/dev/null


sudo chmod 644 "$INFO_DIR/system-info-$DATE.txt" 2>/dev/null || true


###############################################################################
# DOCKER INFORMATION IN Backup_INFO
###############################################################################


step 6 "Save Docker information"


docker ps -a | sudo tee "$INFO_DIR/docker-containers-$DATE.txt" >/dev/null
docker image ls --no-trunc | sudo tee "$INFO_DIR/docker-images-$DATE.txt" >/dev/null
docker volume ls | sudo tee "$INFO_DIR/docker-volumes-$DATE.txt" >/dev/null
docker network ls | sudo tee "$INFO_DIR/docker-networks-$DATE.txt" >/dev/null


docker inspect \
    "$HOMEY_CONTAINER" \
    2>/dev/null \
    | sudo tee "$INFO_DIR/docker-inspect-$DATE.json" >/dev/null || true


sudo chmod 644 "$INFO_DIR/docker-containers-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-images-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-volumes-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-networks-$DATE.txt" 2>/dev/null || true
sudo chmod 644 "$INFO_DIR/docker-inspect-$DATE.json" 2>/dev/null || true


###############################################################################
# STOP HOMEY SHS
###############################################################################


step 7 "Stop Homey SHS for backup and update"


if [[ "$HOMEY_WAS_RUNNING" == 1 ]]; then
    log "Stopping Homey SHS..."
    docker stop "$HOMEY_CONTAINER" >/dev/null 2>&1 || true
fi


###############################################################################
# HOMEY SHS BACKUP AND UPDATE
###############################################################################


step 8 "Back up and update Homey SHS"


sudo tar \
    --xattrs \
    --acls \
    --numeric-owner \
    -czf "$BACKUP_DIR/homey-shs-$DATE.tar.gz" \
    -C "$(dirname "$HOMEY_DATA")" \
    "$(basename "$HOMEY_DATA")"


log "Homey SHS backup saved"


log "Fetching new image..."
docker pull "$HOMEY_IMAGE"


log "Removing container if present..."
docker rm "$HOMEY_CONTAINER" >/dev/null 2>&1 || true


log "Starting new container..."
docker run \
  --name "$HOMEY_CONTAINER" \
  --network host \
  --privileged \
  --detach \
  --restart unless-stopped \
  --volume "$HOMEY_DATA":/homey/user/ \
  "$HOMEY_IMAGE"


sleep 5


if docker ps --format '{{.Names}}' | grep -qx "$HOMEY_CONTAINER"; then
    log "Homey SHS running again"
else
    fail "Homey SHS does not appear to have started correctly"
fi


###############################################################################
# CREATE AUTOMATION ARCHIVE
###############################################################################


step 9 "Create automation archive"


if [[ "${#OPTIONAL_PATHS[@]}" -gt 0 ]]; then
    TAR_ARGS=()


    for path in "${OPTIONAL_PATHS[@]}"; do
        TAR_ARGS+=(
            -C
            "$(dirname "$path")"
            "$(basename "$path")"
        )
    done


    log "Automation sources: ${OPTIONAL_PATHS[*]}"


    sudo tar \
        --ignore-failed-read \
        --xattrs \
        --acls \
        --numeric-owner \
        -czf "$BACKUP_DIR/automation-files-$DATE.tar.gz" \
        "${TAR_ARGS[@]}"


    log "Archive OK: automation-files-$DATE.tar.gz"
else
    log "No optional directories found; skipping automation-files archive"
fi


###############################################################################
# VERIFY AND CLEAN UP ARCHIVES
###############################################################################


log "Checking backup files..."


REQUIRED_ARCHIVES=(
    "$BACKUP_DIR/system-$DATE.tar.gz"
    "$BACKUP_DIR/homey-shs-$DATE.tar.gz"
)


for archive in "${REQUIRED_ARCHIVES[@]}"; do
    [[ -s "$archive" ]] || fail "Empty or missing archive: $archive"


    if tar -tzf "$archive" >/dev/null 2>&1; then
        log "Archive OK: $(basename "$archive")"
    else
        fail "Invalid tar archive: $archive"
    fi
done


if [[ -f "$BACKUP_DIR/automation-files-$DATE.tar.gz" ]]; then
    tar -tzf "$BACKUP_DIR/automation-files-$DATE.tar.gz" >/dev/null \
        || fail "Invalid automation archive"
fi


log "Cleaning up old tar.gz backups..."


cleanup_category() {
    local pattern="$1"
    local directory="$2"


    mapfile -t OLD_FILES < <(
        find "$directory" \
            -maxdepth 1 \
            -type f \
            -name "$pattern" \
            -printf '%T@ %p\n' |
        sort -rn |
        tail -n +$((KEEP + 1)) |
        cut -d' ' -f2-
    )


    for file in "${OLD_FILES[@]}"; do
        [[ -f "$file" ]] || continue
        rm -f -- "$file"
        log "Deleted: $file"
    done
}


cleanup_category "system-*.tar.gz" "$BACKUP_DIR"
cleanup_category "homey-shs-*.tar.gz" "$BACKUP_DIR"
cleanup_category "automation-files-*.tar.gz" "$BACKUP_DIR"
cleanup_category "*.txt" "$INFO_DIR"
cleanup_category "*.json" "$INFO_DIR"


log "Backup + update completed successfully"

I have the docker container installed and connected to the Android app. When I open the interface from a browser on Windows, my credentials are not accepted?

First create a local account.
Please search for howto @ support.homey.app

I tried but the Android client does not accept a second login. And the admin account cannot be promoted to also be a local account. Do I need a 2nd Android device to be able to create a new account?

Please read this kb article. You’ll need to use my.homey.app

I don’t have a Homey Pro. I have a selfhosted docker server and an android app that connects to it. But in the app I can’t grant users local access. The interface is not the same. I also can’t add another user because the app doesnot allow a 2nd user using the app on Android.

OK, you somehow can’t, or just don’t, want to read info aimed for SHS (and yes, it’s also applicable to Homey Pro).
A detail from the article I linked to, and as screenshotted as well:

I’m out.