Friendica (friendica.me)¶
Stack:
stack/friendica.me/· Host:phil-app· Updated: 2026-03-01
Mid-size Friendica instance for friendica.me — 95 GB DB, 39M post-user rows, split PHP-FPM pools (UI + fediverse, no media pool).
Overview¶
Similar split-pool architecture to opensocial, but without the dedicated media pool and with smaller dataset. Shares all common pitfalls with opensocial.
Architecture¶
PHP-FPM Pools¶
| Pool | Traffic type | PM mode | max_children | Container limit | Replicas |
|---|---|---|---|---|---|
| app-ui | Web UI requests | dynamic | 20 | 10G | 2 |
| app-fediverse | ActivityPub + Diaspora federation | dynamic | 50 | 8G | 1 |
| cron | Worker daemon | static | 50 | 8G | 1 |
No media pool (friendica.me has lower photo-serving traffic than opensocial).
Containers¶
web-ui(Nginx, 2 replicas),web-fediverse(Nginx)app-ui(PHP-FPM, 2 replicas),app-fediverse(PHP-FPM)cron(worker daemon)redis,php-fpm-exporter,redis-exporter
Networks¶
compose-friendicame-network(stack-internal)traefik-ingress,prometheus-network,mail-network
Traefik Routing¶
Same split as opensocial except no media router. Federation router must cover both friendica.me and www.friendica.me (fixed Feb 2026 — /receive was missing).
PHP Configuration¶
| File | Container | memory_limit |
|---|---|---|
config/app/www.ui.conf |
app-ui | FPM pool config |
config/app/www.fediverse.conf |
app-fediverse | FPM pool config |
config/app/app.ini |
all FPM pools | 512M |
config/app/cron.ini |
cron | 2G |
Per-task Friendica limit in config/app/local.config.php:
'system' => [
'worker_memory_limit' => 768,
],
ImageMagick policy: config/app/imagemagick-policy.xml with area = 32MP (changed from 128MP on 2026-03-01).
MariaDB¶
- DB host:
phil-db, userfriendica_friendicame(UI),friendica_friendicame_cron(cron) max_user_connections: 100 per usermax_statement_time: 30s (UI user), 120s (cron user)
Performance Data (Feb 2026)¶
| Metric | Value |
|---|---|
| DB size | 95 GB |
post-user rows |
39 Million |
contact rows |
896k |
| Slow requests >2s (10 min) | ~1 (0.1%) |
Operations¶
Health Check¶
sudo docker compose -f /opt/docker/stack/friendica.me/docker-compose.yml ps
sudo docker logs friendicame-cron-1 --tail 50
Upgrade¶
cd /opt/docker/stack/friendica.me
sudo docker compose pull && sudo docker compose up -d
sudo docker exec friendicame-cron-1 php /var/www/html/bin/console dbstructure update
Backup¶
Borgmatic config: borgmatic.d/friendicame.yaml. Backs up friendicame_data and friendicame_storage volumes.
Retention: 2 hourly / 7 daily / 4 weekly / 6 monthly.
Note: friendicame has a large Borg repo (31M chunks / ~520 GB) — borgmatic container needed 4G memory (was OOM-killed at 1G). See services/backup.md.
Heartbeat: Uptime Kuma push monitor "Backup - FriendicaMe".
Common Commands¶
# Worker status
sudo docker exec friendicame-cron-1 php /var/www/html/bin/console friendica worker:status
Pitfalls¶
All pitfalls from opensocial pitfalls apply here as well.
friendica.me /receive was missing (fixed)¶
The Traefik federation router for friendica.me was missing /receive as a path — Diaspora federation requests (POST /receive/public) were routed to UI workers, causing intermittent 500 errors. Fixed Feb 2026.
Large borgmatic repo requires 4G container memory¶
friendicame is one of the two large Borg repos (31M chunks / ~520 GB). The borgmatic container was OOM-killed at 1G memory limit. Increased to 4G.