Layers

Self-hosted · for IT and security

Security memo

Every statement below was checked on 15 November 2026 on a clean Ubuntu 22.04 machine (2 CPU cores, 4 GB) with Layers 3.0.1 installed by the command from the licence email. Each one comes with a command so your team can check it on your server. Where we did not check something, we say so.

The administrator panel password

Since 15.11.2026 the installer sets a random password for the administrator panel (God Mode, /godmode) in /opt/layers/.env (ADMIN_PASSWORD, mode 600). Servers installed earlier accept admin / admin: run the install command from the email again, or the command below. Checked on a clean machine: afterwards admin / admin gets 401, also after a restart; running it again changes nothing.

cd /opt/layers && P=$(openssl rand -hex 16) && T=$(sudo docker compose exec -T layers wget -qO- --post-data "username=admin&password=admin&bearer=true" http://localhost:8080/data/auth/admin/login | sed -n 's/.*"token":"\([^"]*\)".*/\1/p') && [ -n "$T" ] && sudo docker compose exec -T layers wget -qO- --header "Authorization: Bearer $T" --header "Content-Type: application/json" --post-data "{\"current\":\"admin\",\"next\":\"$P\"}" http://localhost:8080/data/auth/admin/password >/dev/null && echo "ADMIN_PASSWORD=$P" | sudo tee -a .env >/dev/null && echo "Done: God Mode password is in /opt/layers/.env (ADMIN_PASSWORD)"

Check

cd /opt/layers && sudo docker compose exec -T layers wget -qO- --post-data "username=admin&password=admin" http://localhost:8080/data/auth/admin/login >/dev/null 2>&1 && echo "NOT CLOSED: admin/admin still works" || echo "Closed: admin/admin is refused"

Where the data lives

Check

sudo ls -la /opt/layers /opt/layers/data
sudo docker inspect layers-layers-1 -f '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{println}}{{end}}'

Restrict people’s files to the server

sudo chmod 750 /opt/layers/data/layers && sudo docker compose -f /opt/layers/docker-compose.yml restart layers

Ports and where the server connects

Open ports

sudo ss -ltnup | grep docker-proxy

How we counted outbound attempts

SUB=$(sudo docker network inspect layers_default -f '{{(index .IPAM.Config 0).Subnet}}')
sudo iptables -I DOCKER-USER 1 -s $SUB -j DROP
sudo iptables -I DOCKER-USER 1 -s $SUB -j LOG --log-prefix "LAYERS-OUT "
for n in 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16; do sudo iptables -I DOCKER-USER 1 -s $SUB -d $n -j RETURN; done
sudo dmesg | grep LAYERS-OUT          # what the server tried to send out

Closed network

cd /opt/layers
echo "NODE_IP=10.0.0.10" | sudo tee -a .env >/dev/null       # the server's address in your network
sudo tee docker-compose.override.yml >/dev/null <<'EOF'
services:
  layers:
    environment:
      LAYERS_LICENSE_SEEN_ENABLED: "false"
EOF
sudo docker compose up -d

What leaves the server; is the licence check offline?

Check

curl -s https://layers.example.com/layers/license/status | grep -o '"mode":"[A-Z]*"\|"regime":"[a-z-]*"'
# "mode":"LICENSED"
# "regime":"full"

Backups and restore

Copy

cd /opt/layers
sudo docker compose exec -T db pg_dump -U layers -d layersdb -Fc -Z6 > ~/layersdb.dump
sudo tar czf ~/layers-files.tar.gz -C /opt/layers data/layers .env license

Restore

cd /opt/layers
sudo docker compose stop layers
sudo docker compose exec -T db psql -U layers -d postgres -c "drop database layersdb with (force)"
sudo docker compose exec -T db psql -U layers -d postgres -c "create database layersdb owner layers"
sudo docker compose exec -T db pg_restore -U layers -d layersdb --no-owner < ~/layersdb.dump
sudo tar xzf ~/layers-files.tar.gz -C /opt/layers data/layers
sudo docker compose up -d

Updates and rollback

Update

cd /opt/layers
sudo docker compose exec -T db pg_dump -U layers -d layersdb -Fc -Z6 > ~/before-update.dump
sudo sed -i '/^LAYERS_IMAGE=/d' .env && echo "LAYERS_IMAGE=hissih/layers:3.0.1" | sudo tee -a .env >/dev/null
sudo docker compose up -d
sudo docker inspect layers-layers-1 -f '{{.Config.Image}} {{.State.Health.Status}}'

Roll back

cd /opt/layers
sudo sed -i '/^LAYERS_IMAGE=/d' .env && echo "LAYERS_IMAGE=hissih/layers:3.0.0" | sudo tee -a .env >/dev/null
sudo docker compose up -d

Logs and audit

Server log and log driver

cd /opt/layers
sudo docker compose logs --since 1h layers | grep "\[access\]"
sudo docker inspect layers-layers-1 -f '{{.HostConfig.LogConfig.Type}} {{json .HostConfig.LogConfig.Config}}'
# json-file {"max-file":"5","max-size":"20m"}

Administrator panel sign-ins

J=$(mktemp)
curl -s -c $J -o /dev/null https://layers.example.com/data/auth/admin/login --data "username=admin&password=$(sudo sed -n 's/^ADMIN_PASSWORD=//p' /opt/layers/.env)"
curl -s -b $J https://layers.example.com/data/auth/admin/logins; rm -f $J
# [{"at":"2026-11-15T00:31:13Z","ip":"…","ok":true}, …]

Who has access

Change the God Mode password

cd /opt/layers && P=$(openssl rand -hex 16) && T=$(sudo docker compose exec -T layers wget -qO- --post-data "username=admin&password=admin&bearer=true" http://localhost:8080/data/auth/admin/login | sed -n 's/.*"token":"\([^"]*\)".*/\1/p') && [ -n "$T" ] && sudo docker compose exec -T layers wget -qO- --header "Authorization: Bearer $T" --header "Content-Type: application/json" --post-data "{\"current\":\"admin\",\"next\":\"$P\"}" http://localhost:8080/data/auth/admin/password >/dev/null && echo "ADMIN_PASSWORD=$P" | sudo tee -a .env >/dev/null && echo "Done: God Mode password is in /opt/layers/.env (ADMIN_PASSWORD)"

Check

cd /opt/layers && sudo docker compose exec -T layers wget -qO- --post-data "username=admin&password=admin" http://localhost:8080/data/auth/admin/login >/dev/null 2>&1 && echo "NOT CLOSED: admin/admin still works" || echo "Closed: admin/admin is refused"

Who may open God Mode

curl -s -o /dev/null -w "%{http_code}\n" https://layers.example.com/godmode      # from a machine not in GODMODE_ALLOW
# 403
cd /opt/layers && sudo sed -i '/^GODMODE_ALLOW=/d' .env && echo "GODMODE_ALLOW=private_ranges 203.0.113.7" | sudo tee -a .env >/dev/null && sudo docker compose up -d

Encryption

In transit

echo | openssl s_client -connect layers.example.com:443 -servername layers.example.com 2>/dev/null | grep -E "Protocol|Cipher"
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" http://layers.example.com/
# 308 https://layers.example.com/

At rest

sudo file /opt/layers/data/layers/files/* | head
sudo docker compose -f /opt/layers/docker-compose.yml exec -T db psql -U layers -d layersdb -Atc "select left(password,4) from users limit 3"
# $2a$  (bcrypt)

Checked on 15.11.2026, Layers 3.0.1

This page was prepared with the help of AI from our own test logs.

Questions? We reply within 1 business dayQuestions?