Friendica is a free and open-source software distributed Social Network. It forms one part of the Fediverse, an interconnected and decentralized network of independently operated servers. In this step by step guide I will show you how to install Friendica on your Synology NAS using Docker & Portainer.
STEP 1
Please Support My work by Making a Donation.
STEP 2
Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.
STEP 3
Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.
STEP 4
Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.
STEP 5
Now click the “Create” button. Follow the instructions in the image below.
STEP 6
After you click the Create button, the window below will open. Follow the instructions in the image below.
On the General area, set the Reverse Proxy Name description: type in Friendica. After that, add the following instructions:
Source:
Protocol: HTTPS
Hostname: friendica.yourname.synology.me
Port: 443
Check Enable HSTS
Destination:
Protocol: HTTP
Hostname: localhost
Port: 8786
STEP 7
On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.
STEP 8
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.
STEP 9
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.
STEP 10
Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it friendica. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 11
Now create three new folders inside the friendica folder that you created at STEP 10 and name them data, db, redis. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 12
Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.
STEP 13
In the Name field type in friendica. Follow the instructions in the image below.
services: redis: image: redis command: - /bin/sh - -c - redis-server --requirepass redispass container_name: Friendica-REDIS hostname: friendica-redis security_opt: - no-new-privileges:true read_only: true user: 1026:100 healthcheck: test: ["CMD-SHELL", "redis-cli ping || exit 1"] volumes: - /volume1/docker/friendica/redis:/data:rw environment: TZ: Europe/Bucharest restart: on-failure:5 db: image: mariadb:11.4-noble #LTS Long Time Support Until May 29, 2029. container_name: Friendica-DB hostname: friendica-db security_opt: - no-new-privileges:false volumes: - /volume1/docker/friendica/db:/var/lib/mysql:rw environment: TZ: Europe/Bucharest MYSQL_ROOT_PASSWORD: rootpass MYSQL_DATABASE: friendica MYSQL_USER: friendicauser MYSQL_PASSWORD: friendicapass restart: on-failure:5 friendica: image: friendica:stable container_name: Friendica hostname: friendica security_opt: - no-new-privileges:true healthcheck: test: curl -f http://localhost/ || exit 1 ports: - 8786:80 volumes: - /volume1/docker/friendica/data:/var/www/html:rw environment: MYSQL_HOST: friendica-db MYSQL_USER: friendicauser MYSQL_PASSWORD: friendicapass MYSQL_DATABASE: friendica REDIS_HOST: friendica-redis REDIS_PW: redispass PHP_MEMORY_LIMIT: 2048M PHP_UPLOAD_LIMIT: 2048M FRIENDICA_URL: https://friendica.yourname.synology.me FRIENDICA_ADMIN_MAIL: yourown@email FRIENDICA_NO_VALIDATION: true # true = URL and E-Mail Validation will be Disabled. FRIENDICA_TZ: Europe/Bucharest restart: on-failure:5 depends_on: redis: condition: service_healthy db: condition: service_started cron: image: friendica:stable entrypoint: /cron.sh container_name: Friendica-CRON hostname: friendica-cron security_opt: - no-new-privileges:true volumes: - /volume1/docker/friendica/data:/var/www/html:rw environment: MYSQL_HOST: friendica-db MYSQL_USER: friendicauser MYSQL_PASSWORD: friendicapass MYSQL_DATABASE: friendica restart: on-failure:5 depends_on: friendica: condition: service_healthy
Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own values. (Follow my step by step guide on how to do this.) 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for TZ. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value for FRIENDICA_URL and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area below, change the value for FRIENDICA_ADMIN_MAIL and type in your own email which will become your admin email.
Note: Before you paste the code above in the Web editor area below, change the value for FRIENDICA_TZ (Select your current Time Zone from this list.)
STEP 14
Scroll down on the page until you see a button called Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.
STEP 15
If everything goes right, you will see this message at the top right of your screen: “Success Stack successfully deployed“.
STEP 16
On the left sidebar in Portainer, click Containers. Identify your Friendica instance, then click on the little console/terminal icon. Follow the instructions in the image below.
STEP 17
After you click on the little terminal icon at STEP 16, a new page will open. Click Connect. Follow the instructions in the image below.
STEP 18
After you click Connect at STEP 17, a Console will open. Copy Paste the code below, then hit Enter on your keyboard. Follow the instructions in the image below.
./bin/console user add marius mariusnickname your@email en
Note: Before you paste the code in the console, change the following parameters:
- marius: marius is an example of a name. You should use your own name.
- mariusnickname: mariusnickname is an example for a nickname. You should use your own nickname.
- your@email: is an example for an email. You should use your own email address.
- en: is the default English language for your Friendica instance. fr stands for French, de stands for German etc.
STEP 19
You will see the following message: Enter URL of an image to use as avatar (optional). Hit Enter on your keyboard without adding anything.
STEP 20
Copy Paste the code below, then hit Enter on your keyboard. Follow the instructions in the image below.
./bin/console user password mariusnickname
Note: Before you paste the code in the console, change the following parameters:
- mariusnickname: mariusnickname is an example for a nickname. You should use your own nickname. Remember to use the same nickname that you have previously added at STEP 18.
STEP 21
You will be prompted to enter a new password. Your Password should be a SHA256 Password. You can generate one for free using IT-TOOLS. Check my example in this screenshot. Remember to paste your long SHA256 password in the console below. After you paste the password, hit Enter on your keyboard. Note: Once you paste the password in the console, the password will not be displayed in the console. So keep in mind to NOT paste the password twice.
STEP 22
After you hit Enter on your keyboard, you should wait a few seconds until you see the following message: Password changed.
STEP 23
Go back to STEP 1 or you will deal with karma 🙂
STEP 24
Now open your browser and type in your HTTPS/SSL certificate like this https://friendica.yourname.synology.me that you have previously created at STEP 6. In my case it’s https://friendica.mariushosting.synology.me If everything goes right, you will see the Friendica Login page. Type in your own email address that you have previously added at STEP 18 and your own SHA256 password that you have previously created and added at STEP 21. Click Login. Follow the instructions in the image below.
STEP 25
At the top right of the page, click on your profile icon then Settings. A new sidebar menu will appear on the left. Click Display then choose your favorite Theme settings options. Follow the instructions in the image below.
STEP 26
Click Display then choose your favorite Theme options. Follow the instructions in the image below.
STEP 27
At the top right of the page, click on your profile icon then Admin. A new sidebar menu will appear on the left. Click Overview then expand the General Information option. Follow the instructions in the image below.
STEP 28
Scroll down the page, then check the Force SSL option. Click Save Settings. Follow the instructions in the image below.
STEP 29
Your Friendica Social Network at a glance!
STEP 30
Invite your friends to be part of your Social Network in the Fediverse!
Enjoy Friendica!
If you encounter issues by using this container, make sure to check out the Common Docker issues article.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the Friendica container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.
This post was updated on Tuesday / October 8th, 2024 at 2:43 AM