Skip to main content


@Friendica Support

Hi there,
the moment has come to do the first instance upgrade cycle in the life of this instalation to bring this server to the actual stable version 2024.12-1 in the comming days.

In part the idea is to document every step in a post similiar to the howTo instructions:
install and/or move friendica to ubuntu 22.04 LTS VPS server
in the @EDIT | don't follow! profile.

Right now we are on 2023.05, so we will have to update step by step to:
2023.12 | release notes
2024.03 | release notes
2024.08 | release notes
2024.12-1 | release notes

Are there any specific recomandations or details to have in mind besides the information expected to be found in every update release instruction?

This is basically a single user instance with round about 14 forum pages with few followers each and a total of 18 profiles with contacts in the activityPub and diaspora community and some RSS subscriptions. No other specific conectors are enabled.

Installed addons/apps:
blockbot, calc, impressum, js_upload, notifyall, nsfw, pageheader, phpmailer, qcomment, rendertime, showmore_dyn, startpage

DB backups amount to ~180MiB and the image file storage folder on ftp around ~400MiB.

Friendica stable | 'Giant Rhubarb' 2023.05 - 1518
PHP Version 8.1.2-1ubuntu2.14
VPS server | Ubuntu 22.04 LTS
4 Core CPU, 8 GB Ram with 300GB NVME Disk - unlimited traffic
hosted by @ raroun 👍


Notes:
This instances right now seems to work well.
Sometimes this profile here has some strange hickups like when following up the link of a post from this server in a stream view a message "Not Found |The requested item doesn't exist or has been deleted." Also right now profiles from contacts, for example @ hoergen or @ feb don't show up in the contact list but they are displayed as followed in the profile contact page.

#friendica #fediAdmin

Ver. 05 | install and/or move friendica to ubuntu 22.04 LTS VPS server


EDIT - informationThis tutorial is supposed to be published by the tutorial profile of this server.
It is designed to have several chapters, each being distinctively seperated by an own titel. In total as of now there are like besides this introduction like 6 chapters.
posting and edition time of and by this EDIT profileof ver05 as of now 1hs
mastodon review contact: @mʕ•ﻌ•ʔm bitPickup
--
Categories:
@helpers@forum.friendi.ca

SPOILER - click to open/close || IntroductionThis tutorial is an adaption of the tutorial "creating a friendica server - ubuntu" by @Hank G ☑️ based on the experience of the installation report by @…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup:
https://squeet.me/display/962c3e10-5765-2e86-4a15-589579746174
and specific help by @Raroun.

Server specs and friendica version used:
VPS server | Ubuntu 22.04 LTS
PHP Version 8.1.2-1ubuntu2.14
4 Core CPU, 8 GB Ram with 300GB NVME Disk
Friendica [STABLE] | 'Giant Rhubarb' 2023.05 - 1518

SPOILER - click to open/close || Installation environment and HowToThe only reasonable way to work with a VPSserver on the web is using the console.
If you are not familiar with that don't worry, it is easy and the only thing you have to do is being able to copy/paste the commands displayed:
¡Copy/paste only the codeBoxes like this one, located outside of the spoilers of this tutorial one after another without altering the sequence!
Of course it is necessary to change the specific file names and passwords for you indiviual site, but that's all. promise!
On the console you wont be able to copy/paste with the keyboard ctrl-C/ctrl-V technique, you'll have to use the mouse "right click, chose option" technique.
This tutorial was created on a #debian #linux desktop environment.
There shouldn't be differences if you want to do this from a #windows machine.
The method used for communication between your local computer and the VPS server is called #SSH:
Wikipedia - Secure Shell:
"Cryptographic network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers."

#linux #debian #ubuntu #friendica #fediVerse #fediTutorial #tutorial #fediHelp #fediTips #activityPub #HowTo #DIY #VPS #server #selfHosting
@admin@tupambae.org @tutorial@tupambae.org

@TupambAdmin [2023.05] @EDIT | don't follow! no, that should be all. You can have a look into https://forum.friendi.ca/~news into the discussion for each release if something else is recorded there.
Thx @Tobias 👍,
added the respective links to the publication.
I guess there is nothing to add with respect to the difference between 2024.12 and 12-1, it's just installing 2024.12-1 instead of 2024.12 (?).
From where do you get 2024.12-1? There only is the 2024.12 release.

Friendica 2024.12 released


We are very happy to announce the availability of the new stable release of Friendica “Interrupted Fern” 2024.12. In addition to several improvements and new features, this release contains the fix for the broken installation wizard.

The highlights of Friendica 2024.12 are
  • added exporter for prometheus,
  • we dropped the support of OStatus (the predecessor of ActivityPub) after evaluating the amount of active servers/contacts that are still only using this protocol, and deprecated the fancybox addon
  • Friendica is now REUSE compliant and supports FEP-67ff
For details, please see the CHANGELOG file in the repository.

What is Friendica


Friendica is a decentralised communications platform, you can use to host your own social media server that integrates with independent social networking platforms (like the Fediverse or Diaspora*) but also some commercial ones like Tumblr and BlueSky.

How to Update

Updating from old Friendica versions


If you are updating from an older version than the 2023.12 release, please first update your Friendica instance to that version as it contained some breaking changes.

Pre-Update Procedures


Ensure that the last backup of your Friendica installation was done recently.

Using Git


Updating from the git repositories should only involve a pull from the Friendica core repository and addons repository, regardless of the branch (stable or develop) you are using. Remember to update the dependencies with composer as well. So, assuming that you are on the stable branch, the commands to update your installation to the 2024.12 release would be
cd friendicagit pullbin/composer.phar install --no-devcd addongit pull
If you want to use a different branch than the stable one, you need to fetch and checkout the branch before your perform the git pull.

Pulling in the dependencies with composer will show some deprecation warning, we will be working on that in the upcoming release.

Using the Archive Files


If you had downloaded the source files in an archive file (tar.gz) please download the current version of the archive from friendica-full-2024.12.tar.gz (sha256) and friendica-addons 2024.12.tar.gz (sha256)) and unpack it on your local computer.

As many files got deleted or moved around, please upload the unpacked files to a new directory on your server (say friendica_new) and copy over your existing configuration (config/local.config.php and config/addon.config.php) and .htaccess files. Afterwards rename your current Friendica directory (e.g. friendica) to friendica_old and friendica_new to friendica.

The files of the dependencies are included in the archive (make sure you are using the friendica-full-2024.12 archive), so you don’t have to worry about them.

Post Update Tasks


The database update should be applied automatically, but sometimes it gets stuck. If you encounter this, please initiate the DB update manually from the command line by running the script
bin/console dbstructure update
from the base of your Friendica installation. If the output contains any error message, please let us know using the channels mentioned below.

Please note, that some of the changes to the database structure will take some time to be applied, depending on the size of your Friendica database this update might run for days.

Known Issues


At the time of writing this, none with 2024.12

But the development branch is currently rather unstable and should be used with caution as the development diverged far (for Friendica terms) from the now stable branch. We will let our very valued ALPHA testers know when the dev team things that the development branch is stable enough again.

How to Contribute


If you want to contribute to the project, you don’t need to have coding experience. There are a number of tasks listed in the issue tracker with the label “Junior Jobs” we think are good for new contributors. But you are by no means limited to these – if you find a solution to a problem (even a new one) please make a pull request at github or let us know in the development forum.

Contribution to Friendica is also not limited to coding. Any contribution to the documentation, the translation or advertisement materials is welcome or reporting a problem. You don’t need to deal with Git(Hub) or Transifex if you don’t like to. Just get in touch with us and we will get the materials to the appropriate places.

Thanks everyone who helped making this release possible, and especially to all the new contributors to Friendica, and have fun!

¿from github?

On github it looks like 12-1 was released a day later (right now it states 29 days) than 12 (1 month), as if it is a fix, also it states:
nupplaphil [CI] Fix releaser

In the list of tags it looks like "older" or lesser in the hierarchy.



[as of now just edited the difference in the inicial post between github branch and anouncement post]
@TupambAdmin [2023.05] ah, yes that is the same code in Friendica, but the CI needed a fix and reacts only on a release tag - sorry I forgot about that x)
yes that is the same code in Friendica


Learning/comprehension question @Tobias:
What does "in Friendica" mean?
The stable version 2024.12, in other words the github pull of 2024.12 even when the date says "1 month" like it if werent as upt o date than 12-1?
@utopiArte only auxilliary file have been changed, nothing that is used when Friendica is running on the web server.
In other words @Tobias, these are changes in files on github for github and are not transfered by a git pull, right?

(a like for verifying refrasing questions to asure that I got the comment right is suffice @ Tobi!)
@TupambAdmin [2023.05] no, the files are part of the git repository and are transferred by a git pull. But the files are part of the files that Friendica uses while running on the server.
I understand that it's not relevant because it's an "auxiliar file".
👍

At the same time I do have to point out that you did two opposite staments, didn't you?
nothing that is used when Friendica is running on the web server.


But the files are part of the files that Friendica uses while running on the server.

🤔
Starting this announced updating cycle now.

Question:
Release notes and news forum announcement do not mention setting the site into maintenance mode by "going offline" stopping cron job:
1. If you had set up a worker cron job like this */10 * * * * cd /var/www/friendica; /usr/bin/php bin/worker.php run crontab -e and comment out this line.

and the following command:
2. Put your server into maintenance mode:
bin/console maintenance 1 "We are currently upgrading our system and will be back soon."

This is described for moving from one server to another in the helpers page:
https://forum.friendi.ca/help/Migrate

Shouldn't this be somehow be a more safe procedure?

Planning to do that right now ..
Problems using github update.

Trying to pull the update from 2023.05 to 2023.12 I get the message that the branch I'm trying to pull doesn't exist:
www-data@myservername:~/html$ git pull https://github.com/friendica/friendica/tree/2023.12
fatal: repository 'https://github.com/friendica/friendica/tree/2023.12/' not found

What am I doing wrong?
If you want to use a different branch than the stable one, you need to fetch and checkout the branch before your perform the git pull.
Database structure update 1542 was successfully applied.


👍
error notice: DefinitionCache/Serializer not writable
Serializer.php php line 2982025-02-20T22:15:46Z WARNING app E_USER_WARNING: Directory /var/www/html/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable.
Directory /var/www/html/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable.
file
/var/www/html/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php
php line 298
error 512
@TupambAdmin [2023.05] @Tobias @…ᘛ⁐̤ᕐᐷ jesuisatire bitPickup Please verify the ownership of these folders. You might have ran Composer as root, which would have made the folders in /vendor unable to modify by the web server user.

hypolite wrote:

Please verify the ownership of these folders.

vendor ownershipdrwxr-xr-x 40 www-data www-data 4096 Feb 20 21:22 vendor
drwxr-xr-x 3 www-data www-data 4096 Feb 20 21:20 ezyang
drwxr-xr-x 3 root root 4096 Feb 20 21:20 htmlpurifier
-rw-r--r-- 1 root root   341 Nov 17  2023 CREDITS
-rw-r--r-- 1 root root 26456 Nov 17  2023 LICENSE
-rw-r--r-- 1 root root  1271 Nov 17  2023 README.md
-rw-r--r-- 1 root root     6 Nov 17  2023 VERSION
-rw-r--r-- 1 root root  1415 Nov 17  2023 composer.json
drwxr-xr-x 3 root root  4096 Feb 20 21:20 library

drwxr-xr-x 21 root root  4096 Feb 20 21:20 HTMLPurifier
-rw-r--r--  1 root root   274 Nov 17  2023 HTMLPurifier.auto.php
-rw-r--r--  1 root root   213 Nov 17  2023 HTMLPurifier.autoload-legacy.php
-rw-r--r--  1 root root   910 Nov 17  2023 HTMLPurifier.autoload.php
-rw-r--r--  1 root root   101 Nov 17  2023 HTMLPurifier.composer.php
-rw-r--r--  1 root root   576 Nov 17  2023 HTMLPurifier.func.php
-rw-r--r--  1 root root 10573 Nov 17  2023 HTMLPurifier.includes.php
-rw-r--r--  1 root root   923 Nov 17  2023 HTMLPurifier.kses.php
-rw-r--r--  1 root root   235 Nov 17  2023 HTMLPurifier.path.php
-rw-r--r--  1 root root 10187 Nov 17  2023 HTMLPurifier.php
-rw-r--r--  1 root root 13579 Nov 17  2023 HTMLPurifier.safe-includes.php


There has been problems before with nearly all folders becoming owned by root.
In this upgrade I made the mistake to initialize bin/composer.phar install --no-dev as root but aborted that intent, changed to www-data and applied bin/composer.phar install --no-dev again.

Command applied now to asure that all folders will be owned by www-data.
chown -R www-data:www-data /var/www/
Ownership, www-data and root related conversation from last year when the instalation was migrated to this VPS:
https://tupambae.org/display/0ac89072-1765-64c7-8419-cd5442334821

Implications of access by the user www-data to all friendica folders


@Friendica Support

Hi there,
the friendica helpers page describes the installation process of friendica as follows:

/help/Install: wrote:

The Linux commands to clone the repository into a directory "mywebsite" would be

git clone https://github.com/friendica/friendica.git -b stable mywebsite
cd mywebsite

bin/composer.phar install --no-dev

Make sure the folder view/smarty3 exists and is writable by the webserver user, in this case www-data

mkdir -p view/smarty3
chown www-data:www-data view/smarty3
chmod 775 view/smarty3


Get the addons by going into your website folder.

cd mywebsite

Clone the addon repository (separately):

git clone https://github.com/friendica/friendica-addons.git -b stable addon



askubuntu.com: wrote:

What is the www-data user?
https://askubuntu.com/questions/873839/what-is-the-www-data-user
The web server has to be run under a specific user. That user must exist.

If it were run under root, then all the files would have to be accessible by root and the user would need to be root to access the files. With root being the owner, a compromised web server would have access to your entire system. By specifying a specific ID a compromised web server would only have full access to its files and not the entire server.


I guess this observation goes both ways, a compromised friendica instalation get's access to all the friendica folders if I choose to first create/activate the www-data user, than create the friendica installation folder structure, than git clone friendica, than create the smarty3 folder and ultimately do the git clone of the addon folder as described here:
https://tupambae.org/display/0ac89072-2065-5da2-9124-8b5839853793
The order in which the creation of www-data related folders in the above case is described makes all folders and files in the friendica directory belong to www-data.
In the friendica help description first comes the git-clone, than the the smarty3 folder part than the addon git-clone. Actually I guess that last part would make the addon folder belong to www-data too if I run one command after another. Is that intended?

I wonder if this could have some kind of security implications.
I guess www-data is somehow the friendica site and has permissions to do "what ever it wants" (-> "writable by the webserver user") with all the folders in the friendica directories if it's the owner of them.


@TupambAdmin [stable]