Comments on How to Install Mastodon Social Network on Ubuntu 22.04
Mastodon is free and open-source software for running self-hosted social networking services. It offers microblogging features that allow you to follow other users and post messages and images with Mastodon. In this tutorial, we will show you how to install Mastodon on Ubuntu 22.04.
23 Comment(s)
Comments
Still no deb package ready for installation?
I followed your instructions but needed to make a few small tweaks.
1. the cert thing really threw me for a bit. Turns out you get a chicken and egg problem with nginx https://github.com/mastodon/mastodon/discussions/17372
so I first issued the sudo certbot certonly --standalone -d myserver.com
then continued on to the cerbot in your example and saying to the prompt that it should just keep the one I already had.
Then I started nginx.
A final thing I needed to do was adjust permissions. The /home/mastodon directory was not configured for execute access for other so I set it up to 755.
mastodon@anywise:~/live$ yarn install --pure-lockfileUsage: yarn [options]yarn: error: no such option: --pure-lockfilemastodon@anywise:~/live$ yarn install00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'mastodon@anywise:~/live$
Help!
cd ~/.rbenv && src/configure && make -C src
gave the following error
"cd ~/.rbenv && src/configure && make -C src
make: Entering directory '/home/mastodon/.rbenv/src'
Warning: this Makefile is obsolete and kept only for backwards compatibility.
You can remove the `configure && make ...' step from your rbenv setup.
make: Leaving directory '/home/mastodon/.rbenv/src'"
starting today
Skipped this step and ran the other steps seemed to work ok.
(Once in this guide I had to close the shell manually.. as your command did... nothing. somewhere before the ruby install)
Before install Ruby.. do yourself a favor and do this:
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
Thank you Hitesh so much for all your tutorials. You have helped me a great dean in the past.
On this particular case, I felt like there was a lot of copy and paste from a previous tutorial (I know some of that is a good thing), some versions in the commands did not match the referenced output. (I.e: RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.4 your expected output shows 3.0.3). This is sort of minor but it could avoid confusion.
I gave up for now on making this work as I had issues with the PGP keys sections and completely failed the certbot ppa add and installation.
Please review the entire tutorial and if possible you might want to redo it from scratch with many sample outputs. The reason I took the time to write this comment was to thank you and to say that you are on to something with Mastodon. I think Mastodon is a really big deal and your work on improving this is very much appreciated. Thanks again.
Thank you for the notice, the guide has been updated again. We missed updating the command output at the time we last tested and updated it to use a later Ruby version and we now switched to using snap for certbot as some users seem to have issues with the other installation method.
I followed your instructions exactly, and get this error. I have worked in IT for 20 years, so this should not be as hard as it is. Try following your guidance on a brand new Ubuntu VM and you will run into the same problem.
root@Mast01:~# systemctl restart nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
Thanks for this...
At the end of all these steps, I needed to cd /var/www/mastodon and chown -R www-data:mastodon mastodon/
Otherwise, ngnix cannot access the files.
Also, would appreciate some hints for the ngnix configuration file to permit the server to run behind an HAProxy that is doing SSL offloading.
Nice tutorial!
Hi
Thank you for providing this how to
I have done the install but my page only displays a blank page with the black and blue mastodon logos, no sign in options for mastodon.
I hope you can help thanks
I repeated all the steps thrice…and it always results me a blank page with Mastodon favicon only…
Try to run:
chown -R www-data:mastodon /var/www/mastodon
chown www-data /var/nginx/cache
This did not fix for me . I am having same issue
Do you know how to do a distributed installation for mastodon components?
I'd like to know how scale the mastodon installation in order to host a very large installation.
Regards
Hi, followed this guide and it was super painless. Thx for that! unfortunately te instance seems unable to send Mails (verification). Sidekiq shows:>>Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 25<< a hint would be apreciated!
I'm getting the same issue. I've been researching it, but so far I've not found a resolution that works.
Your instructions were thorough and I thank you for all your work and time spent creating this document.
Everything went by the book all the way through. On the final step when I first pointed my browser to the site I just created things went a little differently. All I get is a page with no errors but only the Mastodon logo in the upper left. Nothing else and no way to login
Thank you for the instructions. However, I followed all steps. When I got to "Next, verify the Nginx for any syntax error" is where I had trouble. When I tested I received the error:
nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/conf.d/mastodon.conf:25
nginx: configuration file /etc/nginx/nginx.conf test failed
So I am basically stuck there. Any suggestions would be appreciated.
I followed this exactly the same, the page never opened for me. it is just showing 2 logos of mastodon. I tried -
chown -R www-data:mastodon /var/www/mastodonchown www-data /var/nginx/cache it is still not working
I am running mastodon server, and i am just having mastodon logo and white background. Help?
hi Hitesh
first of all, thank you very much for your instruction about mastodon installation.
I have seen... the version 4.1.0. is out...
Do you have the possibility of a step-by-step guide for the update to 4.1.0. to publish?
Thank you in advance for your support.
The Redis part didn't work... setup sucks.
cant access tootctl