Friendica uses // after hostname in URL following installation making app fail (partially)

My YunoHost server

Hardware: Old laptop or computer (Intel based)
YunoHost version:
**I have access to my server :Through SSH | through the webadmin | direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:
If your request is related to an app, specify its name and version: Friendica 2023.05~ynh3

Hi, I have installed Friendica over a recently installed and upgraded Yunohost installation. DNS services have been fully configured for my domain of type with Friendica being the only app associated with this domain.

After arranging the required credentials and logging into the website, I get connected to (i.e. with 2x a / after the hostname) rather than the expected Things seem to work, but when I select the contacts in the top menu, followed by e.g. friends under groups in the left hand menu, I end up being connected to a URL starting with https://contacts/

Interestingly, when I manually edit the URL by removing the second slash and press the same menu item, the link does connect properly (until such time the // appears again). The // also appears in my profile, which may be the reason why my other Mastodon and Friendica accounts seem not able to connect/follow me and to have my server get federated.

This URL behavior happens when connecting both from within my LAN and from the internet. My Yunohost server has all required ports forwarded from my internet router directly to my NAS, leading me to conclude it is related to how my Yunohost/nginx/Friendica handles the URL’s.

This // in the URL is not implemented on public Friendica services, and it happened on first and second install of the Friendica app, leading me to believe this may be caused by a bug in the Yunohost install scripts.

Question 1: How can I fix this myself and will this fix be sustainable with future updates? I’m not familiar enough with NGINX yet to to find the cause myself, so would need some pointers. Websearch did not help me thus far so I’m not sure how common this issue is :).

Question 2: Is this indeed caused by the script and if so, can/will that be updated?

Any hints and tips are appreciated.

Adding a little bump to keep the topic active - please comment also if you only have ideas where I might find the root of this problem. I presume it is located in one of the many nginx files being used. Thus far I can find a referral for http traffic to https, not containing any /, but none for https traffic diverting the hostname to the friendica folder as root.

FWIW I noticed this issue as well but I am not 100% sure this is why I also had trouble in getting other servers to federate with mine (or mine to federate with them). I wondered if it was something to do with how Friendica relays connections, or how quickly the endpoints in the API were responding to requests.
Either way, it would be a good idea to raise this as an issue in the Friendica-ynh Github.

Edit: I have raised this as an issue, as it may be connected to another issue someone was having with their login page – it was directing them to https://login/ rather than the correct URL.

Thanks for raising this as a bug. In the meantime I discovered my installation has a problem with the worker that is causing the federation to fail. The worker either never finishes or crashes, but for sure is not run again after the first attempt. So the // in the URL is indeed a separate, repeatable and stand alone problem.

I have removed the Friendica installation and the domain from my Yunohost server for now, and will run another full installation test from scratch some time later, after checking some of the other social apps supported to compare.

The Friendica worker runs on a cron job which, it seems, isn’t set up automatically. I wrote about this here… not sure if this would solve the federation issues, though. :confused:

1 Like


this should be fixed with 2023.12~ynh2


Thanks cgKAF, I had found this post and tried to load the worker manually instead of through cron, but the process never finishes once started. Will install the latest version of Friendica now that has been released and check whether any of my two issues remain :slight_smile:

I can confirm OniriCorpe’s statement version 2023.12-ynh2 did not install with // in the URL.

Furthermore, my second problem was strictly with the worker. It reoccured with my latest install, but following cgKAF’s post on how to add it as a cronjob under the Friendica account got my federation working. What I don’t understand is why it doesn’t work ‘off the shelf’ one installation. There must be an omission in the installation script that adds the cronjob either incorrectly or under the wrong user?

Anyway, problem fixed and this post can be closed :slight_smile:

1 Like

That’s good to hear :slight_smile:

Did it solve your issue with federation too (as in, can your server communicate freely with lots of others without your having to do anything)?
I had a lot of issues with this when I used Friendica and I wasn’t sure whether or not it was connected to the cron job/worker in the background. Even when I edited how the cron job behaved, federation just didn’t didn’t want to happen – I couldn’t send friend requests from Mastodon to Friendica, or private messages between the two, for example.

Hi all,
Thanks very much.

How can i upgrade my friendica to that version on yunohost?
I found it:

yunohost app upgrade friendica -u

Have a great day

Thank you very much… that update solved both problems I had with friendica. Both the / character and the fact that I was not receiving updates from my contacts.

1 Like

Great news ^w^

1 Like

Hi cgKAF,

The update did not fix proper configuration of the cron job, for me. I had to manually add it as per your guide, following my installation from scratch (including creation of the domain to be used).

What the update did fix, is the ability for the worker to finnish its job properly. So once I completed the manual entry into crontab, federation started to work properly and my instance is now federated with 28 Friendica servers, a few Diaspora instances and many an activitypub based instance like Mastodon, Misskey, etc.

I guess the installation script needs a small update for the crontab config. Could be as simple as the user ‘running’ the crontab entry?

I worked to replace the cron by the daemon, but I haven’t finished for now