Hopefully by now you won't have to be sold on the invasive practices that social media companies conduct. Websites such as Facebook and Twitter aquire so much data on users that they often know more about you than you know about yourself. +
Hopefully by now you won't have to be sold on the invasive practices that social media companies conduct. Websites such as Facebook and Twitter aquire so much data on users that they often know more about you than you know about yourself.
The simple solution to this is to not use social media. However, that just isn't an option for most people. So the next best thing is to setup a self-hosted and federalised social media site so that you have full control over your data.
@@ -26,7 +26,7 @@ I've previously made a vid
First things first you'll need to make sure that you've hardened you SSH so that password authentication is disabled and you'll also want to setup Fail2Ban.
@@ -34,109 +34,99 @@ There's a great tutorial on how to do this &2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix"
-
-
-Next we'll install the required packages. Run the below comman:
+Next we'll install the required packages:
You can manually configure postgreSQL to suit your system better. Check out the documentation here and then run the below command:
+Pleroma is not in the Debian app repositories, so we will install it manually.
First create the Pleroma user by running the below command:
-Next you'll need to set the FLAVOUR variable to whatever your OS flavour was from the first step using this command:
+Then, still as root, we will create the required directories and give the Pleroma user ownership of them.
-Using the Pleroma user previously created clone the Pleroma app:
+Now run
-Then run the next list of commands to move the files the the right locations, set the permissions etc... :
- We need to briefly return to the root user so we can run the following command (via the postgres user) to set up the database.
+Type Then return to the pleroma user with
+That will initialize Pleroma. It might take as long as a minute to get started, so wait a bit, then run the following:
+ If everything is working, this command will give you a long line of messy output. If it is not, you will get a connection error message.
+Once it is working successfully, stop the Pleroma daemon and we will interface Pleroma with the web server.
-For your domain name you'll need to install an SSL certificat for security. There's a guide here that will walk you through the steps.
-Once you've got your cert setup copy over the Nginx configuration with the below command:
+
+Return again to the root user. Let's copy Pleroma's Nginx configuration file from the template given in the installation and enable it:
Edit the
-Next you'll need to go into the etc/nginx/sites-enabled/pleroma.conf file and replace example.tld with your domain name. In my case my pleroma instance is shiteposting.com.
-A quick tip is you can verify if the config is valid with the below command:
+We now have to get a SSL certificate to enable encryption, since we have a model configuration that already includes SSL information,
+just check the brief the standalone certificate page to get the needed certificate.
+Once you've got your cert setup, copy over the Nginx configuration with the below command:
-Then simply restart the Nginx service with this command:
+Once everything, including your Cerbot certificate is ready, simply reload Nginx with this command:
If everything worked then when you go to your domain in the web browser you should see a bare-bones Pleroma instance.
@@ -161,29 +149,20 @@ If everything worked then when you go to your domain in the web browser you shou
You'll be able to create new accounts on the Pleroma instance in the login section on the website but the easiest way to setup an admin account is with the CLI. Simply run the below command replaced with your username:
If you run into any issues then feel free to checkout the documentation or send me an email or message. My details are below.
-My Website: https://biasedriot.co
-
-My Youtube Channel: https://www.youtube.com/channel/UCehh50T6qtDpt_kEUF33GJw
-
-Monero: 84Y4FZiTbLeR5qc1fBrBhB1yq5agKtEdoixq2w1ysXJv486MiBCz3czGT15bqeXDPpdLoNyF93inxY3BCk6g8mrDMNKoArS
-
-Bitcoin: 1Dmn9jEtWAhdLk1HHWkUVNeDdAaBCwNajm
-Installation
-
+
Setting Up and Configuring
+sudo apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot libmagic-dev
-apt install -y curl unzip libncurses5 postgresql postgresql-contrib nginx certbot libmagic-dev
-
+sudo systemctl restart postgresql
-
+
systemctl restart postgresqlInstalling the Pleroma App
+First as the root user
+adduser --system --shell /bin/false --home /opt/pleroma pleroma
-useradd -m -s /bin/bash -d /opt/pleroma pleroma
+export FLAVOUR="amd64-musl"
-
+
+mkdir -p /var/lib/pleroma/uploads
+chown -R pleroma /var/lib/pleroma
+mkdir -p /var/lib/pleroma/static
+chown -R pleroma /var/lib/pleroma
+mkdir -p /etc/pleroma
+chown -R pleroma /etc/pleromaNow, as the new Pleroma user
su -l pleroma to login as the Pleroma user.
+Now use the curl command below to download the Pleroma software and unzip it.
+su pleroma -s $SHELL -lc "
-curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' -o /tmp/pleroma.zip
-unzip /tmp/pleroma.zip -d /tmp/
-"
-
-curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=amd64' -o /tmp/pleroma.zip
+unzip /tmp/pleroma.zip -d /tmp/
+su pleroma -s $SHELL -lc "
-mv /tmp/release/* /opt/pleroma
+
-su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql"
+mv /tmp/release/* /opt/pleroma
rmdir /tmp/release
rm /tmp/pleroma.zip
-"
-
-mkdir -p /var/lib/pleroma/uploads
-chown -R pleroma /var/lib/pleroma
-mkdir -p /var/lib/pleroma/static
-chown -R pleroma /var/lib/pleroma
-mkdir -p /etc/pleroma
-chown -R pleroma /etc/pleroma
+./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psqlctrl-d or run exit to return to the root user, then run:
+
-su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
+su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"su -l pleroma and we will test to see that Pleroma can run:
-su pleroma -s $SHELL -lc "./bin/pleroma daemon"
+./bin/pleroma_ctl migrate
+./bin/pleroma daemon
-sleep 20 && curl http://localhost:4000/api/v1/instance
+curl http://localhost:4000/api/v1/instance./bin/pleroma stopSetup and Configure Nginx
-
-ln -s /etc/nginx/sites-available/pleroma.conf /etc/nginx/sites-enabled/pleroma.conf
-
+cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.conf
+ln -s /etc/nginx/sites-available/pleroma.conf /etc/nginx/sites-enabled/pleroma.confetc/nginx/sites-available/pleroma.conf file and replace example.tld with your domain name.
-
nginx -t
-
+sudo systemctl restart nginx
-systemctl reload nginxSetting up the service
@@ -146,10 +136,8 @@ Pleroma itself runs on a SystemD service similar to other things running on your
+systemctl enable pleroma
cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
-
systemctl start pleroma
-systemctl enable pleroma
-
+cd /opt/pleroma
-
-su pleroma -s $SHELL -lc "./bin/pleroma_ctl user new su -l pleroma
+./bin/pleroma_ctl user new username username@example.org --admin
+
-1Dmn9jEtWAhdLk1HHWkUVNeDdAaBCwNajm84Y4FZiTbLeR5qc1fBrBhB1yq5agKtEdoixq2w1ysXJv486MiBCz3czGT15bqeXDPpdLoNyF93inxY3BCk6g8mrDMNKoArS
+
+
+
+
+