this post was submitted on 08 May 2025
5 points (100.0% liked)

Friendica

329 readers
1 users here now

Overview:

All things about the Facebook alternative Friendica that began in 2014. Often called the fedi swiss army knife as it comes with many features.


Currently only Android and Sailfish have apps.

Sign up

Github

Apps


👉Recommended Instance Spotlight:

Friendica.World


🔵Related:

💰Buying and Selling:!flohmarkt@lemmy.ca

💬Messager:!matrix@programming.dev

!simplex@programming.dev

📷Instagram Alternative:!pixelfed@lemmy.world

🚫Boycott Facebook!demeta@programming.dev

👀Privacy:!privacy@lemmy.dbzer0.com


founded 4 months ago
MODERATORS
 

Hey all, I've been trying to get up and running with Friendica in a docker container behind Nginx Proxy Manager and connected to a separate MariaDB container.

The scenario that I have is that the only combination I've gotten to work to connect to Friendica is to use the alpine docker image with the complete web server, as putting configs into separate nginx instances wasn't getting me anywhere. However, using the full image, I can get to the UI and do the install to set things that I already set in env variables(?) whatever.

But what happens is that when it goes to save, it fails to save to the DB and maria db says that it rejected the connection for unauthenticated user and unknown host (implying to me that it rejected the connection before it even pulled this info). But the thing is that I've been able to shell into the friendica container and connect to the MariaDB. I can use adminer and log in as the friendica user to the friendica db that I created. Has anyone run in to this?

I'm starting to wonder if I need to use actual MySQL, maybe? This is a very strange issue as I've been able to create the database, user with privileges, and log in as that user. The host name for the user is '%', so 'friendica'@'%'.

I'd appreciate any help that I could get there.

you are viewing a single comment's thread
view the rest of the comments
[–] RagingHungryPanda@lemm.ee 2 points 1 day ago* (last edited 1 day ago) (5 children)

Thank you for the help. Here is the last set of configurations that I was running.
Edit: this is running on my TrueNas server.

networks:
  maria-db-network:
    external: True
services:
  friendica:
    build: /mnt/MainStorage/apps/friendica/config/app
    environment:
      - FRIENDICA_ADMIN_MAIL=<admin email>
      - FRIENDICA_TZ=America/Chicago
      - FRIENDICA_LANG=en-US
      - FRIENDICA_URL=https://friendica.michaeldileo.org/
      - FRIENDICA_SITENAME=Michael DiLeo's Friendica
      - SMTP=<the smtp>
      - SMTP_DOMAIN=<smtp domain
      - SMTP_FROM=admin
      - SMTP_AUTH_USER=<le user>
      - SMTP_AUTH_PASS=<auth pass>
      - SMTP_TLS=true
      - SMTP_STARTTLS=true
      - MYSQL_PASSWORD=<db pass>
      - MYSQL_DATABASE=friendica
      - MYSQL_USER=friendica
      - MYSQL_HOST=mariadb
      - MYSQL_PORT=3306
    image: friendica
    networks:
      - maria-db-network
    ports:
      - '30110:80'
    volumes:
      - /mnt/MainStorage/apps/friendica/data:/var/www/html
      - /mnt/MainStorage/apps/friendica/config/app:/app

addon.config.php file:

<?php

return [
	'system' => [
		'cache_driver' => 'redis',
		'lock_driver' => 'redis',

		'redis_host' => 'redis',

		'pidfile' => '/var/run/friendica.pid',
	]
];

docker file in the config folder

FROM friendica:friendica

RUN mkdir -p /usr/src/config
COPY addon.config.php /usr/src/config/
[–] slazer2au@lemmy.world 1 points 1 day ago (3 children)

My limited knowledge of compose makes me think that the MYSQL_HOST is not resolving mariadb because the entire service is missing from the compose file.

If you add the mariadb container as another service in this compose do things start working?

[–] RagingHungryPanda@lemm.ee 2 points 1 day ago (2 children)

It didn't really change when I put the db in the same compose file. I have them on the same docker network, so any container can reference any other container by its name, in this case mariadb and access any ports, not just the ones that are exposed.

Evidence for this working is that MariaDB is logging the rejected connection attempts.

[–] ruud@lemmy.world 1 points 1 day ago (1 children)

Any more info in the logging on why the attempt was rejected?

[–] RagingHungryPanda@lemm.ee 1 points 1 day ago

Unfortunately no, it's just one log line over and over. At some point it did have the username and IP, but it usually contains neither.

load more comments (1 replies)