en:mastodon
This is an old revision of the document!
Table of Contents
~~
''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__'' ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__'' ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__'' ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__'' ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__'' ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__''
How-to Install Mastodon:
Debian:
- This will be a rapid and dirty Tutorial to gain the maximum afford.
- I assume you use a fresh, not used System.
- If we need to compile, we use ccache here to speed up due it might a 50/50 chance of a failure
=
Installing Pre-Requirements
INSTALLPATH=/opt/mastodon echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >/etc/apt/sources.list.d/backports.list "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >>/etc/apt/sources.list.d/backports.list apt -qy update apt install -qy curl gnupg2 ca-certificates lsb-release debian-archive-keyring sudo \ git build-essential etckeeper 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 libgdbm3 libgdbm-dev nginx libidn11-dev \ libicu-dev ccache libgdm1 libgdm-dev patch rustc libgmp-dev \ libgdbm6 libdb-dev uuid-dev git nano iptables-persistent sudo update-ccache-symlinks echo PATH="/usr/lib/ccache:$PATH" >> ~/.bashrc && source ~/.bashrc PATH="/usr/lib/ccache:$PATH"
Downloading Sources
INSTALLPATH=/opt/mastodon git clone https://github.com/tootsuite/mastodon.git $INSTALLPATH
Setup Mastodon: User and Repository Cloning
INSTALLPATH=/opt/mastodon sudo adduser mastodon --home=$INSTALLPATH sudo adduser mastodon docker sudo usermod -g mastodon www-data sudo usermod -g www-data mastodon sudo chmod 755 $INSTALLPATH su - mastodon -c "cp $INSTALLPATH/.env.production.sample $INSTALLPATH/.env.production" su - mastodon -c "sed -i 's/\bBuild: \./#Build: ./gi' $INSTALLPATH/docker-compose.yml"
Setup Mastodon: .env.production
- Short Info: You don't need edit the file, it will be overwritten by the next command.
- Follow up the configuration Guide. You don't need to compile your own Stuff. REALLY NOT. Save the Time
- Thats why we removed the build lines above.
- Trust me its a pain in the Backside and waste your time… ;-D
docker-compose run --rm web bundle exec rake mastodon:setup
- OPTIONAL: Pre-Compile all Assets.
docker-compose run --rm web rake assets:precompile
Setup Mastodon: NGINX
- We need to create and add some information for NGINX to use it
- Hint: If you need to use a other Reverse-Proxy in front of it, its untested and my not work
INSTALLPATH=/opt/mastodon sudo mkdir /var/www/letsencrypt sudo cp $INSTALLPATH/dist/nginx.conf /etc/nginx/sites-available/mastodon sudo ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
Setup Mastodon: systemd
- We Link the service-files to auto-update them
- sudo ln -s /home/mastodon/live/dist/mastodon-sidekiq.service /etc/systemd/system/mastodon-sidekiq.service
- sudo ln -s /home/mastodon/live/dist/mastodon-streaming.service /etc/systemd/system/mastodon-streaming.service
- sudo ln -s /home/mastodon/live/dist/mastodon-web.service /etc/systemd/system/mastodon-web.service </code>
- We reload the systemd daemon
sudo systemctl daemon-reload && sudo systemctl enable --now mastodon.service
- We Check if it was successfull:
watch docker compose -f /opt/mastodon/docker-compose.yml ps
References:
en/mastodon.1707564309.txt.gz · Last modified: by domele