{"id":30930,"date":"2019-09-17T16:18:50","date_gmt":"2019-09-17T21:18:50","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=30930"},"modified":"2022-06-03T03:33:28","modified_gmt":"2022-06-03T08:33:28","slug":"how-to-install-mastodon-on-debian-9","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/","title":{"rendered":"How to Install Mastodon on Debian 9"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-31959\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg\" alt=\"\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this tutorial, we will guide and walk you through the process of installing Mastodon on a <a href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\">Debian 9 VPS<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-31961\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/mastodon-debian9-social-network-install-guide.jpg\" alt=\"\" width=\"130\" height=\"140\" \/>Mastodon is an open-source free social network based on the open web protocol. It uses Ruby on Rails for the back-end, and React.js and Redux for the front-end. This social media platform is a lot like Twitter, with a focus towards text and media sharing. This platform being open-source means that you can run a private social network for your and your friends to use privately and with no ads.<\/p>\n<p>This guide should work on other <a title=\"Linux VPS\" href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\" target=\"_blank\" rel=\"noopener noreferrer\">Linux VPS<\/a> systems as well, but it was tested and written for a <a title=\"Debian VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Debian 9 VPS<\/a>. The install process shouldn&#8217;t take too long, the longest part being the compilation process. Let&#8217;s begin with the installation.<br \/>\n<!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a159b99836cd\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a159b99836cd\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Prerequisites\" >Prerequisites:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-1-Install-Required-Packages\" >Step 1: Install Required Packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-2-Install-Nodejs-and-Yarn\" >Step 2: Install Node.js and Yarn<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-3-Install-PostgreSQL\" >Step 3: Install PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-4-Install-Redis\" >Step 4: Install Redis<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-5-Create-a-New-System-User\" >Step 5: Create a New System User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-6-Install-Ruby\" >Step 6: Install Ruby<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-7-Setting-up-Mastodon\" >Step 7: Setting up Mastodon<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-8-Setting-up-Nginx\" >Step 8: Setting up Nginx<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#Step-9-Setting-up-systemd-Services\" >Step 9: Setting up systemd Services<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>A <a href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\">Debian 9 VPS<\/a>.<\/li>\n<li>A user account with sudo privileges, or access to the &#8216;root&#8217; user itself.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Install-Required-Packages\"><\/span>Step 1: Install Required Packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Log in to your VPS via SSH as root or as a sudo user:<\/p>\n<pre>ssh <span style=\"color: #ff0000;\">userame<\/span>@<span style=\"color: #ff0000;\">IP_Address<\/span> -p <span style=\"color: #ff0000;\">Port_Number<\/span><\/pre>\n<p>Replace &#8220;<span style=\"color: #ff0000;\">IP_Address<\/span>&#8221; and &#8220;<span style=\"color: #ff0000;\">Port_Number<\/span>&#8221; with your server&#8217;s respective IP address and SSH port numbers. Additionally, replace &#8220;<span style=\"color: #ff0000;\">username<\/span>&#8221; with &#8216;root&#8217; for the root user, or with the name of the admin account you plan to use.<\/p>\n<p>Once logged in, issue the following commands to update all installed packages to their latest available versions:<\/p>\n<pre>sudo apt-get update\r\nsudo apt-get upgrade<\/pre>\n<p>Install the required packages using the following command:<\/p>\n<pre>sudo apt-get install curl gcc g++ make \\\r\nimagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core \\\r\nlibprotobuf-dev protobuf-compiler pkg-config autoconf \\\r\nbison build-essential libssl-dev libyaml-dev libreadline-dev \\\r\nzlib1g-dev libncurses5-dev libffi-dev libgdbm-dev \\\r\nlibidn11-dev libicu-dev libjemalloc-dev<\/pre>\n<p>These packages cover all of the requirements for Mastodon, from media conversion, to streaming services.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Install-Nodejs-and-Yarn\"><\/span>Step 2: Install Node.js and Yarn<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We will install Node.js and Yarn from their official repositories.<\/p>\n<p>Enable the NodeSource repository with the following curl command:<\/p>\n<pre>curl -sL https:\/\/deb.nodesource.com\/setup_8.x | sudo bash -<\/pre>\n<p>To install Node.js 8.x LTS Carbon and npm, run this next command:<\/p>\n<pre>sudo apt-get install nodejs<\/pre>\n<p>Import the Yarn APT repository\u2019s GPG key and enable it by running:<\/p>\n<pre>curl -sL https:\/\/dl.yarnpkg.com\/debian\/pubkey.gpg | sudo apt-key add -\r\necho \"deb https:\/\/dl.yarnpkg.com\/debian\/ stable main\" | sudo tee \/etc\/apt\/sources.list.d\/yarn.list\r\n<\/pre>\n<p>Install Yarn using the following command:<\/p>\n<pre>sudo apt-get update &amp;&amp; sudo apt-get install yarn<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Install-PostgreSQL\"><\/span>Step 3: Install PostgreSQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Mastodon can use PostgreSQL as its database back-end.<\/p>\n<p>If the PostgreSQL server is not already installed on your server, you can install the latest PostgreSQL version by executing the following command:<\/p>\n<pre>sudo apt-get install postgresql postgresql-contrib<\/pre>\n<p>Once the installation is complete, log in to the PostgreSQL shell:<\/p>\n<pre>sudo -u postgres psql<\/pre>\n<p>Create a new user for the Mastodon instance:<\/p>\n<pre>CREATE USER mastodon CREATEDB;<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Install-Redis\"><\/span>Step 4: Install Redis<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Installing Redis is pretty straightforward, just run the following command:<\/p>\n<pre>sudo apt-get install redis-server<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Create-a-New-System-User\"><\/span>Step 5: Create a New System User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Create a new system user that will run the Mastodon server:<\/p>\n<pre>sudo adduser --home \/opt\/mastodon --disabled-login --gecos 'Mastodon Application' mastodon<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-6-Install-Ruby\"><\/span>Step 6: Install Ruby<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We will install Ruby using the Rbenv script.<\/p>\n<p>Before cloning the rbenv repository, switch to the new mastodon user that we created in the previous step:<\/p>\n<pre>sudo su - mastodon<\/pre>\n<p>Set up &#8216;rbenv&#8217; and &#8216;ruby-build&#8217; with the following commands:<\/p>\n<pre>cd\r\ngit clone https:\/\/github.com\/rbenv\/rbenv.git ~\/.rbenv\r\ncd ~\/.rbenv &amp;&amp; src\/configure &amp;&amp; make -C src\r\necho 'export PATH=\"$HOME\/.rbenv\/bin:$PATH\"' &gt;&gt; ~\/.bashrc\r\necho 'eval \"$(rbenv init -)\"' &gt;&gt; ~\/.bashrc\r\nexec bash\r\ngit clone https:\/\/github.com\/rbenv\/ruby-build.git ~\/.rbenv\/plugins\/ruby-build\r\n<\/pre>\n<p>Once both &#8216;rbenv&#8217; and &#8216;ruby-build&#8217; are set, install the latest Ruby version with:<\/p>\n<pre>RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.6.1\r\nrbenv global 2.6.1\r\n<\/pre>\n<p>Update the gem and install bundler so that they work with the version of rbenv that we just installed.:<\/p>\n<pre>gem update --system\r\ngem install bundler --no-document\r\n<\/pre>\n<p>To verify everything is done correctly, use the command <code>ruby --version<\/code>.<\/p>\n<p>The output should be similar to the following:<\/p>\n<pre>ruby --version\r\nruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-7-Setting-up-Mastodon\"><\/span>Step 7: Setting up Mastodon<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The following commands are also run as mastodon user.<\/p>\n<p>Clone the mastodon git repository into the <code>~\/live<\/code> directory and checkout to the latest stable Mastodon branch:<\/p>\n<pre>cd\r\ngit clone https:\/\/github.com\/tootsuite\/mastodon.git ~\/live\r\ncd ~\/live\r\ngit checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)\r\n<\/pre>\n<p>Install the ruby dependencies with the following command:<\/p>\n<pre>bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test<\/pre>\n<p>Install the node.js dependencies with:<\/p>\n<pre>yarn install --pure-lockfile<\/pre>\n<p>Change to the Mastodon installation directory and run the following command to start the setup:<\/p>\n<pre>cd ~\/live\r\nRAILS_ENV=production bundle exec rake mastodon:setup<\/pre>\n<p>The installer will ask you several questions, generate a new app secret, set up the database schema, and compile the assets. This may take a while, depending on your server&#8217;s hardware:<\/p>\n<pre>Your instance is identified by its domain name. Changing it afterward will break things.\r\nDomain name: your-domain.com\r\n\r\nSingle user mode disables registrations and redirects the landing page to your public profile.\r\nDo you want to enable single user mode? No\r\n\r\nAre you using Docker to run Mastodon? no\r\n\r\nPostgreSQL host: \/var\/run\/postgresql\r\nPostgreSQL port: 5432\r\nName of PostgreSQL database: mastodon_production\r\nName of PostgreSQL user: mastodon\r\nPassword of PostgreSQL user:\r\nDatabase configuration works! &#x1f386;\r\n\r\nRedis host: localhost\r\nRedis port: 6379\r\nRedis password:\r\nRedis configuration works! &#x1f386;\r\n\r\nDo you want to store uploaded files on the cloud? No\r\n\r\nDo you want to send e-mails from localhost? yes\r\nE-mail address to send e-mails \"from\": Mastodon &lt;notifications@your-domain.com&gt;\r\nSend a test e-mail with this configuration right now? no\r\n\r\nThis configuration will be written to .env.production\r\nSave configuration? Yes\r\n\r\nNow that configuration is saved, the database schema must be loaded.\r\nIf the database already exists, this will erase its contents.\r\nPrepare the database now? Yes\r\nRunning `RAILS_ENV=production rails db:setup` ...\r\n\r\nCreated database 'mastodon_production'\r\n\r\n...\r\n\r\nDone!\r\n\r\nThe final step is compiling CSS\/JS assets.\r\nThis may take a while and consume a lot of RAM.\r\nCompile the assets now? Yes\r\nRunning `RAILS_ENV=production rails assets:precompile` ...\r\n\r\nyarn install v1.9.4\r\n\r\n...\r\n\r\nUsing \/opt\/mastodon\/live\/config\/webpacker.yml file for setting up webpack paths\r\nCompiling\u2026\r\n  Compiled all packs in \/opt\/mastodon\/live\/public\/packs\r\n  Rendering errors\/500.html.haml within layouts\/error\r\n  Rendered errors\/500.html.haml within layouts\/error (2596.9ms)\r\nDone!\r\n\r\nAll done! You can now power on the Mastodon server &#x1f418;\r\n\r\nDo you want to create an admin user straight away? Yes\r\nUsername: admin\r\nE-mail: admin@your-domain.com\r\nYou can login with the password: 7594c5bab89c1f0b0e47438f6074fb02\r\nYou can change your password once you login.\r\n<\/pre>\n<p>When done, switch back to your sudo user by running:<\/p>\n<pre>exit<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-8-Setting-up-Nginx\"><\/span>Step 8: Setting up Nginx<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Install Nginx and Certbot using the following command:<\/p>\n<pre>sudo apt-get install nginx certbot<\/pre>\n<p>Once Nginx is installed, copy the Nginx configuration template from the Mastodon installation directory:<\/p>\n<pre>sudo cp \/opt\/mastodon\/live\/dist\/nginx.conf \/etc\/nginx\/sites-available\/mastodon.conf\r\nsudo ln -s \/etc\/nginx\/sites-available\/mastodon.conf \/etc\/nginx\/sites-enabled\/mastodon.conf\r\n<\/pre>\n<p>Run the following command to change the Mastodon installation directory path and the domain name. Don&#8217;t forget to replace &#8216;<span style=\"color: #ff0000;\">your-domain.com<\/span>&#8216; with your registered domain name:<\/p>\n<pre>sudo sed -i 's\/home\/opt\/g' \/etc\/nginx\/sites-enabled\/mastodon.conf\r\nsudo sed -i 's\/example.com\/<span style=\"color: #ff0000;\">your-domain.com<\/span>\/g' \/etc\/nginx\/sites-enabled\/mastodon.conf\r\n<\/pre>\n<p>Restart Nginx for changes to take effect:<\/p>\n<pre>sudo systemctl restart nginx\r\n<\/pre>\n<p>Next, use certbot to get a free SSL certificate using Let&#8217;s Encrypt:<\/p>\n<pre>sudo certbot --nginx -d <span style=\"color: #ff0000;\">your-domain.com\r\n<\/span><\/pre>\n<p>The toll will obtain a free Let&#8217;s encrypt SSL certificate and reconfigure the Nginx configuration.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-9-Setting-up-systemd-Services\"><\/span>Step 9: Setting up systemd Services<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Copy the systemd unit files from the Mastodon directory:<\/p>\n<pre>sudo cp \/opt\/mastodon\/live\/dist\/mastodon-*.service \/etc\/systemd\/system\/\r\n<\/pre>\n<p>Run the following command to change the Mastodon installation directory path:<\/p>\n<pre>sudo sed -i 's\/home\/opt\/g' \/etc\/systemd\/system\/mastodon-*.service\r\n<\/pre>\n<p>Finally, start and enable the new systemd services:<\/p>\n<pre>for i in mastodon-web mastodon-sidekiq mastodon-streaming; do\r\n   sudo systemctl start $i\r\n   sudo systemctl enable $i\r\ndone\r\n<\/pre>\n<p>At this point, you can open your domain in the browser and finish up the Mastodon install.<\/p>\n<p>That\u2019s it. You have successfully installed Mastodon on your <a href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\">Debian 9 VPS<\/a>. For more information about how to manage your Mastodon installation, please refer to the official Mastodon documentation.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-31963\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/managed-mastodon-support-from-expert-admins-on-debian9.jpg\" alt=\"\" width=\"160\" height=\"47\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/managed-mastodon-support-from-expert-admins-on-debian9.jpg 160w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/managed-mastodon-support-from-expert-admins-on-debian9-150x44.jpg 150w\" sizes=\"(max-width: 160px) 100vw, 160px\" \/>Of course, you don\u2019t have to do any of this if you use one of our <a title=\"linux vps hosting\" href=\"https:\/\/www.rosehosting.com\/vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24&#215;7 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post, please share it with your friends on the social networks using the share shortcuts below, or simply leave a comment down in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will guide and walk you through the process of installing Mastodon on a Debian 9 VPS. &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install Mastodon on Debian 9\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#more-30930\" aria-label=\"Read more about How to Install Mastodon on Debian 9\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":31959,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700],"tags":[1753],"class_list":["post-30930","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","tag-mastodon","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install Mastodon on Debian 9 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Install Mastodon on Debian 9 | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Mastodon on Debian 9\" \/>\n<meta property=\"og:description\" content=\"How to Install Mastodon on Debian 9 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-17T21:18:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:33:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install Mastodon on Debian 9\",\"datePublished\":\"2019-09-17T21:18:50+00:00\",\"dateModified\":\"2022-06-03T08:33:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/\"},\"wordCount\":828,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-mastodon-on-debian9.jpg\",\"keywords\":[\"Mastodon\"],\"articleSection\":[\"Debian\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/\",\"name\":\"How to Install Mastodon on Debian 9 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-mastodon-on-debian9.jpg\",\"datePublished\":\"2019-09-17T21:18:50+00:00\",\"dateModified\":\"2022-06-03T08:33:28+00:00\",\"description\":\"How to Install Mastodon on Debian 9 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-mastodon-on-debian9.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/how-to-install-mastodon-on-debian9.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mastodon-on-debian-9\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Mastodon on Debian 9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install Mastodon on Debian 9 | RoseHosting","description":"How to Install Mastodon on Debian 9 | RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Mastodon on Debian 9","og_description":"How to Install Mastodon on Debian 9 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2019-09-17T21:18:50+00:00","article_modified_time":"2022-06-03T08:33:28+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install Mastodon on Debian 9","datePublished":"2019-09-17T21:18:50+00:00","dateModified":"2022-06-03T08:33:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/"},"wordCount":828,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg","keywords":["Mastodon"],"articleSection":["Debian"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/","name":"How to Install Mastodon on Debian 9 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg","datePublished":"2019-09-17T21:18:50+00:00","dateModified":"2022-06-03T08:33:28+00:00","description":"How to Install Mastodon on Debian 9 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-install-mastodon-on-debian9.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mastodon-on-debian-9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Mastodon on Debian 9"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/30930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=30930"}],"version-history":[{"count":1,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/30930\/revisions"}],"predecessor-version":[{"id":41698,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/30930\/revisions\/41698"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/31959"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=30930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=30930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=30930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}