summaryrefslogtreecommitdiff
path: root/rss.xml
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2021-07-02 09:15:01 -0400
committerLuke Smith <luke@lukesmith.xyz>2021-07-02 09:15:01 -0400
commite4e5e38bbcce59a0637008c775f4da28380f7fc7 (patch)
tree19473c46fe00d86b8f387de88865289159fad2cf /rss.xml
parentb4632152267784938d140679ad9b5effac9cdace (diff)
rss
Diffstat (limited to 'rss.xml')
-rw-r--r--rss.xml141
1 files changed, 141 insertions, 0 deletions
diff --git a/rss.xml b/rss.xml
index df7620a..a851064 100644
--- a/rss.xml
+++ b/rss.xml
@@ -16,6 +16,147 @@
<!-- LB -->
<item>
+<title>Setup a Pleroma Server</title>
+<guid>https://landchad.net/pleroma.html</guid>
+<link>https://landchad.net/pleroma.html</link>
+<pubDate>Fri, 02 Jul 2021 09:14:32 -0400</pubDate>
+<description><![CDATA[
+ <header><h1>Setup a Pleroma Server</h1></header>
+
+ <main>
+ <p>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.
+I've previously made<a href="https://www.youtube.com/watch?v=l7mVsLSsotU"> a video showing all the steps in depth if you want to check it out.</a> If you run into any issues I suggest you look at the video.
+</p>
+ <p>You'll need a server or VPS. Nearly any Operating system is supported but for this tutorial I'm gonna presume you're using a Debian-based OS. You'll also need a domain name pointing to your server's IP address <a href="https://landchad.net/dns.html">which is explained in this tutorial.</a>
+ </p>
+<h2>Installation</h2>
+<h3>Setting Up and Configuring</h3>
+<p>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.
+There's a great tutorial on how to do this <a href="https://landchad.net/sshkeys.html">which can be read here.</a>
+</p>
+<p>
+Next we'll install the required packages:
+</p>
+<pre><code>apt install -y curl unzip libncurses5 postgresql postgresql-contrib nginx certbot libmagic-dev</code></pre>
+<p>
+You can manually configure postgreSQL to suit your system better. <a href="https://docs-develop.pleroma.social/backend/configuration/postgresql/">Check out the documentation here</a> and then run the below command:
+</p>
+<pre><code>systemctl restart postgresql</code></pre>
+<h3>Installing the Pleroma App</h3>
+<h4>First as the root user</h4>
+<p>
+Pleroma is not in the Debian app repositories, so we will install it manually.
+First create the Pleroma user by running the below command:
+</p>
+<pre><code>useradd -m -s /bin/bash -d /opt/pleroma pleroma</code></pre>
+<p>
+Then, still as root, we will create the required directories and give the Pleroma user ownership of them.
+</p>
+<pre><code>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</code></pre>
+<h4>Now, as the new Pleroma user</h4>
+<p>
+Now run <code>su -l pleroma</code> to login as the Pleroma user.
+Now use the <code>curl</code> command below to download the Pleroma software and unzip it.
+</p>
+<pre><code>curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=<strong>amd64</strong>' -o /tmp/pleroma.zip
+unzip /tmp/pleroma.zip -d /tmp/</code></pre>
+<aside><p>Note that we are downloading the <strong>amd64</strong> version here. If you know you have a different CPU architecture, replace that with whatever your architecture is.</p></aside>
+<pre><code>mv /tmp/release/* /opt/pleroma
+rmdir /tmp/release
+rm /tmp/pleroma.zip
+./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql</code></pre>
+<p>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 <code>ctrl-d</code> or run <code>exit</code> to return to the root user, then run:
+</p>
+<pre><code>su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"</code></pre>
+<p>Then return to the pleroma user with <code>su -l pleroma</code> and we will test to see that Pleroma can run:</p>
+<pre><code>./bin/pleroma_ctl migrate
+./bin/pleroma daemon</code></pre>
+<p>
+That will initialize Pleroma. It might take as long as a minute to get started, so wait a bit, then run the following:
+</p>
+<pre><code>curl http://localhost:4000/api/v1/instance</code></pre>
+<p>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.</p>
+<pre><code>./bin/pleroma stop</code></pre>
+<h3>Setup and Configure Nginx</h3>
+<p>
+Return again to the root user. Let's copy Pleroma's Nginx configuration file from the template given in the installation and enable it:
+</p>
+<pre><code>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.conf</code></pre>
+<p>Edit the <code>etc/nginx/sites-available/pleroma.conf</code> file and replace <strong>example.tld</strong> with your domain name.</p>
+<p>
+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 <a href="standalone.html">the standalone certificate page</a> to get the needed certificate.
+Once you've got your cert setup, copy over the Nginx configuration with the below command:
+</p>
+<p>
+Once everything, including your Cerbot certificate is ready, simply reload Nginx with this command:
+</p>
+<pre><code>systemctl reload nginx</code></pre>
+<h3>Setting up the service</h3>
+<p>
+Pleroma itself runs on a SystemD service similar to other things running on your server like Nginx. To start the service up run the below commands:
+</p>
+<pre><code>cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
+systemctl start pleroma
+systemctl enable pleroma</code></pre>
+<p>
+If everything worked then when you go to your domain in the web browser you should see a bare-bones Pleroma instance.
+</p>
+<h3>Creating an Admin User</h3>
+<p>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:
+</p>
+<pre><code>su -l pleroma
+./bin/pleroma_ctl user new <strong>username</strong> <strong>username</strong>@<strong>example.org</strong> --admin</code></pre>
+<p>
+If you run into any issues then <a href="https://docs-develop.pleroma.social/backend/installation/otp_en/">feel free to checkout the documentation</a> or send me an email or message. My details are below.
+</p>
+<ul>
+ <li><a href="https://biasedriot.co">biasedriot.co</a></li>
+ <li><a href="https://www.youtube.com/channel/UCehh50T6qtDpt_kEUF33GJw">youtube</a></li>
+ <li>Bitcoin: <code class=crypto>1Dmn9jEtWAhdLk1HHWkUVNeDdAaBCwNajm</code></li>
+ <li>Monero: <code>84Y4FZiTbLeR5qc1fBrBhB1yq5agKtEdoixq2w1ysXJv486MiBCz3czGT15bqeXDPpdLoNyF93inxY3BCk6g8mrDMNKoArS</code></li>
+</ul>
+ </main>
+
+]]></description>
+</item>
+
+
+<item>
+<title>Certbot on Standalone Domains and Subdomains</title>
+<guid>https://landchad.net/standalone.html</guid>
+<link>https://landchad.net/standalone.html</link>
+<pubDate>Fri, 02 Jul 2021 09:14:29 -0400</pubDate>
+<description><![CDATA[
+ <header><h1>Certbot on Standalone Domains and Subdomains</h1></header>
+
+ <main>
+ <p>The command <code>certbot --nginx</code> will take an unencrypted website on an Nginx configuration file, get a certificate for it and change the configuration to use that certificate and thus HTTPS.</p>
+ <p>Sometimes, however, you are given an Nginx configuration template that already has encryption/HTTPS, so running the automated <code>certbot --nginx</code> is not possible, as it will simply give an error saying that the certicate that Nginx is looking for doesn't already exist and thus the Nginx config is broken.</p>
+ <p>So suppose you want to get a certificate for <strong>pleroma.example.org</strong> because you are installing Pleroma and the configuration file presupposes a certificate.
+ In this case you would want to run this:</p>
+ <pre><code>systemctl stop nginx
+certbot certonly --standalone -d <strong>pleroma.example.org</strong>
+systemctl start nginx</code></pre>
+ <p>What we do here is temporarily turn of Nginx, then run a <code>certonly</code> subcommand that generates a certificate for the domain without changing or caring about the Nginx configuration. Then we reactivate Nginx, thus turning back on our webserver.</p>
+ <p>The reason we deactivate Nginx is that it uses the ports that Certbot will want to bind to, and thus we must temporarily turn Nginx off to let Certbot use those ports. (What it actually does is spin up a dummy webserver that doesn't need to think about the Nginx configuration.)</p>
+ <p>This is just a little note of something that might confuse people, but the three commands above should suffice. If your site is still managed by Nginx, it should still be able to renew with simple <code>certbot renew --nginx</code> without a problem.</p>
+ </main>
+
+]]></description>
+</item>
+
+
+<item>
<title>Using UFW as a Firewall</title>
<guid>https://landchad.net/ufw.html</guid>
<link>https://landchad.net/ufw.html</link>