Skip to content

Friendica (philipp.info)

Stack: stack/friendica/ · Host: phil-app · Updated: 2026-03-01

Single-user Friendica instance for philipp.info.

Overview

Simpler single-pool setup (no traffic split). Small dataset — performance is not a concern.

Architecture

  • Containers: app (PHP-FPM), cron (worker daemon), web (Nginx), redis, php-fpm-exporter, redis-exporter
  • Networks: compose-friendica-network (stack-internal), traefik-ingress, prometheus-network, mail-network
  • Volumes: friendica_data (user data), friendica_storage (media)
  • DB: MariaDB on phil-db, user friendica_philipp, max_statement_time=30s

PHP Configuration

File Container memory_limit
config/app/www.overloaded.conf app (FPM pool)
config/app/friendica.ini both app + cron 2G

Per-task Friendica limit set in config/app/local.config.php:

'system' => [
    'worker_memory_limit' => 768,
],

ImageMagick Policy

config/app/imagemagick-policy.xml mounted in both app and cron containers:

<policy domain="resource" name="area" value="32MP"/>

Required to prevent PHP Fatal OOM when federation contacts have large avatars. See pitfalls.

Configuration

Key settings in config/app/local.config.php: - system.worker_memory_limit = 768 — per-task cap (MiB) - system.cache_driver = redis - system.distributed_cache_driver = redis

REDIS_HOST=redis must be set in the cron container's environment.

Operations

Health Check

sudo docker compose -f /opt/docker/stack/friendica/docker-compose.yml ps
sudo docker logs friendica-cron-1 --tail 50

Upgrade

# Pull and restart
cd /opt/docker/stack/friendica
sudo docker compose pull && sudo docker compose up -d
# Run DB updates
sudo docker exec friendica-app-1 php /var/www/html/bin/console dbstructure update

Backup

Borgmatic config: borgmatic.d/friendica_philipp.yaml. Backs up friendica_data and friendica_storage volumes to Hetzner StorageBox.

Heartbeat: Uptime Kuma push monitor "Backup - Friendica Philipp".

Common Commands

# Worker status
sudo docker exec friendica-cron-1 php /var/www/html/bin/console friendica worker:status

# Force DB update
sudo docker exec friendica-app-1 php /var/www/html/bin/console dbstructure update

# Check ImageMagick policy
sudo docker exec friendica-app-1 cat /etc/ImageMagick-6/policy.xml | grep area

Pitfalls

See shared pitfalls in Opensocial pitfalls — they apply to all Friendica instances.

Instance-specific: imagemagick-policy.xml was missing

This instance was missing imagemagick-policy.xml entirely (the other two instances had it, albeit with 128MP). The file was created and the docker-compose.yml mount was added on 2026-03-01.

Decisions