<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><title>IT Notes - mastodon</title><link>https://it-notes.dragas.net/categories/mastodon/</link><description>Articles in category mastodon</description><language>en</language><lastBuildDate>Thu, 06 Nov 2025 11:30:02 +0000</lastBuildDate><atom:link href="https://it-notes.dragas.net/categories/mastodon/feed.xml" rel="self" type="application/rss+xml"></atom:link><item><title>Self-hosting your Mastodon media with SeaweedFS</title><link>https://it-notes.dragas.net/2025/11/06/self-hosting-your-mastodon-media-with-seaweedfs/</link><description>&lt;p&gt;&lt;img src="https://images.unsplash.com/photo-1611926653458-09294b3142bf?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDR8fHNvY2lhbCUyMG5ldHdvcmt8ZW58MHx8fHwxNjY5MTI0MzQ5&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="Self-hosting your Mastodon media with SeaweedFS"&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="https://joinmastodon.org/"&gt;Mastodon&lt;/a&gt; 4.5.0 is here, and with it come some interesting changes that, in my opinion, might encourage more people to consider it for self-hosting their Fediverse community.&lt;/p&gt;
&lt;p&gt;While it may not be as lightweight and simple as other solutions (like &lt;a href="https://codeberg.org/grunfink/snac2"&gt;snac&lt;/a&gt; or &lt;a href="https://gotosocial.org/"&gt;GoToSocial&lt;/a&gt; or many others), I believe it remains one of the best platforms for managing a medium-sized Fediverse community, thanks in part to the direct feedback that many admins have provided to the developers.&lt;/p&gt;
&lt;p&gt;I have previously written about how to &lt;a href="https://it-notes.dragas.net/2022/11/23/installing-mastodon-on-a-freebsd-jail/"&gt;install Mastodon in a FreeBSD jail&lt;/a&gt; and how to &lt;a href="https://it-notes.dragas.net/2024/10/09/2024-modifying-limits-in-mastodon-4-3/"&gt;modify its character and poll limits&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One of the most critical initial decisions (which can be changed later, but with extra work) is where to store your media files. Mastodon downloads and re-processes all media it encounters from other instances for three main reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Local Caching:&lt;/strong&gt; Your users connect to your media server, reducing the load on the original instance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security:&lt;/strong&gt; Re-processing media helps to remove any potential "impurities" before they reach the user's device.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Privacy:&lt;/strong&gt; It prevents disclosing your users' IP addresses to other instances. A user will only connect to their own instance to fetch all data, including remote content.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At least initially, media files will be the largest part of your instance's storage footprint. It is therefore essential to plan where to store them and to add a regular cleanup script; otherwise, their growth will be exponential.&lt;/p&gt;
&lt;p&gt;Mastodon supports uploading media to external S3-compatible solutions, and many admins use the usual commercial providers, paying for data uploads and transfers.&lt;/p&gt;
&lt;p&gt;I am a firm believer in "Own Your Data", so I have always used my own self-hosted S3 servers. I initially started with Minio, but over time, I realized that, by design, it doesn't perform well with a multitude of small files (performance degrades). After running some tests, I decided to switch to &lt;a href="https://github.com/seaweedfs/seaweedfs"&gt;SeaweedFS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;SeaweedFS "is a fast distributed storage system for blobs, objects, files, and data lake, for billions of files! Blob store has O(1) disk seek..." - this, combined with the fact that it is a mature and proven piece of software, was enough for me to give it a try. The result? Excellent. The I/O and CPU load on my media server dropped drastically, making SeaweedFS an incredibly suitable solution. Furthermore, some of its features (like the ability to run a &lt;a href="https://github.com/seaweedfs/seaweedfs/wiki/Filer-Active-Active-cross-cluster-continuous-synchronization"&gt;filer.sync&lt;/a&gt;) allow for efficient and fast replication to other storage, another host, or... anything else.&lt;/p&gt;
&lt;p&gt;SeaweedFS works perfectly with Mastodon, and I will explain the steps to get it into production.&lt;/p&gt;
&lt;p&gt;I will install SeaweedFS in a dedicated jail and use a dedicated subdomain. This ensures that the media server can be moved to another host at any time without reconfiguring everything or changing domains. SeaweedFS has its own FreeBSD package, installable via &lt;code&gt;pkg&lt;/code&gt;, or can be downloaded directly from the project's website.&lt;/p&gt;
&lt;p&gt;In either case, I will describe a "test" setup - which can also be used in production without issues. However, I highly recommend diving deeper into the tool, as it is incredibly powerful and flexible and can solve many more problems than one might imagine.&lt;/p&gt;
&lt;h3&gt;Setting up the SeaweedFS Jail&lt;/h3&gt;
&lt;p&gt;First, let's create a dedicated jail with BastilleBSD:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;bastille create media 14.3-RELEASE 10.0.0.66 bastille0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, let's enter the jail and install SeaweedFS (and tmux, which can be useful):&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;bastille console media
pkg install -y tmux seaweedfs
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I suggest launching SeaweedFS in a tmux session so you can monitor its output. Later, you should configure an automatic startup method, such as using the included rc.d file or any other method you prefer.&lt;/p&gt;
&lt;p&gt;Create a directory for the data and start SeaweedFS as the "seaweedfs" user:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;mkdir -p /seaweedfs/data
chown -R seaweedfs /seaweedfs
su -m seaweedfs
cd /seaweedfs/
/usr/local/bin/weed server -dir /seaweedfs/data -s3
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;At this point, SeaweedFS will start and create everything it needs to function, including the S3 server.&lt;/p&gt;
&lt;h3&gt;Configuring Buckets and Users&lt;/h3&gt;
&lt;p&gt;Now, let's open the weed shell to create the necessary bucket and users:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;weed shell
s3.bucket.create -name mastomedia
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Still in the weed shell, create a user for Mastodon and grant read permissions for unauthenticated users (which is necessary to serve media to the world):&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;s3.configure -access_key=mastomedia -secret_key=CHANGEME -buckets=mastomedia -user=mastodon -actions=Read,Write,List,Tagging,Admin -apply
s3.configure -buckets=mastomedia -user=anonymous -actions=Read -apply
s3.configure -buckets=mastomedia -actions=Read -apply
&lt;/code&gt;&lt;/pre&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Security Tip:&lt;/strong&gt; For the &lt;code&gt;-secret_key&lt;/code&gt;, avoid using a simple password. You can generate a strong, random key directly from your shell with a command like &lt;code&gt;openssl rand -base64 32&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Done. SeaweedFS is now ready to receive (and serve) media. The next step is to set up a reverse proxy to serve everything over HTTPS. My preferred approach is to configure the system as if it were external, even if the services are in adjacent jails. This might use slightly more resources, but the time and trouble it saves in the future are well worth it.&lt;/p&gt;
&lt;h3&gt;Nginx Reverse Proxy Configuration&lt;/h3&gt;
&lt;p&gt;The reverse proxy can be configured something like this:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;[...]

server {
   server_name  media.mastodon.example.com;

   ignore_invalid_headers off;
   client_max_body_size 0; # Allow large file uploads without Nginx limits

   location / {
      proxy_set_header Host $http_host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;

      proxy_connect_timeout 300;
      proxy_http_version 1.1;
      proxy_set_header Connection &amp;quot;&amp;quot;;
      chunked_transfer_encoding off;

      expires 1y;
      add_header Cache-Control public;

      add_header X-Cache-Status $upstream_cache_status;
      add_header X-Content-Type-Options nosniff;

      proxy_pass http://10.0.0.66:8333;
   }

# ... other server configurations like SSL ...

}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Mastodon Configuration&lt;/h3&gt;
&lt;p&gt;Now let's configure Mastodon. If you are running the setup wizard for the first time, here is a summary of the options:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;[...]
Do you want to store uploaded files on the cloud? yes
Provider Minio
Minio endpoint URL: https://media.mastodon.example.com
Minio bucket name: mastomedia
Minio access key: mastomedia
Minio secret key: CHANGEME
Do you want to access the uploaded files from your own domain? Yes
Domain for uploaded files: media.mastodon.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If Mastodon is already active, or once the setup is complete, the options in your .env.prod file should be modified to be consistent with what SeaweedFS expects:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;S3_ENABLED=true
S3_PROTOCOL=https
S3_REGION=us-east-1
S3_ENDPOINT=https://media.mastodon.example.com
S3_HOSTNAME=media.mastodon.example.com
S3_BUCKET=mastomedia
AWS_ACCESS_KEY_ID=mastomedia
AWS_SECRET_ACCESS_KEY=CHANGEME
S3_FORCE_SINGLE_REQUEST=true
# remove the S3_ALIAS_HOST if it is set
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;IMPORTANT NOTE:&lt;/strong&gt; If both services are in jails on the same host (i.e., SeaweedFS is on the same host as Mastodon), you should ensure that the Mastodon jail can reach the SeaweedFS jail through the reverse proxy and not via the external IP. To do this, add the following line to the /etc/hosts file of the &lt;strong&gt;Mastodon jail&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;10.0.0.1        media.mastodon.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this example, the reverse proxy is at 10.0.0.1. If you are not using a separate reverse proxy but are exposing Nginx directly from the jail (as described in my Mastodon installation article), use the IP of the Mastodon jail itself instead (e.g., 10.0.0.42).&lt;/p&gt;
&lt;p&gt;With this setup, Mastodon will be able to upload media to the SeaweedFS server and generate the correct links for other instances, public visitors, and users of your own instance.&lt;/p&gt;
&lt;p&gt;Have fun with SeaweedFS!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefano Marinelli</dc:creator><pubDate>Thu, 06 Nov 2025 11:30:02 +0000</pubDate><guid isPermaLink="false">https://it-notes.dragas.net/2025/11/06/self-hosting-your-mastodon-media-with-seaweedfs/</guid><category>freebsd</category><category>container</category><category>hosting</category><category>jail</category><category>networking</category><category>server</category><category>tutorial</category><category>web</category><category>fediverse</category><category>mastodon</category><category>ownyourdata</category><category>seaweedfs</category></item><item><title>Increasing or Modifying Character Limits and Poll Options in Mastodon 4.3, 4.4 and 4.5</title><link>https://it-notes.dragas.net/2024/10/09/2024-modifying-limits-in-mastodon-4-3/</link><description>&lt;p&gt;&lt;img src="https://imgcdn.agendadigitale.eu/wp-content/uploads/2022/11/21142557/welcome-mastodon.jpeg.webp" alt="Increasing or Modifying Character Limits and Poll Options in Mastodon 4.3, 4.4 and 4.5"&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Tested with Mastodon 4.5.x&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.joinmastodon.org/2024/10/mastodon-4.3/"&gt;Mastodon 4.3.0 was released just a few hours ago&lt;/a&gt;, and many instances have already started updating.&lt;/p&gt;
&lt;p&gt;During my tests, I noticed that some things have changed in the core files, and the procedures normally described for changing the character limit of posts no longer work. So, I decided to write this short blog post to document the updated procedure.&lt;/p&gt;
&lt;h3&gt;Increasing or Modifying the Character Limit&lt;/h3&gt;
&lt;p&gt;At &lt;a href="https://mastodon.bsd.cafe"&gt;BSD Cafe&lt;/a&gt;, the character limit is set to 5000 (up from the 500 originally allowed by Mastodon). No one has ever used all the available characters, but I prefer that the limit be decided by the poster, not by the platform.&lt;/p&gt;
&lt;p&gt;To customize this limit, you need to modify two files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;live/app/javascript/mastodon/features/compose/containers/compose_form_container.js&lt;/code&gt; - find the line that contains:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;maxChars: state.getIn(['server', 'server', 'configuration', 'statuses', 'max_characters'], 500),&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and change &lt;code&gt;500&lt;/code&gt; to your desired value.&lt;/p&gt;
&lt;p&gt;Next, you need to modify another file: &lt;code&gt;live/app/validators/status_length_validator.rb&lt;/code&gt; - find the line that contains:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;MAX_CHARS = 500&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and change it accordingly.&lt;/p&gt;
&lt;p&gt;Once done, run the following command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RAILS_ENV=production bundle exec rails assets:precompile&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and restart the Mastodon services to apply the changes.&lt;/p&gt;
&lt;h3&gt;Increasing or Modifying the Number of Poll Options&lt;/h3&gt;
&lt;p&gt;Edit the file &lt;code&gt;live/app/validators/poll_options_validator.rb&lt;/code&gt; and modify the line:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;MAX_OPTIONS      = 4&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;to the value you want. There are also other customizable options in this file.&lt;/p&gt;
&lt;p&gt;Again, once done, run the following command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RAILS_ENV=production bundle exec rails assets:precompile&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and restart the Mastodon services to apply the changes.&lt;/p&gt;
&lt;p&gt;Changes might not be immediately visible because of caching (browser, web server, etc.), but once these caches expire, the new limits will take effect.&lt;/p&gt;
&lt;p&gt;These modifications might be overridden by subsequent Mastodon updates, so be sure to check after every update that they are still valid.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefano Marinelli</dc:creator><pubDate>Wed, 09 Oct 2024 14:53:00 +0200</pubDate><guid isPermaLink="false">https://it-notes.dragas.net/2024/10/09/2024-modifying-limits-in-mastodon-4-3/</guid><category>mastodon</category><category>ownyourdata</category><category>fediverse</category><category>hosting</category><category>social</category><category>web</category></item><item><title>Using a Permanent WebFinger Address for My Fediverse Profile</title><link>https://it-notes.dragas.net/2024/10/08/using-a-permanent-webfinger-address/</link><description>&lt;p&gt;&lt;img src="https://unsplash.com/photos/9Xf-jxvfpW8/download?ixid=M3wxMjA3fDB8MXxhbGx8MXx8fHx8fHx8MTc0MTU5MTUzNXw&amp;force=true&amp;w=1920" alt="Photo by &amp;lt;a href=&amp;quot;https://unsplash.com/it/@elenarossini&amp;quot;&amp;gt;Elena Rossini&amp;lt;/a&amp;gt; on Unsplash"&gt;&lt;/p&gt;&lt;p&gt;Decentralized technologies have always been of great interest to me. In my opinion, the decentralization of the Internet was one of the keys to its success, but year after year, we are gradually losing it. This is happening because we increasingly rely on "mainstream" services for convenience, habit, or trend.&lt;/p&gt;
&lt;p&gt;I often hear colleagues say, "I've put my client's email on Y (Y = one of the major players in the email world) to avoid problems." The problems remain, but the colleague can "pass the buck" to the big player of the moment. And, in my experience, clients tend to be much more forgiving when the problem is with a big player.&lt;/p&gt;
&lt;p&gt;Once, people used to say: "Nobody ever got fired for buying IBM." Today, I would say, "Nobody ever got fired for putting email on [Google, Microsoft, etc.]."&lt;/p&gt;
&lt;p&gt;A few days ago, a colleague mentioned that he struggles to find some of his friends and colleagues on the fediverse because they are spread across various instances, and a simple search doesn't always yield the desired results.&lt;/p&gt;
&lt;h3&gt;Own Your Data&lt;/h3&gt;
&lt;p&gt;The fediverse is an extremely effective, resilient, autonomous decentralized communication technology. Unlike email, the many software implementations (such as Mastodon, GoToSocial, Mitra, Akkoma, Pleroma, etc. - soon snac will also support this type of operation) support the ability to "move" one's account. This means that when a user decides to relocate, the server will notify all followers that the user has moved. The followers will automatically stop following the original account and start following the new one. As of today, it is not possible to move past content (which will still be available on the old server).&lt;/p&gt;
&lt;p&gt;In my opinion, every government, public entity, association, foundation, etc., that needs to communicate with the public should have its own communication channel, with full control over its data and the messages it delivers. When I read "my Discord server," I feel like responding "there's nothing 'yours' about it - tomorrow morning they could shut everything down, and you would have lost EVERYTHING.". &lt;strong&gt;Own your data!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sometimes, I read that instances are not opened because of "costs not balanced by the number of users." But even public television channels are often economically unprofitable, yet they are considered an essential service for public communication. Open, decentralized technologies that ensure control over one's data should be treated the same way.&lt;/p&gt;
&lt;p&gt;The problem, as with email, is tied to the address. A server change necessarily implies an address change, which can sometimes cause problems.&lt;/p&gt;
&lt;h3&gt;A Permanent Address&lt;/h3&gt;
&lt;p&gt;For this reason, I decided to implement a kind of "permanent" address that will provide the correct data based on my main server. I decided that this address should be linked to my email address, and since I control the entire domain (including the web server), I can do this quite simply. In this way, if I change servers, users who already follow me will be moved by the "move" operation, while those who do not yet follow me will still be able to find me using my "permanent" address, which will, in turn, provide the new user on the new server.&lt;/p&gt;
&lt;p&gt;My setup will be very similar to what I found in &lt;a href="https://fnordig.de/2023/01/02/serving-webfinger-resources-with-nginx/"&gt;an interesting blog post&lt;/a&gt; that I based my approach on.&lt;/p&gt;
&lt;h3&gt;In Practice&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;My email address is &lt;code&gt;stefano@dragas.it&lt;/code&gt;, and I want anyone from any fediverse instance to be able to type it in and find me.&lt;/li&gt;
&lt;li&gt;My main account is currently on &lt;a href="https://bsd.cafe"&gt;BSD Cafe&lt;/a&gt;: &lt;a href="https://mastodon.bsd.cafe/@stefano"&gt;https://mastodon.bsd.cafe/@stefano&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To achieve this, I modified the nginx configuration on the server that serves the "dragas.it" website.&lt;/p&gt;
&lt;h3&gt;Nginx Configuration&lt;/h3&gt;
&lt;p&gt;Before the &lt;code&gt;server&lt;/code&gt; directive for dragas.it, I added this mapping:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-nginx"&gt;map $query_string $account_name {
    ~resource=acct:stefano@dragas.it$ stefano;
    ~resource=acct%3Astefano%40dragas.it$ stefano;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This ensures that requests for those two resources (some clients send the second one, so I wanted to handle that situation) will assign the value "stefano" to the &lt;code&gt;$account_name&lt;/code&gt; variable.&lt;/p&gt;
&lt;h3&gt;WebFinger Exception&lt;/h3&gt;
&lt;p&gt;Within the &lt;code&gt;server&lt;/code&gt; directive of the dragas.it virtual host, I added an exception for webfinger (the protocol used to find user data):&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-nginx"&gt;location = /.well-known/webfinger {
    root  /usr/local/www/webfinger;

    if ($account_name) {
      rewrite ^(.*)$ /$account_name.json break;
    }

    try_files $uri = 404;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;JSON File for WebFinger&lt;/h3&gt;
&lt;p&gt;At this point, I created the &lt;code&gt;/usr/local/www/webfinger&lt;/code&gt; directory and added a file named &lt;code&gt;stefano.json&lt;/code&gt; (matching &lt;code&gt;$account_name&lt;/code&gt;) with the following content:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-json"&gt;{
  &amp;quot;subject&amp;quot;: &amp;quot;acct:stefano@dragas.it&amp;quot;,
  &amp;quot;aliases&amp;quot;: [
    &amp;quot;https://mastodon.bsd.cafe/@stefano&amp;quot;,
    &amp;quot;https://mastodon.bsd.cafe/users/stefano&amp;quot;
  ],
  &amp;quot;links&amp;quot;: [
    {
      &amp;quot;rel&amp;quot;: &amp;quot;http://webfinger.net/rel/profile-page&amp;quot;,
      &amp;quot;type&amp;quot;: &amp;quot;text/html&amp;quot;,
      &amp;quot;href&amp;quot;: &amp;quot;https://mastodon.bsd.cafe/@stefano&amp;quot;
    },
    {
      &amp;quot;rel&amp;quot;: &amp;quot;self&amp;quot;,
      &amp;quot;type&amp;quot;: &amp;quot;application/activity+json&amp;quot;,
      &amp;quot;href&amp;quot;: &amp;quot;https://mastodon.bsd.cafe/users/stefano&amp;quot;
    },
    {
      &amp;quot;rel&amp;quot;: &amp;quot;http://ostatus.org/schema/1.0/subscribe&amp;quot;,
      &amp;quot;template&amp;quot;: &amp;quot;https://mastodon.bsd.cafe/authorize_interaction?uri={uri}&amp;quot;
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In practice, this will return a reference to my main Mastodon account.&lt;/p&gt;
&lt;h3&gt;Testing the Setup&lt;/h3&gt;
&lt;p&gt;After reloading the nginx configurations, it will be enough to test it:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-sh"&gt;# curl &amp;quot;https://dragas.it/.well-known/webfinger?resource=acct:stefano@dragas.it&amp;quot;

{
  &amp;quot;subject&amp;quot;: &amp;quot;acct:stefano@dragas.it&amp;quot;,
  &amp;quot;aliases&amp;quot;: [
    &amp;quot;https://mastodon.bsd.cafe/@stefano&amp;quot;,
    &amp;quot;https://mastodon.bsd.cafe/users/stefano&amp;quot;
  ],
  &amp;quot;links&amp;quot;: [
    {
      &amp;quot;rel&amp;quot;: &amp;quot;http://webfinger.net/rel/profile-page&amp;quot;,
      &amp;quot;type&amp;quot;: &amp;quot;text/html&amp;quot;,
      &amp;quot;href&amp;quot;: &amp;quot;https://mastodon.bsd.cafe/@stefano&amp;quot;
    },
    {
      &amp;quot;rel&amp;quot;: &amp;quot;self&amp;quot;,
      &amp;quot;type&amp;quot;: &amp;quot;application/activity+json&amp;quot;,
      &amp;quot;href&amp;quot;: &amp;quot;https://mastodon.bsd.cafe/users/stefano&amp;quot;
    },
    {
      &amp;quot;rel&amp;quot;: &amp;quot;http://ostatus.org/schema/1.0/subscribe&amp;quot;,
      &amp;quot;template&amp;quot;: &amp;quot;https://mastodon.bsd.cafe/authorize_interaction?uri={uri}&amp;quot;
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, everything works perfectly. When you search for my email address from any fediverse instance, my &lt;a href="https://bsd.cafe"&gt;BSD Cafe&lt;/a&gt; profile will appear.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;This approach allows you to define multiple users for each domain. You just need to add the corresponding mapping in the nginx configuration and the &lt;code&gt;.json&lt;/code&gt; file with all the data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefano Marinelli</dc:creator><pubDate>Tue, 08 Oct 2024 12:53:00 +0200</pubDate><guid isPermaLink="false">https://it-notes.dragas.net/2024/10/08/using-a-permanent-webfinger-address/</guid><category>fediverse</category><category>ownyourdata</category><category>mastodon</category><category>snac2</category><category>snac</category><category>mitra</category><category>gotosocial</category><category>akkoma</category><category>hosting</category><category>social</category><category>web</category></item><item><title>A Small Compendium of Fediverse Platforms I Use</title><link>https://it-notes.dragas.net/2024/09/12/a-small-compendium-of-fediverse-platforms-i-use/</link><description>&lt;p&gt;&lt;img src="https://unsplash.com/photos/9Xf-jxvfpW8/download?ixid=M3wxMjA3fDB8MXxhbGx8MXx8fHx8fHx8MTc0MTU5MTUzNXw&amp;force=true&amp;w=1920" alt="Photo by &amp;lt;a href=&amp;quot;https://unsplash.com/it/@elenarossini&amp;quot;&amp;gt;Elena Rossini&amp;lt;/a&amp;gt; on Unsplash"&gt;&lt;/p&gt;&lt;p&gt;Following my &lt;a href="https://it-notes.dragas.net/2023/01/15/deploying-a-piece-of-the-fediverse/"&gt;old article about the Fediverse software I've experimented and use&lt;/a&gt;, I've decided to convert a Mastodon post into this small blog post.&lt;/p&gt;
&lt;p&gt;In the past few days, I revisited several of my old Fediverse instances after some friends asked me to help them set up a new one. While I was at it, I took the opportunity to perform maintenance on some leftover instances I still manage. Here’s a summary of my experience with various platforms:&lt;/p&gt;
&lt;h2&gt;&lt;a href="https://akkoma.social/"&gt;Akkoma&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is my oldest instance, still running since 2022. It was offline for about 3 or 4 months, but I recently updated it to the latest version and restarted it. After upgrading the software and the database, it didn't show any problem. Akkoma is a very good solution, supports quote posts and emoji reactions.&lt;/p&gt;
&lt;h2&gt;&lt;a href="https://gotosocial.org/"&gt;GoToSocial&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I helped a friend update their GoToSocial instance. While the software itself was up-to-date, the underlying system needed an update. I noticed that when the number of followings exceeds 2000, the instance becomes a bit sluggish. PostgreSQL isn’t the issue in this case – it's the GoToSocial process itself that seems to get heavy on the VPS. Despite this, GoToSocial remains very usable, and I see a lot of potential in it. The Mastodon API is well-implemented, and it works seamlessly with major apps.&lt;/p&gt;
&lt;h2&gt;&lt;a href="https://codeberg.org/silverpill/mitra"&gt;Mitra&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Mitra is another Fediverse platform I’ve been exploring. I helped someone with around 1000 followers and followings migrate from a large Mastodon instance to Mitra. There were no speed issues, though sending messages does make the server slightly "heavier" for a short time. The Mastodon API is partially implemented, but the software is evolving quickly. I find its native interface quite user-friendly, and it’s a platform worth keeping an eye on.&lt;/p&gt;
&lt;h2&gt;&lt;a href="https://codeberg.org/grunfink/snac2"&gt;Snac2&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I’ve always had a soft spot for Snac2. It doesn’t use a database, and its design choices make it ideal for small instances. One feature I particularly like is how it sends posts to all known instances, which increases visibility and interaction. The interface is basic, with no JavaScript, which is a nice change, but it might feel too minimalistic for users coming from Mastodon. However, the Mastodon API support is steadily improving with each release. Snac2 does struggle with larger numbers, but this is more due to the underlying file system than the software itself. Snac2 now supports moving in/out, so it's easy top test it. I highly recommend it for anyone looking to self-host a small or single-user instance. &lt;/p&gt;
&lt;h2&gt;&lt;a href="https://github.com/mastodon/mastodon"&gt;Mastodon&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;My old personal instance of Mastodon was stuck on version 4.1.x and had been offline for a few months. I updated the FreeBSD Jail, upgraded Mastodon to 4.2.12, and then to 4.3.0 without any issues. I also helped a friend migrate their Pleroma-based instance to Mastodon. This user has about 5000 followers and followings, and the instance runs on FreeBSD on an arm64 VPS for around 3 euros per month. Aside from media storage (which isn’t Mastodon’s fault), there were no significant issues. Although Mastodon is sometimes criticized for being resource-intensive, its modular design ensures that even during high load, queues might slow down, but the local timeline and navigation remain reasonably fast. This makes it a strong contender for larger-scale use.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Overall, I feel that these platforms are evolving in the right direction. The developers are doing a fantastic job, and the Fediverse is growing stronger with each new release. Well done to all the devs working hard behind the scenes!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefano Marinelli</dc:creator><pubDate>Thu, 12 Sep 2024 18:45:00 +0200</pubDate><guid isPermaLink="false">https://it-notes.dragas.net/2024/09/12/a-small-compendium-of-fediverse-platforms-i-use/</guid><category>fediverse</category><category>akkoma</category><category>gotosocial</category><category>mitra</category><category>snac2</category><category>snac</category><category>mastodon</category><category>freebsd</category><category>hosting</category><category>server</category><category>social</category><category>web</category><category>ownyourdata</category></item><item><title>Deploying a piece of the Fediverse</title><link>https://it-notes.dragas.net/2023/01/15/deploying-a-piece-of-the-fediverse/</link><description>&lt;p&gt;&lt;img src="https://images.unsplash.com/photo-1456428746267-a1756408f782?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDEwNHx8c2VydmVyJTIwbmV0d29ya3xlbnwwfHx8fDE2NzM3NzQ3MDI&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="Deploying a piece of the Fediverse"&gt;&lt;/p&gt;&lt;p&gt;After &lt;a href="https://en.wikipedia.org/wiki/Acquisition_of_Twitter_by_Elon_Musk"&gt;Elon Musk’s Twitter deal&lt;/a&gt;, many users &lt;a href="https://www.theverge.com/2022/12/20/23518325/mastodon-monthly-active-users-twitter-elon-musk"&gt;decided to “fly away” from the "traditional" commercial Social Networks&lt;/a&gt;. Some for good, some just decided to increase their presence in other, alternative Social Network. That's what I'm doing.&lt;/p&gt;
&lt;p&gt;Many of those users decided to join the &lt;a href="https://fediverse.info"&gt;Fediverse&lt;/a&gt; - even if many of them just call it &lt;a href="https://joinmastodon.org"&gt;Mastodon&lt;/a&gt;, as they don’t understand that Mastodon is just a Software that allows to join the Fediverse.&lt;/p&gt;
&lt;p&gt;The Fediverse is composed by thousands of “instances”, some are bigger (like &lt;a href="https://mastodon.social/explore"&gt;mastodon.social&lt;/a&gt;), some are personal (aka: single user instances), many are normal communities with their members. Many of them communicate using the same open protocol, &lt;a href="https://www.w3.org/TR/activitypub/"&gt;ActivityPub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Because of this, there’s no “one size fits all” so I’ve started to explore the different solutions. I’ve been mainly focusing on running them on &lt;a href="https://it-notes.dragas.net/2022/01/24/why-were-migrating-many-of-our-servers-from-linux-to-freebsd/"&gt;FreeBSD&lt;/a&gt;, but I’ve had to fire up Linux for some tests. Here’s what I’ve found out.&lt;/p&gt;
&lt;div class="hc-toc"&gt;&lt;/div&gt;

&lt;h2&gt;Backends / Complete Solutions&lt;/h2&gt;
&lt;h3&gt;&lt;a href="https://joinmastodon.org"&gt;Mastodon&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I won’t spend too much time on Mastodon as you may find almost everything,  everywhere, about it. Tons of articles have been written about Mastodon, so this one would be just another one, surely not the best one. Many consider it to be “the Fediverse” (they just say “Mastodon” to refer to the whole “Fediverse”, &lt;a href="https://blog.castopod.org/the-fediverse-is-so-much-bigger-than-mastodon/"&gt;and they’re wrong&lt;/a&gt;), it’s by far the most installed solution. It’s so popular that there are plenty of clients (both for Android and iOS) that perfectly work with it. Mastodon has its own APIs - and many other Fediverse solutions are using them, just to be able to be compatibile with the Mastodon apps. It also supports backend based “Hide replies” (only show new posts, not all the replies to other posts) in timeline. It’s good as you can filter the replies from any frontend or mobile app as the backend won’t provide them at all, while the client doesn't need to be aware that you're filtering them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I am suggesting it&lt;/strong&gt;: It’s stable and well done, there’s a lot of documentation and if you install and manage it correctly, you shouldn’t notice anything strange or unexpected. Remember, no software solution can be considered “set and forget” and Mastodon is not an exception. Please, don’t forget that running an instance is not just installing the software. Moderation is a serious issue. More about it later.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please, consider that&lt;/strong&gt;: Mastodon is also quite heavy, not easy to scale (&lt;a href="https://hazelweakly.me/blog/scaling-mastodon/"&gt;even if there’s documentation around&lt;/a&gt;) and, by default, is caching everything it sees and knows about. This means that both a single user instance or a thousands of users’ one, will (rapidly) grow because any media will be locally cached.&lt;/p&gt;
&lt;p&gt;My first, single user installation grew, in a week, well over 100 GB of occupied storage because of all this caching. It can’t be avoided (you can just tell Mastodon to delete the cache after &lt;em&gt;x&lt;/em&gt; days). While it may make sense for a big instance, it can be considered an overkill for a single user one. This is a "known problem", but mainly considered as a feature: all the media will be locally processed, all the contents will be locally stored. So an evil content hidden in a media file will be reprocessed by local ffmpeg or ImageMagick and will be cleared.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I’m suggesting another solution&lt;/strong&gt;: Monopoly is bad and Mastodon is becoming, for many, a synonym of Fediverse .  More, it requires much space and it’s resource-hungry. It’s easy to install Mastodon and experience a huge resource drain in just a few days, especially if you’re not a skilled system administrator. While Mastodon is the best solution for a complete microblogging experience, other solutions exist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To sum up&lt;/strong&gt;: Installing Mastodon on FreeBSD was easy. Even if I had read about problems, &lt;a href="https://it-notes.dragas.net/2022/11/23/installing-mastodon-on-a-freebsd-jail/"&gt;I’ve documented how to do it and it’s stable and reliable&lt;/a&gt;. Mastodon is, IMHO, a good piece of software but keep in mind that it could not be the best solution for you and a small, single user instance can become huge in a few weeks. Also, keep in mind that it's the most deployed Fediverse software, so any mobile app, any web app, any hint will work perfectly with Mastodon. Your Fediverse experience will be smooth.&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://akkoma.social"&gt;Akkoma&lt;/a&gt; (&lt;a href="https://pleroma.social"&gt;Pleroma&lt;/a&gt; fork)&lt;/h3&gt;
&lt;p&gt;I’ve read about Akkoma in a reddit thread about how difficult was to install Mastodon on FreeBSD. It was described as a Pleroma fork, but actively developed and maintained, faster and with more advanced features. That’s why I decided to try it and - at least for now - stick with it (and not Pleroma, but many of the things I’ll point out here apply to Pleroma, too).&lt;/p&gt;
&lt;p&gt;Akkoma (as all the Pleroma forks) is much, much lighter than Mastodon. It’s perfectly able to run a single user instance on a Raspberry PI. Moreover, &lt;a href="https://www.linkedin.com/in/christine-lemmer-webber-aa8b93210?challengeId=AQEV7hPAP5kmZAAAAYW1APUoLUR1KExbqsA00X_acs1iXnaskmdkm-me-JY7qjRW2oqQlm6bvuKE7PaY88WTXasMsRZZx1lUTA&amp;amp;submissionId=d99bcdc8-2575-3a17-da9c-44bf4c03cb36&amp;amp;challengeSource=AgFktTMs4QFFzgAAAYW1ARkWNfsdRcZLCwaiJ0-pl_6jhKinHY94qCISxxZTZnM&amp;amp;challegeType=AgH1fssT9S9nagAAAYW1ARkZPK6hfooac1aWFgkA8hAdAMf0TNCthsU&amp;amp;memberId=AgHEvyepJMJAUwAAAYW1ARkbjUhwUbj0a-vmoG1ulu1a9kc&amp;amp;recognizeDevice=AgHmFlNf0hJLQgAAAYW1ARkedPChO-KJr-SC5ZM9P_7ylZB7LNDa"&gt;Christine Lemmer-Webber&lt;/a&gt;, coauthor of the &lt;a href="https://www.w3.org/TR/activitypub/"&gt;ActivityPub protocol&lt;/a&gt;, said that &lt;a href="https://octodon.social/@cwebber/109546851049168850"&gt;Akkoma is a good solution&lt;/a&gt; - and I think that her opinion is a qualified one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I am suggesting it&lt;/strong&gt;: First of all, for its documentation. As for Pleroma, there are installation instructions for a lot of operating systems (yes, also &lt;a href="https://docs.akkoma.dev/stable/installation/freebsd_en/#installing-frontends"&gt;FreeBSD&lt;/a&gt;, &lt;a href="https://docs.akkoma.dev/stable/installation/netbsd_en/"&gt;NetBSD&lt;/a&gt;, &lt;a href="https://docs.akkoma.dev/stable/installation/openbsd_en/"&gt;OpenBSD&lt;/a&gt;). It’s light and fast. It doesn’t cache remote media by default, so that’s perfect for a single user instance. You can enable it (both pre-fetching media as soon as the server gets the status, like Mastodon, or just downloading them and caching when the first user meets them), you can also proxy your local media. S3 storage and remote CDNs are supported and everything is customisable. Message size limit is set to 5000 characters by default, but can be adjusted. Everything is configurable and you can choose your favourite frontend. It has quote posts (while Mastodon doesn’t allow them, even if they’re perfectly visible if created by Akkoma).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please, consider that&lt;/strong&gt;: Akkoma is not Mastodon. They “talk” using the same language but are different pieces of software. There’s less activity around it (the documentation is good, the support forum is good, but the number of Akkoma installations can’t be compared to Mastodon’s ones). Many Mastodon mobile apps seem to have problems with Akkoma and at the moment &lt;a href="https://meta.akkoma.dev/t/hashtags-from-akkoma-are-links-on-mastodon/"&gt;there’s a bug (probably it's a Mastodon bug, but users will think it's Akkoma's fault)  that, if you’re posting an hashtag, a link will be shown on Mastodon&lt;/a&gt;. More, if you want to hide boosts or replies from your timeline, remember that Akkoma won’t perform that at backend’s level, but it should be done by the frontend. Not all frontends and mobile apps support it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I’m suggesting another solution:&lt;/strong&gt; Well, not exactly. Actually, I’m suggesting to try Akkoma. It’s a good piece of software, developed by friendly people, well accepted by the Fediverse instances’ administrators and has a lot of happy users and instance administrators. I've used Akkoma as my main instance software for more or less one month. The bug I've described and some problems here and there made me move back to Mastodon. I'm keeping my Akkoma instance up, even if not actively used.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To sum up&lt;/strong&gt;: Akkoma installation is easy and well documented, you have a lot of settings to customise your instance and can fine-tune your installation for your hardware capabilities.&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://join.misskey.page"&gt;Misskey&lt;/a&gt; (and its forks like &lt;a href="https://joinfirefish.org/"&gt;Firefish&lt;/a&gt;, etc.)&lt;/h3&gt;
&lt;p&gt;Misskey is a very nice piece of software. I had some troubles to run it on FreeBSD (but I didn’t try that much) so I decided to fire up a Linux machine and use Docker.&lt;/p&gt;
&lt;p&gt;The interface is nice - it’s Japanese design, so it’s fancy and rich of emojis and effects. I’ve tried it just for a few hours and I appreciated it but decided it wasn’t ok for my needs (at least, for now).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I am suggesting it:&lt;/strong&gt; if you’re building a community, Misskey (or one of its forks) is a very good choice. It’s eye candy, complete and usable. It’s a part of the Fediverse, so no problems to talk to Mastodon, Akkoma, etc. It also has a “drive” feature, useful for many users that want to exchange files.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I’m suggesting another solution:&lt;/strong&gt; the main reason why I had to look at another solution is that it doesn’t support Mastodon APIs so no Mastodon Android or iOS app is working with a Misskey instance. While it may be ok for many users, this could be a problem for others.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To sum up&lt;/strong&gt;: Misskey is nice, worth trying and a very good solution if it fits your community’s needs. For me, it doesn’t give any advantage over other lighter solutions.&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://friendi.ca"&gt;Friendica&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Friendica is a project that aims to be similar to Facebook. It’s federated and actively maintained, the interface is nice and familiar to Facebook users. I’ve been able to install it on a FreeBSD jail (as it’s in PHP) and everything worked as expected. I didn’t spend too much time on Friendica but I’m planning to do a deeper test as I’m working on a community of former Facebook users and this could be the right choice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I am suggesting it:&lt;/strong&gt; If you’re creating a community for (former) Facebook users, they’ll have a familiar feeling in Friendica. The interface is clean and usable, it supports a lot of protocols (ActivityPub, OStatus, diaspora), it supports plugins, can import websites via rss (so automatic post is easy).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please, consider that&lt;/strong&gt;: Moderation tools are different from the ones you have on Mastodon or Akkoma (Pleroma, etc.) and you can’t easily report users, especially remote ones as support for Mastodon API is limited. With the current growth of users, it’s easy to find a bad person trying to disturb. Not having effective ways to deal with it may be frustrating.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I’m suggesting another solution:&lt;/strong&gt; I didn’t try Friendica long enough to find some big problems with it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To sum up:&lt;/strong&gt; Generally speaking, it is considered a solid and stable solution, actively maintained and, being in php, portable. If you want to create a Facebook-like community, that's the way to go.&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://codeberg.org/grunfink/snac2"&gt;snac2&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;snac2 is a simple, minimalistic ActivityPub instance that supports the Mastodon API. This makes it compatible with platforms like Pleroma, Akkoma, and Mastodon itself. It's written in portable C and it's been created to be light, easy to deploy, and with only two dependencies: &lt;em&gt;openssl&lt;/em&gt; and &lt;em&gt;curl&lt;/em&gt;. It heavily relies on hard links and &lt;em&gt;doesn't need any database&lt;/em&gt;. This is a big, big plus for me. I've performed many tests and found that this is one of the best lightweight solutions to join the Fediverse.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I am suggesting it:&lt;/strong&gt; snac2 is clean and polished. The federation with the other solutions is good, it works beautifully with &lt;a href="https://tusky.app/"&gt;Tusky&lt;/a&gt; (on Android) and &lt;a href="https://tooot.app/"&gt;tooot&lt;/a&gt; (both on Android and iOS) - also consider &lt;a href="https://enafore.social/"&gt;Enafore&lt;/a&gt; as a PWA or web interface - and its integrated web interface is minimal but effective. No javascript, no cookies - clean web. More, the dev is responsive and open to patches and contributions. I've helped with some stress tests and contributed with instructions and patches to make it work on FreeBSD and NetBSD, and they've been merged immediately. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please, consider that&lt;/strong&gt;: It's not Mastodon. Some of the Mastodon API features are (currently) not supported so the experience could be different from the other solutions. Some Mastodon apps don't work (the official Mastodon app, for example, can't login). There's no open registration option (users should be manually registered from the cli) and account migration is not supported, at the moment. More, while it's not caching external media, locally published media will stay on the local drives (no S3 upload option), so be prepared to serve those files as well. Testing it from my FTTC connection, I almost DDoSed my internet connection for 15 minutes, publishing a photo.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I’m suggesting another solution:&lt;/strong&gt; Actually, I'm suggesting to try snac2. I think it could be a great solution for a single user instance or for instances managed by tech people, as you can run it just 1 minute after the download. It's light, easy, straightfoward and the dev is a nice person. I'd suggest other solutions if the priority is to offer a full, feature rich Fediverse experience, with registration, big and featureful configuration panels, etc&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To sum up:&lt;/strong&gt; snac2 is a lightweight and effective way to join the Fediverse. Currently, it's my favourite solution for small communities as the "file only" approach and no dependencies are coherent with my ideas. I've migrated my instance from FreeBSD to NetBSD, from external datacenters to my home network and it's just been a matter of a single rsync &lt;strong&gt;&lt;em&gt;(-H)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://gotosocial.org"&gt;GoToSocial&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;GoToSocial is a new microblogging platform. Its target it to be a light, customisable, easy to manage and integrated software. It is still at its early alpha stage, it should evolve into a beta at some point in ~~2023~~ 2024. It’s developed in Go and installation in easy and fast, it supports Postgres, Mysql and Sqlite. Basic functionalities have already been integrated and it can federate with (almost) all the other ActivityPub implementations, even if with some small problems. FreeBSD installation was easy and fast, as they provide a amd64 FreeBSD binary. Being written in go, it shouldn't be difficult to self-compile it for other architectures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I am suggesting it:&lt;/strong&gt; While it doesn’t have an integrated frontend (but Mastodon mobile apps or other frontends can be used, as &lt;a href="https://enafore.social"&gt;Enafore&lt;/a&gt; &lt;a href="https://github.com/BDX-town/Mangane"&gt;Mangane&lt;/a&gt;, etc.), it already supports many of the features you’d expect from an ActivityPub implementation. It's fast, suitable for installation on a low end hardware, can be deployed without a reverse proxy as has integrated support for Letsencrypt certificates. But…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please, consider that&lt;/strong&gt;: It’s still at alpha stage. Things can still break and it doesn’t support any kind of account migration from Mastodon (while it’s supported by Pleroma and its forks).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why I’m suggesting another solution:&lt;/strong&gt; While I think it could be a game changer, I think it’s bit early to deploy it unless you’re a very skilled and experienced administrator. You should understand its “quirks and features”, mainly tied to its alpha status. While I’ve installed and will keep installed a GoToSocial instance, at the moment I’ll just keep it in a test stage server in order to follow its development status. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To sum up:&lt;/strong&gt; GoToSocial could potentially become one of the most interesting ActivityPub microblogging platforms, at least for small and medium sized communities. It's a bit early to consider it ready for a production deployment, but it's already worth testing.&lt;/p&gt;
&lt;h3&gt;Other solutions&lt;/h3&gt;
&lt;p&gt;I’ve tried &lt;a href="https://takahe.social"&gt;Takahe&lt;/a&gt;, another microblogging platform. It’s under active and hard development, so, like GoToSocial, should be kept on the radar as it’s quite promising. I've just fired up a Linux docker installation to try it, so I haven't tried on FreeBSD.&lt;/p&gt;
&lt;p&gt;While I’ve also tried platforms like &lt;a href="https://pixelfed.org"&gt;Pixelfed&lt;/a&gt;, &lt;a href="https://joinpeertube.org"&gt;Peertube&lt;/a&gt;, and &lt;a href="https://funkwhale.audio"&gt;FunkWhale&lt;/a&gt;, which are all part of the Fediverse, they cater to specific needs and are distinct from the microblogging platforms that are the focus of this list.&lt;/p&gt;
&lt;h2&gt;Frontends&lt;/h2&gt;
&lt;p&gt;All the Fediverse backend implementations have their own specific features but the users will just interact via a frontend. While Mastodon - but also Pixelfed, Peertube, etc. - are presented as a specific stack (backend + frontend), there are many frontends that can interact via the Mastodon API.&lt;/p&gt;
&lt;p&gt;Of course, being the “Mastodon” API, not all the backends are perfectly compatibile/supported by all the frontends. Mobile apps use the Mastodon API, that’s why their compatibility with other implementations like snac2, Pleroma, Akkoma, etc. may not be perfect at all the times.&lt;/p&gt;
&lt;p&gt;I won’t describe them all. I’ll just enumerate the ones I’m using, with some notes:&lt;/p&gt;
&lt;h3&gt;Akkoma’s Pleroma-FE&lt;/h3&gt;
&lt;p&gt;With the 2022.12 release of Akkoma, Pleroma-FE has been evolved into a proper, nice looking PWA. After an initial configuration of its many options, I found it quite nice and effective. The only problem (common with many PWAs on iOS) is that when you suspend the app, it doesn’t detect it, so if you open it again after two hours, you’ll just see the recent posts, not all the posts of the last two hours. This is because of the way iOS deals with app suspend/resume and &lt;a href="https://github.com/elk-zone/elk/issues/750#issuecomment-1371966812"&gt;many PWAs don’t seem to understand they’ve been suspended.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://github.com/BDX-town/Mangane"&gt;Mangane&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Mangane is a Soapbox fork that aims to improve compatibility with Akkoma. It is nice and clean and the developers are improving it to support Akkoma's features, so it's great. At the moment I've noticed  some visual problems, on iOS, with the icons -  &lt;strong&gt;but &lt;a href="https://github.com/BDX-town/Mangane"&gt;Guérin&lt;/a&gt; contacted me to ask for information (after reading this article) and opened an issue on to fix it&lt;/strong&gt;. Guérin has been nice and helpful, making Mangane even more appealing. I’m using it for planned posts on Akkoma, as Pleroma-FE doesn’t support them, yet. I'm also using Mangane as a daily driver, from time to time, as I like it.&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://enafore.social"&gt;Enafore&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A light, fast, complete and usable web frontend. I’ve been using it when I needed a simple, clear frontend. It supports “hide replies”, which is great to improve timeline quality. It's among my favourite choices when using a webapp and is a good choice for snac2.&lt;/p&gt;
&lt;h3&gt;&lt;a href="https://elk.zone"&gt;Elk&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Elk is a frontend for Mastodon API. It’s nice, clear, eye candy, intelligent. The developers are nice people, open to suggestions. Development is a bit slower compared to the initial pace, but the app is already very complete and stable.&lt;/p&gt;
&lt;p&gt;Elk is definitely a very good piece of software, and I recommend to try it.&lt;/p&gt;
&lt;h2&gt;Moderation and final considerations&lt;/h2&gt;
&lt;p&gt;One of the things you should be considering is that deploying a piece of the Fediverse isn’t just installing a software and interacting with others. Actually, that’s just the easiest part of the experience, at least if you’re not creating a single user instance.&lt;/p&gt;
&lt;p&gt;Many of the people that joined the Fediverse in its early days decided to do it as they felt attacked on other social networks. In the last years, the commercial socials have proven to be the perfect place for negative people, attacking others without being blocked/stopped in an efficient way. &lt;em&gt;Hate causes addiction and the owners of those commercial socials make a lot of money if people interact, showing them ads every time they open the app/website&lt;/em&gt;. They make money (also) through people hating each other.&lt;/p&gt;
&lt;p&gt;The Fediverse gives the possibility to mute and block users, but also to mute and block entire instances. One of the main tasks of an instance’s administrator is to make sure that everything is ok. While you can define your own instance’s rules, other instances’ admins may block you if they find you’re federating by sending messages agains their rules.&lt;/p&gt;
&lt;p&gt;As an administrator, you’re also responsible of keeping your users’ data safe, to avoid sharing/providing illegal contents or offensive stuff. So you’re free to set your rules, but others are free to “defederate” you, if they don’t like the contents your instance is providing. While it’s not an issue for a single user instance, you must be quite careful when opening the registrations as you may find out you've been defederated because of (your) lack of moderation.&lt;/p&gt;
&lt;p&gt;There’s some strong criticism against the Fediverse because of this, as many see it as more “censored” than the traditional, commercial social networks. I don’t think it’s true, as you’re free to fire up your instance, decide your rules and act as you want. But you can’t impose others and their instances to follow you, even if you think you’re right. In a free world, everybody should be free to decide if they want to listen to you. But everybody should also be free to create a new space and start sharing their ideas. There’s not a central authority of contents, so only the single admins and users can choose what they want to see or avoid. There's not a commercially driven algorithm that may decide that you should see contents that will cause you anger and hate just because it generates traffic (and money) to the social's owner.&lt;/p&gt;
&lt;p&gt;The Fediverse can be a beautiful place to stay.&lt;/p&gt;
&lt;p&gt;&lt;mastodon-comments host="mastodon.bsd.cafe" user="stefano" tootId="111732122236947352"&gt;&lt;/mastodon-comments&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefano Marinelli</dc:creator><pubDate>Sun, 15 Jan 2023 09:29:45 +0000</pubDate><guid isPermaLink="false">https://it-notes.dragas.net/2023/01/15/deploying-a-piece-of-the-fediverse/</guid><category>fediverse</category><category>mastodon</category><category>freebsd</category><category>linux</category><category>docker</category><category>gotosocial</category><category>snac2</category><category>snac</category><category>mangane</category><category>twitter</category><category>facebook</category><category>social</category><category>hosting</category><category>server</category><category>web</category><category>akkoma</category><category>pleroma</category><category>elk</category><category>pixelfed</category><category>funkwhale</category><category>peertube</category><category>enafore</category></item><item><title>Installing Mastodon inside a FreeBSD jail: A Comprehensive Guide</title><link>https://it-notes.dragas.net/2022/11/23/installing-mastodon-on-a-freebsd-jail/</link><description>&lt;p&gt;&lt;img src="https://images.unsplash.com/photo-1611926653458-09294b3142bf?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDR8fHNvY2lhbCUyMG5ldHdvcmt8ZW58MHx8fHwxNjY5MTI0MzQ5&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="Installing Mastodon inside a FreeBSD jail: A Comprehensive Guide"&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Note: Updated for Mastodon 4.5&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/mastodon/mastodon"&gt;Mastodon&lt;/a&gt; and the Fediverse have gained significant popularity, especially during times of uncertainty with traditional social media platforms. As users seek alternative spaces, many are discovering the decentralized nature of Mastodon instances. However, this influx of users has led to challenges for unprepared instances, including performance issues and moderation difficulties.&lt;/p&gt;
&lt;p&gt;This guide aims to provide a comprehensive walkthrough for installing Mastodon on a FreeBSD jail, managed by &lt;a href="https://bastillebsd.org"&gt;BastilleBSD&lt;/a&gt;. While Mastodon documentation tends to be Linux-centric, this tutorial fills the gap for FreeBSD users.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This guide describes a simple, single-jail installation. For production environments, &lt;a href="https://wiki.bsd.cafe/bsdcafe-technical-details"&gt;it's recommended to separate services&lt;/a&gt; (Valkey, PostgreSQL, etc.) into individual jails. This tutorial assumes a basic understanding of FreeBSD and Unix-like systems.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A FreeBSD system with BastilleBSD installed&lt;/li&gt;
&lt;li&gt;Basic knowledge of FreeBSD jail management&lt;/li&gt;
&lt;li&gt;Familiarity with command-line operations&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Step 1: Creating the Jail&lt;/h2&gt;
&lt;p&gt;Let's start by creating a new jail using BastilleBSD:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;bastille create mdontest 14.3-RELEASE 10.0.0.42 bastille0
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 2: Configuring the Jail&lt;/h2&gt;
&lt;p&gt;As we'll be installing PostgreSQL in the jail, we need to add some configurations to the jail's &lt;code&gt;jail.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;sysvmsg=new;
sysvsem=new;
sysvshm=new;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After adding these lines, restart the jail:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;bastille restart mdontest
bastille console mdontest
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 3: Installing Dependencies&lt;/h2&gt;
&lt;p&gt;Now, let's install the necessary packages:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;pkg install -y curl wget gnupg gmake git-lite vips node22 yarn-node22 postgresql18-server postgresql18-contrib ImageMagick7 ffmpeg autoconf nginx valkey py311-certbot py311-certbot-nginx sudo rubygem-bundler rubygem-posix-spawn
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 4: Enabling and Configuring Services&lt;/h2&gt;
&lt;p&gt;Enable Valkey, Nginx, and PostgreSQL:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;service valkey enable
service nginx enable
service postgresql enable
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Valkey Configuration&lt;/h3&gt;
&lt;p&gt;For simplicity in this jail environment, we'll disable Valkey's protected mode. However, this is not recommended for production environments without proper security measures.&lt;/p&gt;
&lt;p&gt;Edit &lt;code&gt;/usr/local/etc/valkey.conf&lt;/code&gt; and set:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;protected-mode no
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: In a production environment, ensure proper authentication and network security measures are in place before disabling protected mode.&lt;/p&gt;
&lt;h3&gt;PostgreSQL Initialization and Configuration&lt;/h3&gt;
&lt;p&gt;Initialize the PostgreSQL database:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;service postgresql initdb
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Modify PostgreSQL to accept connections from the jail's services. Edit &lt;code&gt;/var/db/postgres/data18/pg_hba.conf&lt;/code&gt; and add:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;host    all    all    10.0.0.42/32    trust
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: In a production environment, consider using more restrictive authentication methods.&lt;/p&gt;
&lt;p&gt;Start PostgreSQL and Valkey:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;service postgresql start
service valkey start
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 5: Database Setup&lt;/h2&gt;
&lt;p&gt;Create the Mastodon database user:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;sudo -u postgres psql
CREATE USER mastodon CREATEDB;
\q
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 6: Creating the Mastodon User&lt;/h2&gt;
&lt;p&gt;Create a dedicated user for Mastodon:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;pw add user mastodon -m
echo 'export LC_ALL=&amp;quot;en_US.UTF-8&amp;quot;' &amp;gt;&amp;gt; /home/mastodon/.profile
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 7: Installing Mastodon&lt;/h2&gt;
&lt;p&gt;Enable corepack, switch to the Mastodon user and install the software:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;corepack enable
su -l mastodon
git clone https://github.com/mastodon/mastodon.git live &amp;amp;&amp;amp; cd live
git checkout $(git tag -l | grep '^v[0-9.]*$' | sort -V | tail -n 1)
corepack prepare
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install Ruby and Node dependencies:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;export CONFIGURE_ARGS=&amp;quot;--with-cflags=\&amp;quot;-Wno-error=incompatible-function-pointer-types\&amp;quot;&amp;quot;
export NODE_OPTIONS=&amp;quot;--openssl-legacy-provider&amp;quot;
bundle config deployment 'true'
bundle config without 'development test'
bundle install -j$(getconf _NPROCESSORS_ONLN)
yarn install --immutable
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 8: Mastodon Setup&lt;/h2&gt;
&lt;p&gt;Run the Mastodon setup command:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;RAILS_ENV=production bundle exec rake mastodon:setup
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When prompted for the PostgreSQL host, enter &lt;code&gt;127.0.0.1&lt;/code&gt; (or &lt;code&gt;10.0.0.42&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Mastodon can now use &lt;a href="https://www.libvips.org/"&gt;libvips&lt;/a&gt; as a lighter and more modern alternative to ImageMagick.
ImageMagick support is being deprecated, so it's suggested to switch to libvips.&lt;/p&gt;
&lt;p&gt;To use libvips instead of ImageMagick, set the MASTODON_USE_LIBVIPS environment variable to true into the .env.production:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code&gt;[...]
MASTODON_USE_LIBVIPS=true
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Step 9: Nginx Configuration&lt;/h2&gt;
&lt;p&gt;In the &lt;code&gt;dist/&lt;/code&gt; directory, you'll find an &lt;code&gt;nginx.conf&lt;/code&gt; file. This is not a complete Nginx configuration but a partial one for Mastodon. Integrate this with your existing Nginx setup based on your specific requirements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Many administrators advise against exposing Mastodon through Cloudflare, as it may interfere with some APIs and disrupt Fediverse interactions.&lt;/p&gt;
&lt;h2&gt;Step 10: Creating FreeBSD RC Scripts&lt;/h2&gt;
&lt;p&gt;To manage Mastodon services on FreeBSD, we'll create custom rc scripts. You can find the scripts for &lt;a href="https://raw.githubusercontent.com/draga79/binrepo/main/mastodon_sidekiq"&gt;mastodon_sidekiq&lt;/a&gt;, &lt;a href="https://raw.githubusercontent.com/draga79/binrepo/main/mastodon_web"&gt;mastodon_web&lt;/a&gt;, and &lt;a href="https://raw.githubusercontent.com/draga79/binrepo/main/mastodon_streaming"&gt;mastodon_streaming&lt;/a&gt; at the provided links.&lt;/p&gt;
&lt;p&gt;Place these scripts in the &lt;code&gt;/usr/local/etc/rc.d/&lt;/code&gt; directory, make them executable (&lt;code&gt;chmod a+rx /usr/local/etc/rc.d/mastodon_*&lt;/code&gt;) and enable them:&lt;/p&gt;
&lt;pre class="highlight"&gt;&lt;code class="language-bash"&gt;service mastodon_sidekiq enable
service mastodon_web enable
service mastodon_streaming enable
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Restart the jail or start the services individually. Logs will be appended to &lt;code&gt;/var/log/messages&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You now have a functioning Mastodon instance running in a FreeBSD jail. All services are run by the "&lt;a href="https://www.freebsd.org/cgi/man.cgi?daemon(8)"&gt;daemon&lt;/a&gt;" user and are supervised.&lt;/p&gt;
&lt;p&gt;Remember to regularly update your Mastodon instance and monitor its performance. For production environments, consider implementing additional security measures and potentially separating services into individual jails.&lt;/p&gt;
&lt;p&gt;If you want to change the characters or poll limits, you can &lt;a href="https://it-notes.dragas.net/2024/10/09/2024-modifying-limits-in-mastodon-4-3/"&gt;refer to this article&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Enjoy your new Mastodon instance!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefano Marinelli</dc:creator><pubDate>Wed, 23 Nov 2022 07:52:02 +0000</pubDate><guid isPermaLink="false">https://it-notes.dragas.net/2022/11/23/installing-mastodon-on-a-freebsd-jail/</guid><category>freebsd</category><category>container</category><category>hosting</category><category>jail</category><category>networking</category><category>server</category><category>tutorial</category><category>web</category><category>fediverse</category><category>mastodon</category><category>ownyourdata</category></item></channel></rss>