<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>raspberrypi &amp;mdash; roblog</title>
    <link>https://blog.rstokes.uk/tag:raspberrypi</link>
    <description>Random musings—mostly for me, but you might accidentally find something useful too</description>
    <pubDate>Sun, 24 May 2026 04:59:16 +0100</pubDate>
    <item>
      <title>Categories</title>
      <link>https://blog.rstokes.uk/categories</link>
      <description>&lt;![CDATA[Use these tags to browse related posts.&#xA;&#xA;!--more--&#xA;&#xA;endOfYearReview&#xA;mastodon&#xA;movies&#xA;raspberryPi&#xA;science&#xA;tv]]&gt;</description>
      <content:encoded><![CDATA[<p>Use these tags to browse related posts.</p>



<p><a href="https://blog.rstokes.uk/tag:endOfYearReview" class="hashtag"><span>#</span><span class="p-category">endOfYearReview</span></a>
<a href="https://blog.rstokes.uk/tag:mastodon" class="hashtag"><span>#</span><span class="p-category">mastodon</span></a>
<a href="https://blog.rstokes.uk/tag:movies" class="hashtag"><span>#</span><span class="p-category">movies</span></a>
<a href="https://blog.rstokes.uk/tag:raspberryPi" class="hashtag"><span>#</span><span class="p-category">raspberryPi</span></a>
<a href="https://blog.rstokes.uk/tag:science" class="hashtag"><span>#</span><span class="p-category">science</span></a>
<a href="https://blog.rstokes.uk/tag:tv" class="hashtag"><span>#</span><span class="p-category">tv</span></a></p>
]]></content:encoded>
      <guid>https://blog.rstokes.uk/categories</guid>
      <pubDate>Thu, 01 Jan 2026 00:27:31 +0000</pubDate>
    </item>
    <item>
      <title>Installing Mastodon 4.3 on a Raspberry Pi</title>
      <link>https://blog.rstokes.uk/installing-mastodon-4-3-on-a-raspberry-pi</link>
      <description>&lt;![CDATA[Although the official Mastodon installation docs are quite thorough, I did find a few quirks when installing on a Raspberry Pi (both 4B and 5). I&#39;ve brought together various guides that I used (sources are cited) into a single set of instructions which have repeatedly worked for me.&#xA;&#xA;!--more--&#xA;&#xA;br&#xA;&#xA;Step 1. Increase the swap file&#xA;&#xA;If you&#39;re using a 4GB Raspberry Pi (4B or 5), you will need to increase the size of the swap file, at least temporarily, otherwise the process (in Step 9) to compile CSS/JS assets may crash. Obviously, the 1GB and 2GB models should not be used here as they lack sufficient memory.&#xA;&#xA;You can set the swap file back to its original size—once Mastodon is installed—by following these steps again, but this is not necessary.&#xA;&#xA;⚠️ &amp;nbsp;If you&#39;re using a Raspberry Pi (4B or 5) with 8GB of RAM, you can safely skip this and move straight on to Step 2.br&#xA;&#xA;Stop the system from using the current swap file:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo dphys-swapfile swapoff/pre&#xA;&#xA;Open the swap file configuration file:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo nano /etc/dphys-swapfile/pre&#xA;&#xA;Find the following line of text within the file (value may vary):&#xA;&#xA;    pre style=&#34;margin-bottom:-22px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;CONFSWAPSIZE=200/pre&#xA;&#xA;    and change the value to 2048 (MB):&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;CONFSWAPSIZE=2048/pre&#xA;&#xA;Save the file by pressing CTRL + X, followed by Y, then Enter.&#xA;&#xA;Re-initialise the swap file (removes the original swap file and recreates it to fit the newly defined size):&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo dphys-swapfile setup/pre&#xA;&#xA;Turn the swap back on:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo dphys-swapfile swapon/pre&#xA;&#xA;Reboot the device to allow all programs to be reloaded with access to the new memory pool:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo reboot/pre&#xA;&#xA;br&#xA;&#xA;Step 2. SSH Keys&#xA;&#xA;Using SSH keys for authentication instead of passwords is a great way of securing the Raspberry Pi, as well as making logins much quicker.br&#xA;&#xA;Find your public SSH key on your computer. On macOS, this will be a file ending .pub in the ~/.ssh directory.&#xA;&#xA;Create a .ssh directory in your home directory on the Raspberry Pi:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;install -d -m 700 ~/.ssh/pre&#xA;&#xA;Create (and edit) an authorizedkeys file in the new directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;nano ~/.ssh/authorizedkeys/pre&#xA;&#xA;Paste the contents of your public SSH key into this file, then save.&#xA;&#xA;Ensure the file has the correct permissions:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo chmod 644 ~/.ssh/authorizedkeys/pre&#xA;&#xA;Ensure the file has the correct owner (if not using pi as the default user, replace it below with the name of your default user):&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo chown pi:pi ~/.ssh/authorizedkeys/pre&#xA;&#xA;br&#xA;&#xA;Step 3. NGINX web server&#xA;&#xA;We want the ability to host other websites on this server so we will use NGINX as a reverse proxy for Mastodon.br&#xA;&#xA;Update the package list and upgrade existing packages:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt update &amp;&amp; sudo apt upgrade/pre&#xA;&#xA;Install NGINX:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt install -y nginx/pre&#xA;&#xA;Start the NGINX service:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo systemctl start nginx/pre&#xA;&#xA;Install PHP-FPM and recommended PHP modules:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt install -y php8.2-fpm php8.2-mbstring php8.2-mysql php8.2-curl php8.2-gd php8.2-zip php8.2-xml/pre&#xA;&#xA;br&#xA;&#xA;Step 4. SSL certificates&#xA;&#xA;I am using Cloudflare for DNS and tunnelling so I need to follow these steps to create and deploy an Origin CA certificate.&#xA;&#xA;⚠️ &amp;nbsp;If you don&#39;t use Cloudflare, install your own SSL certificate here instead of following the exact instructions below.br&#xA;&#xA;Log in to the Cloudflare dashboard and select an account.&#xA;&#xA;Choose your domain.&#xA;&#xA;Go to SSL/TLS   Origin Server.&#xA;&#xA;Select Create Certificate.&#xA;&#xA;Choose Generate private key and CSR with Cloudflare and leave all other options as they are. Click the Create button.&#xA;&#xA;Ensure the Key Format is PEM and then copy the signed Origin Certificate and Private Key into separate .pem and .key files. Click the OK button.&#xA;&#xA;Copy the .pem and .key files to your Raspberry Pi in the /etc/ssl directory.&#xA;&#xA;Change the owner of both files to root:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo chown root:root /etc/ssl/filename.key /etc/ssl/filename.pem/pre&#xA;&#xA;Restart NGINX:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo systemctl restart nginx/pre&#xA;&#xA;10. Back in the Cloudflare dashboard, go to SSL/TLS   Overview and click Configure. Under the option Custom SSL/TLS click Select. Change the option to Full (Strict) and click Save.&#xA;&#xA;br&#xA;&#xA;Step 5. Mastodon pre-installationbr&#xA;&#xA;Update and upgrade system packages:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt update &amp;&amp; sudo apt upgrade/pre&#xA;&#xA;Install dependencies:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt install -y curl lsb-release imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev nginx redis-server redis-tools certbot python3-certbot-nginx libidn11-dev libicu-dev libjemalloc-dev/pre&#xA;&#xA;Create a mastodon user:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo useradd mastodon -m/pre&#xA;&#xA;br&#xA;&#xA;Step 6. Install NodeJSbr&#xA;&#xA;Update the package list and upgrade existing packages:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt update &amp;&amp; sudo apt upgrade/pre&#xA;&#xA;To ensure we have all of the packages we need to access the Nodesource repository, run the following command:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt install -y ca-certificates curl gnupg/pre&#xA;&#xA;Download the Nodesource GPG key and store it within the /usr/share/keyrings directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;curl -fsSL httpsnolink://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/nodesource.gpg/pre&#xA;&#xA;Set an environment variable that we will reference next:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;NODEMAJOR=20/pre&#xA;&#xA;Add the NodeJS repository to your sources list:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;echo &#34;deb [signed-by=/usr/share/keyrings/nodesource.gpg] httpsnolink://deb.nodesource.com/node$NODEMAJOR.x nodistro main&#34; | sudo tee /etc/apt/sources.list.d/nodesource.list/pre&#xA;&#xA;Since we made changes to the sources list, we need to update the package list:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt update/pre&#xA;&#xA;Install the NodeJS package:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt install -y nodejs/pre&#xA;&#xA;br&#xA;&#xA;Step 7. Install PostgreSQL (and enable Yarn)br&#xA;&#xA;Save the GPG key for the PostgreSQL repository:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;curl -L httpsnolink://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /usr/share/keyrings/postgresql-archive-keyring.gpg   /dev/null/pre&#xA;&#xA;Add the repository to our sources list:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;echo &#34;deb [arch=arm64 signed-by=/usr/share/keyrings/postgresql-archive-keyring.gpg] httpnolink://apt.postgresql.org/pub/repos/apt $(lsbrelease -cs)-pgdg main&#34; | sudo tee  /etc/apt/sources.list.d/postgresql.list/pre&#xA;&#xA;As we changed the available repositories, we need to update the package list cache again:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt update/pre&#xA;&#xA;Install the PostgreSQL package:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo apt install -y postgresql postgresql-contrib/pre&#xA;&#xA;Launch the PostgreSQL command line interface (CLI):&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo -u postgres psql/pre&#xA;&#xA;Create a PostgreSQL user named mastodon:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;CREATE USER mastodon CREATEDB;/pre&#xA;&#xA;Quit out of the CLI:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;\q/pre&#xA;&#xA;To build and run Mastodon, we need to enable Yarn (the NodeJS package manager). Do this now:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo corepack enable &amp;&amp; sudo yarn set version classic/pre&#xA;&#xA;br&#xA;&#xA;Step 8. Install Rubybr&#xA;&#xA;Switch to the mastodon user:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo su mastodon/pre&#xA;&#xA;Change to the home directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;cd ~/pre&#xA;&#xA;Clone the code repository for the rbenv utility:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;git clone httpsnolink://github.com/rbenv/rbenv.git ~/.rbenv/pre&#xA;&#xA;Clone the code repository for the ruby-build plugin:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;git clone httpsnolink://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build/pre&#xA;&#xA;Adjust the .bashrc file to initialise the rbenv utility to set up the Ruby environment:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;echo &#39;eval &#34;$(~/.rbenv/bin/rbenv init - bash)&#34;&#39;     ~/.bashrc/pre&#xA;&#xA;To ensure the changes we made are available immediately:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;exec bash/pre&#xA;&#xA;Install Ruby 3.3.5:&#xA;&#xA;    pre style=&#34;margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;RUBYCONFIGUREOPTS=--with-jemalloc rbenv install 3.3.5/pre&#xA;&#xA;    ##### ⚠️ &amp;nbsp;This step can take a long time to complete.&#xA;&#xA;Declare the installed Ruby version 3.3.5 as the global version to use:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;rbenv global 3.3.5/pre&#xA;&#xA;Use the Ruby package manager to install bundler:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;gem install bundler --no-document/pre&#xA;&#xA;br&#xA;&#xA;Step 9. Install Mastodonbr&#xA;&#xA;Make sure that you are still running as the mastodon user; switch to that user now, if not:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo su mastodon/pre&#xA;&#xA;Change to the home directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;cd ~/pre&#xA;&#xA;Clone the code repository for Mastodon, then change to the new live directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;git clone httpsnolink://github.com/mastodon/mastodon.git live &amp;&amp; cd live/pre&#xA;&#xA;Change to the latest stable release of Mastodon:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;git checkout $(git tag -l | grep &#39;^v[0-9.]$&#39; | sort -V | tail -n 1)/pre&#xA;&#xA;Set the deployment option to true and exclude any packages that are only used for development or test purposes:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;bundle config deployment &#39;true&#39; &amp;&amp; bundle config without &#39;development test&#39;/pre&#xA;&#xA;Install all of the Ruby dependencies for Mastodon:&#xA;&#xA;    pre style=&#34;margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;bundle install -j$(nproc)/pre&#xA;&#xA;    Note: we use the -j option to tell the package manager to use as many CPU cores as we have.&#xA;&#xA;Install all of the NodeJS dependencies for Mastodon:&#xA;&#xA;    pre style=&#34;margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;yarn install/pre&#xA;&#xA;    ##### ⚠️ &amp;nbsp;You can safely ignore any warnings thrown here.&#xA;&#xA;Configure Mastodon:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;RAILSENV=production bundle exec rake mastodon:setup/pre&#xA;&#xA;Follow the on-screen prompts for how you would like to set up Mastodon. You can leave the PostgreSQL and Redis options as default (just press Enter on each option).&#xA;&#xA;10. Switch back to your default user:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;exit/pre&#xA;&#xA;11. Update the default NGINX host file using the template provided on the Mastodon docs website, or replace the file with a copy of a previously backed-up host file.&#xA;&#xA;12. Reload NGINX web server:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo systemctl reload nginx/pre&#xA;&#xA;13. Copy the systemd services for Mastodon to the relevant directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo cp /home/mastodon/live/dist/mastodon-.service /etc/systemd/system//pre&#xA;&#xA;14. Start the services now and enable them to start automatically at logon in future:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo systemctl enable --now mastodon-web mastodon-sidekiq mastodon-streaming/pre&#xA;&#xA;br&#xA;&#xA;Step 10. Post-installation customisation (optional)br&#xA;&#xA;Import a blocklist&#xA;&#xA;Download this blocklist.&#xA;&#xA;In Mastodon, go to Moderation   Federation and click on the Import button at the top of the page.&#xA;&#xA;Choose the blocklist file you previously downloaded and click Upload.&#xA;&#xA;You should now see a long list of domain blocks. Make sure the Select All checkbox is selected and then click on Import.&#xA;br&#xA;&#xA;Change the maximum post length and poll limit&#xA;&#xA;Switch to the mastodon user:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo su mastodon/pre&#xA;&#xA;Change to the home directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;cd ~/pre&#xA;&#xA;Edit the compose\form\container.js file:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;nano -w live/app/javascript/mastodon/features/compose/containers/composeformcontainer.js/pre&#xA;&#xA;Search for the line:&#xA;&#xA;    pre style=&#34;margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;maxChars: state.getIn([&#39;server&#39;, &#39;server&#39;, &#39;configuration&#39;, &#39;statuses&#39;, &#39;maxcharacters&#39;], 500)/pre&#xA;&#xA;    and change the value 500 to the new limit (e.g. 2000).&#xA;&#xA;Save the file by pressing CTRL + X, followed by Y, then Enter.&#xA;&#xA;Edit the status\length\validator.rb file:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;nano -w live/app/validators/statuslengthvalidator.rb/pre&#xA;&#xA;Search for the line:&#xA;&#xA;    pre style=&#34;margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;MAXCHARS = 500/pre&#xA;&#xA;    and change the value 500 to the same new limit as above.&#xA;&#xA;Save the file by pressing CTRL + X, followed by Y, then Enter.&#xA;&#xA;Edit the poll\options\validator.rb file:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;nano -w live/app/validators/polloptionsvalidator.rb/pre&#xA;&#xA;10. Search for the line:&#xA;&#xA;    pre style=&#34;margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;MAXOPTIONS = 4/pre&#xA;&#xA;    and change the value 4 to the new limit (e.g. 12).&#xA;&#xA;11. Save the file by pressing CTRL + X, followed by Y, then Enter.&#xA;&#xA;12. Rebuild the assets:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;cd live &amp;&amp; RAILSENV=production bundle exec rails assets:precompile/pre&#xA;&#xA;13. Switch back to the main user:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;exit/pre&#xA;&#xA;14. Restart the Mastodon services:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo systemctl restart mastodon-sidekiq mastodon-web mastodon-streaming/prebr&#xA;&#xA;Change the username, display name, and notes limits&#xA;&#xA;Switch to the mastodon user:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo su mastodon/pre&#xA;&#xA;Change to the home directory:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;cd ~/pre&#xA;&#xA;Edit the account.rb file:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;nano -w live/app/models/account.rb/pre&#xA;&#xA;Search for the following lines and amend as required:&#xA;&#xA;    pre style=&#34;margin-bottom:-50px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;USERNAMELENGTHLIMIT = 30/pre&#xA;&#xA;    pre style=&#34;margin-bottom:-50px;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;DISPLAYNAMELENGTHLIMIT = 30/pre&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;NOTELENGTH_LIMIT = 500/pre&#xA;&#xA;Save the file by pressing CTRL + X, followed by Y, then Enter.&#xA;&#xA;Restart the Mastodon services:&#xA;&#xA;    pre style=&#34;white-space:pre-wrap;font-size:1em;font-weight:bold;&#34;sudo systemctl restart mastodon-sidekiq mastodon-web mastodon-streaming/pre&#xA;&#xA;span style=&#34;font-size:0.85em;&#34;&#xA;https://pimylifeup.com/raspberry-pi-swap-file&#xA;https://pimylifeup.com/raspberry-pi-ssh-keys&#xA;https://pimylifeup.com/raspberry-pi-nginx&#xA;https://developers.cloudflare.com/ssl/origin-configuration/origin-ca &#xA;https://www.digicert.com/kb/csr-ssl-installation/nginx-openssl.htm&#xA;https://pimylifeup.com/raspberry-pi-mastodon&#xA;https://pimylifeup.com/raspberry-pi-nodejs&#xA;https://github.com/sgrigson/oliphant/tree/main/blocklists/mastodon&#xA;https://fouquet.me/2024/10/10/mastodon-4-3-char-limit&#xA;/span&#xA;&#xA;brTags: #mastodon #raspberryPi]]&gt;</description>
      <content:encoded><![CDATA[<p>Although the official Mastodon installation docs are quite thorough, I did find a few quirks when installing on a Raspberry Pi (both 4B and 5). I&#39;ve brought together various guides that I used (sources are cited) into a single set of instructions which have repeatedly worked for me.</p>



<p><br></p>

<h3 id="step-1-increase-the-swap-file">Step 1. Increase the swap file</h3>

<p>If you&#39;re using a <strong>4GB</strong> Raspberry Pi (4B or 5), you will need to increase the size of the swap file, at least temporarily, otherwise the process (in Step 9) to compile CSS/JS assets may crash. Obviously, the 1GB and 2GB models should <strong>not</strong> be used here as they lack sufficient memory.</p>

<p>You can set the swap file back to its original size—once Mastodon is installed—by following these steps again, but this is not necessary.</p>

<h5 id="nbsp-if-you-re-using-a-raspberry-pi-4b-or-5-with-8gb-of-ram-you-can-safely-skip-this-and-move-straight-on-to-step-2-br">⚠️  If you&#39;re using a Raspberry Pi (4B or 5) with 8GB of RAM, you can safely skip this and move straight on to Step 2.<br></h5>
<ol><li><p>Stop the system from using the current swap file:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo dphys-swapfile swapoff</pre></li>

<li><p>Open the swap file configuration file:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo nano /etc/dphys-swapfile</pre></li>

<li><p>Find the following line of text within the file (value may vary):</p>

<pre style="margin-bottom:-22px;white-space:pre-wrap;font-size:1em;font-weight:bold;">CONF_SWAPSIZE=200</pre>

<p>and change the value to 2048 (MB):</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">CONF_SWAPSIZE=2048</pre></li>

<li><p>Save the file by pressing <strong>CTRL + X</strong>, followed by <strong>Y</strong>, then <strong>Enter</strong>.</p></li>

<li><p>Re-initialise the swap file (removes the original swap file and recreates it to fit the newly defined size):</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo dphys-swapfile setup</pre></li>

<li><p>Turn the swap back on:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo dphys-swapfile swapon</pre></li>

<li><p>Reboot the device to allow all programs to be reloaded with access to the new memory pool:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo reboot</pre></li></ol>

<p><br></p>

<h3 id="step-2-ssh-keys">Step 2. SSH Keys</h3>

<p>Using SSH keys for authentication instead of passwords is a great way of securing the Raspberry Pi, as well as making logins much quicker.<br></p>
<ol><li><p>Find your public SSH key on your computer. On macOS, this will be a file ending <strong>.pub</strong> in the <strong>~/.ssh</strong> directory.</p></li>

<li><p>Create a <strong>.ssh</strong> directory in your home directory on the Raspberry Pi:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">install -d -m 700 ~/.ssh</pre></li>

<li><p>Create (and edit) an <strong>authorized_keys</strong> file in the new directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">nano ~/.ssh/authorized_keys</pre></li>

<li><p>Paste the contents of your public SSH key into this file, then save.</p></li>

<li><p>Ensure the file has the correct permissions:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo chmod 644 ~/.ssh/authorized_keys</pre></li>

<li><p>Ensure the file has the correct owner (if not using <strong>pi</strong> as the default user, replace it below with the name of your default user):</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo chown pi:pi ~/.ssh/authorized_keys</pre></li></ol>

<p><br></p>

<h3 id="step-3-nginx-web-server">Step 3. NGINX web server</h3>

<p>We want the ability to host other websites on this server so we will use NGINX as a reverse proxy for Mastodon.<br></p>
<ol><li><p>Update the package list and upgrade existing packages:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt update &amp;&amp; sudo apt upgrade</pre></li>

<li><p>Install NGINX:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt install -y nginx</pre></li>

<li><p>Start the NGINX service:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo systemctl start nginx</pre></li>

<li><p>Install PHP-FPM and recommended PHP modules:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt install -y php8.2-fpm php8.2-mbstring php8.2-mysql php8.2-curl php8.2-gd php8.2-zip php8.2-xml</pre></li></ol>

<p><br></p>

<h3 id="step-4-ssl-certificates">Step 4. SSL certificates</h3>

<p>I am using Cloudflare for DNS and tunnelling so I need to follow these steps to create and deploy an Origin CA certificate.</p>

<h5 id="nbsp-if-you-don-t-use-cloudflare-install-your-own-ssl-certificate-here-instead-of-following-the-exact-instructions-below-br">⚠️  If you don&#39;t use Cloudflare, install your own SSL certificate here instead of following the exact instructions below.<br></h5>
<ol><li><p>Log in to the Cloudflare dashboard and select an account.</p></li>

<li><p>Choose your domain.</p></li>

<li><p>Go to <strong>SSL/TLS &gt; Origin Server</strong>.</p></li>

<li><p>Select <strong>Create Certificate</strong>.</p></li>

<li><p>Choose <strong>Generate private key and CSR with Cloudflare</strong> and leave all other options as they are. Click the <strong>Create</strong> button.</p></li>

<li><p>Ensure the <strong>Key Format</strong> is <strong>PEM</strong> and then copy the signed <strong>Origin Certificate</strong> and <strong>Private Key</strong> into separate <strong>.pem</strong> and <strong>.key</strong> files. Click the <strong>OK</strong> button.</p></li>

<li><p>Copy the <strong>.pem</strong> and <strong>.key</strong> files to your Raspberry Pi in the <strong>/etc/ssl</strong> directory.</p></li>

<li><p>Change the owner of both files to <strong>root</strong>:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo chown root:root /etc/ssl/filename.key /etc/ssl/filename.pem</pre></li>

<li><p>Restart NGINX:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo systemctl restart nginx</pre></li>

<li><p>Back in the Cloudflare dashboard, go to <strong>SSL/TLS &gt; Overview</strong> and click <strong>Configure</strong>. Under the option <strong>Custom SSL/TLS</strong> click <strong>Select</strong>. Change the option to <strong>Full (Strict)</strong> and click <strong>Save</strong>.</p></li></ol>

<p><br></p>

<h3 id="step-5-mastodon-pre-installation-br">Step 5. Mastodon pre-installation<br></h3>
<ol><li><p>Update and upgrade system packages:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt update &amp;&amp; sudo apt upgrade</pre></li>

<li><p>Install dependencies:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt install -y curl lsb-release imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev nginx redis-server redis-tools certbot python3-certbot-nginx libidn11-dev libicu-dev libjemalloc-dev</pre></li>

<li><p>Create a <strong>mastodon</strong> user:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo useradd mastodon -m</pre></li></ol>

<p><br></p>

<h3 id="step-6-install-nodejs-br">Step 6. Install NodeJS<br></h3>
<ol><li><p>Update the package list and upgrade existing packages:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt update &amp;&amp; sudo apt upgrade</pre></li>

<li><p>To ensure we have all of the packages we need to access the Nodesource repository, run the following command:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt install -y ca-certificates curl gnupg</pre></li>

<li><p>Download the Nodesource GPG key and store it within the <strong>/usr/share/keyrings</strong> directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/nodesource.gpg</pre></li>

<li><p>Set an environment variable that we will reference next:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">NODE_MAJOR=20</pre></li>

<li><p>Add the NodeJS repository to your sources list:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">echo &#34;deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main&#34; | sudo tee /etc/apt/sources.list.d/nodesource.list</pre></li>

<li><p>Since we made changes to the sources list, we need to update the package list:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt update</pre></li>

<li><p>Install the NodeJS package:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt install -y nodejs</pre></li></ol>

<p><br></p>

<h3 id="step-7-install-postgresql-and-enable-yarn-br">Step 7. Install PostgreSQL (and enable Yarn)<br></h3>
<ol><li><p>Save the GPG key for the PostgreSQL repository:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">curl -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /usr/share/keyrings/postgresql-archive-keyring.gpg &gt;/dev/null</pre></li>

<li><p>Add the repository to our sources list:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">echo &#34;deb [arch=arm64 signed-by=/usr/share/keyrings/postgresql-archive-keyring.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main&#34; | sudo tee  /etc/apt/sources.list.d/postgresql.list</pre></li>

<li><p>As we changed the available repositories, we need to update the package list cache again:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt update</pre></li>

<li><p>Install the PostgreSQL package:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo apt install -y postgresql postgresql-contrib</pre></li>

<li><p>Launch the PostgreSQL command line interface (CLI):</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo -u postgres psql</pre></li>

<li><p>Create a PostgreSQL user named <strong>mastodon</strong>:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">CREATE USER mastodon CREATEDB;</pre></li>

<li><p>Quit out of the CLI:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">\q</pre></li>

<li><p>To build and run Mastodon, we need to enable Yarn (the NodeJS package manager). Do this now:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo corepack enable &amp;&amp; sudo yarn set version classic</pre></li></ol>

<p><br></p>

<h3 id="step-8-install-ruby-br">Step 8. Install Ruby<br></h3>
<ol><li><p>Switch to the <strong>mastodon</strong> user:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo su mastodon</pre></li>

<li><p>Change to the <em>home</em> directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">cd ~</pre></li>

<li><p>Clone the code repository for the <em>rbenv</em> utility:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">git clone https://github.com/rbenv/rbenv.git ~/.rbenv</pre></li>

<li><p>Clone the code repository for the <em>ruby-build</em> plugin:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build</pre></li>

<li><p>Adjust the <em>.bashrc</em> file to initialise the <em>rbenv</em> utility to set up the Ruby environment:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">echo &#39;eval &#34;$(~/.rbenv/bin/rbenv init - bash)&#34;&#39; &gt;&gt; ~/.bashrc</pre></li>

<li><p>To ensure the changes we made are available immediately:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">exec bash</pre></li>

<li><p>Install Ruby 3.3.5:</p>

<pre style="margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;">RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.3.5</pre>

<h5 id="nbsp-this-step-can-take-a-long-time-to-complete">⚠️  This step can take a long time to complete.</h5></li>

<li><p>Declare the installed Ruby version 3.3.5 as the global version to use:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">rbenv global 3.3.5</pre></li>

<li><p>Use the Ruby package manager to install <em>bundler</em>:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">gem install bundler --no-document</pre></li></ol>

<p><br></p>

<h3 id="step-9-install-mastodon-br">Step 9. Install Mastodon<br></h3>
<ol><li><p>Make sure that you are still running as the <strong>mastodon</strong> user; switch to that user now, if not:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo su mastodon</pre></li>

<li><p>Change to the <em>home</em> directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">cd ~</pre></li>

<li><p>Clone the code repository for Mastodon, then change to the new <em>live</em> directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">git clone https://github.com/mastodon/mastodon.git live &amp;&amp; cd live</pre></li>

<li><p>Change to the <strong>latest stable release</strong> of Mastodon:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">git checkout $(git tag -l | grep &#39;^v[0-9.]*$&#39; | sort -V | tail -n 1)</pre></li>

<li><p>Set the <em>deployment</em> option to true and exclude any packages that are only used for development or test purposes:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">bundle config deployment &#39;true&#39; &amp;&amp; bundle config without &#39;development test&#39;</pre></li>

<li><p>Install all of the Ruby dependencies for Mastodon:</p>

<pre style="margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;">bundle install -j$(nproc)</pre>

<p><em>Note: we use the -j option to tell the package manager to use as many CPU cores as we have.</em></p></li>

<li><p>Install all of the NodeJS dependencies for Mastodon:</p>

<pre style="margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;">yarn install</pre>

<h5 id="nbsp-you-can-safely-ignore-any-warnings-thrown-here">⚠️  You can safely ignore any warnings thrown here.</h5></li>

<li><p>Configure Mastodon:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">RAILS_ENV=production bundle exec rake mastodon:setup</pre></li>

<li><p>Follow the on-screen prompts for how you would like to set up Mastodon. You can leave the PostgreSQL and Redis options as default (just press <strong>Enter</strong> on each option).</p></li>

<li><p>Switch back to your default user:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">exit</pre></li>

<li><p>Update the default NGINX host file using the template provided on the Mastodon docs website, or replace the file with a copy of a previously backed-up host file.</p></li>

<li><p>Reload NGINX web server:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo systemctl reload nginx</pre></li>

<li><p>Copy the <em>systemd</em> services for Mastodon to the relevant directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo cp /home/mastodon/live/dist/mastodon-*.service /etc/systemd/system/</pre></li>

<li><p>Start the services now and enable them to start automatically at logon in future:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo systemctl enable --now mastodon-web mastodon-sidekiq mastodon-streaming</pre></li></ol>

<p><br></p>

<h3 id="step-10-post-installation-customisation-optional-br">Step 10. Post-installation customisation <em>(optional)</em><br></h3>

<h3 id="import-a-blocklist">Import a blocklist</h3>
<ol><li><p>Download <a href="https://github.com/sgrigson/oliphant/blob/main/blocklists/mastodon/_unified_tier0_blocklist.csv">this blocklist</a>.</p></li>

<li><p>In Mastodon, go to <strong>Moderation</strong> &gt; <strong>Federation</strong> and click on the <strong>Import</strong> button at the top of the page.</p></li>

<li><p>Choose the blocklist file you previously downloaded and click <strong>Upload</strong>.</p></li>

<li><p>You should now see a long list of domain blocks. Make sure the <strong>Select All</strong> checkbox is selected and then click on <strong>Import</strong>.
<br></p></li></ol>

<h3 id="change-the-maximum-post-length-and-poll-limit">Change the maximum post length and poll limit</h3>
<ol><li><p>Switch to the <strong>mastodon</strong> user:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo su mastodon</pre></li>

<li><p>Change to the <em>home</em> directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">cd ~</pre></li>

<li><p>Edit the <em>compose_form_container.js</em> file:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">nano -w live/app/javascript/mastodon/features/compose/containers/compose_form_container.js</pre></li>

<li><p>Search for the line:</p>

<pre style="margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;">maxChars: state.getIn([&#39;server&#39;, &#39;server&#39;, &#39;configuration&#39;, &#39;statuses&#39;, &#39;max_characters&#39;], 500)</pre>

<p>and change the value <strong>500</strong> to the new limit (e.g. 2000).</p></li>

<li><p>Save the file by pressing <strong>CTRL + X</strong>, followed by <strong>Y</strong>, then <strong>Enter</strong>.</p></li>

<li><p>Edit the <em>status_length_validator.rb</em> file:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">nano -w live/app/validators/status_length_validator.rb</pre></li>

<li><p>Search for the line:</p>

<pre style="margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;">MAX_CHARS = 500</pre>

<p>and change the value <strong>500</strong> to the same new limit as above.</p></li>

<li><p>Save the file by pressing <strong>CTRL + X</strong>, followed by <strong>Y</strong>, then <strong>Enter</strong>.</p></li>

<li><p>Edit the <em>poll_options_validator.rb</em> file:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">nano -w live/app/validators/poll_options_validator.rb</pre></li>

<li><p>Search for the line:</p>

<pre style="margin-bottom:-25px;white-space:pre-wrap;font-size:1em;font-weight:bold;">MAX_OPTIONS = 4</pre>

<p>and change the value <strong>4</strong> to the new limit (e.g. 12).</p></li>

<li><p>Save the file by pressing <strong>CTRL + X</strong>, followed by <strong>Y</strong>, then <strong>Enter</strong>.</p></li>

<li><p>Rebuild the assets:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">cd live &amp;&amp; RAILS_ENV=production bundle exec rails assets:precompile</pre></li>

<li><p>Switch back to the main user:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">exit</pre></li>

<li><p>Restart the Mastodon services:</p>

<p><pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo systemctl restart mastodon-sidekiq mastodon-web mastodon-streaming</pre><br></p></li></ol>

<h3 id="change-the-username-display-name-and-notes-limits">Change the username, display name, and notes limits</h3>
<ol><li><p>Switch to the <strong>mastodon</strong> user:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo su mastodon</pre></li>

<li><p>Change to the <em>home</em> directory:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">cd ~</pre></li>

<li><p>Edit the <em>account.rb</em> file:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">nano -w live/app/models/account.rb</pre></li>

<li><p>Search for the following lines and amend as required:</p>

<pre style="margin-bottom:-50px;white-space:pre-wrap;font-size:1em;font-weight:bold;">USERNAME_LENGTH_LIMIT = 30</pre>

<pre style="margin-bottom:-50px;white-space:pre-wrap;font-size:1em;font-weight:bold;">DISPLAY_NAME_LENGTH_LIMIT = 30</pre>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">NOTE_LENGTH_LIMIT = 500</pre></li>

<li><p>Save the file by pressing <strong>CTRL + X</strong>, followed by <strong>Y</strong>, then <strong>Enter</strong>.</p></li>

<li><p>Restart the Mastodon services:</p>

<pre style="white-space:pre-wrap;font-size:1em;font-weight:bold;">sudo systemctl restart mastodon-sidekiq mastodon-web mastodon-streaming</pre></li></ol>

<p><span style="font-size:0.85em;">
1. <a href="https://pimylifeup.com/raspberry-pi-swap-file">https://pimylifeup.com/raspberry-pi-swap-file</a>
2. <a href="https://pimylifeup.com/raspberry-pi-ssh-keys">https://pimylifeup.com/raspberry-pi-ssh-keys</a>
3. <a href="https://pimylifeup.com/raspberry-pi-nginx">https://pimylifeup.com/raspberry-pi-nginx</a>
4. <a href="https://developers.cloudflare.com/ssl/origin-configuration/origin-ca">https://developers.cloudflare.com/ssl/origin-configuration/origin-ca </a>
5. <a href="https://www.digicert.com/kb/csr-ssl-installation/nginx-openssl.htm">https://www.digicert.com/kb/csr-ssl-installation/nginx-openssl.htm</a>
6. <a href="https://pimylifeup.com/raspberry-pi-mastodon">https://pimylifeup.com/raspberry-pi-mastodon</a>
7. <a href="https://pimylifeup.com/raspberry-pi-nodejs">https://pimylifeup.com/raspberry-pi-nodejs</a>
8. <a href="https://github.com/sgrigson/oliphant/tree/main/blocklists/mastodon">https://github.com/sgrigson/oliphant/tree/main/blocklists/mastodon</a>
9. <a href="https://fouquet.me/2024/10/10/mastodon-4-3-char-limit">https://fouquet.me/2024/10/10/mastodon-4-3-char-limit</a>
</span></p>

<p><br>Tags: <a href="https://blog.rstokes.uk/tag:mastodon" class="hashtag"><span>#</span><span class="p-category">mastodon</span></a> <a href="https://blog.rstokes.uk/tag:raspberryPi" class="hashtag"><span>#</span><span class="p-category">raspberryPi</span></a></p>
]]></content:encoded>
      <guid>https://blog.rstokes.uk/installing-mastodon-4-3-on-a-raspberry-pi</guid>
      <pubDate>Sun, 20 Oct 2024 21:02:53 +0000</pubDate>
    </item>
  </channel>
</rss>