User Tools

Site Tools


en:mastodon

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:mastodon [2024/02/10 11:39] domeleen:mastodon [2026/08/03 19:11] (current) – Automatic push translation domele
Line 1: Line 1:
 ~~~NOCACHE~~~ ~~~NOCACHE~~~
  
-FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME+FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME 
 <code> <code>
 ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__''  ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__'' 
Line 10: Line 10:
 ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__''   ''__**ATTENTION (09.02.2024): THIS TUTORIAL IS NOT YET FINISHED**__''  
 </code>  </code> 
-How-to Install Mastodon:+How to install Mastodon:
  
  
Line 16: Line 16:
 ===== Debian: ===== ===== Debian: =====
  
-  * This will be rapid and dirty Tutorial to gain the maximum afford.+  * This is quick and rough guide to get the most out of it. 
 +  * I would also suggest installing apt-cacher-ng on the host and adding it to the VM: 
 +    * <code>  
   * I assume you use a fresh, not used System.   * 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 ;-)   * If we need to compile, we use ccache here to speed up due it might a 50/50 chance of a failure ;-)
 +  * I also assume that this is a VM/Container that is exclusivly used for this. So that in case of a Totale failure, you can restore from a Snapshot or Backup you have to be done, before you started
 +  * We Assume, you use Debian 12 - if you use i.e. debian 11 use this before:
 +    * <code>
 +      OLDDISTRI=bullseye
 +      sed -i 's/\$OLDDISTRI/bookworm/gi' /etc/apt/sources.list.d/*
 +      sed -i 's/\%OLDDISTRI/bookworm/gi' /etc/apt/*.list
  
  
Line 26: Line 34:
   * <code>   * <code>
 INSTALLPATH=/opt/mastodon INSTALLPATH=/opt/mastodon
-apt install -qy curl gnupg2 ca-certificates lsb-release debian-archive-keyring sudo \  +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 bison libncurses5-dev  
-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 curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null sudo curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
 sudo curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - sudo curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
Line 39: Line 42:
 echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >/etc/apt/sources.list.d/backports.list echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >/etc/apt/sources.list.d/backports.list
 echo "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >>/etc/apt/sources.list.d/backports.list echo "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >>/etc/apt/sources.list.d/backports.list
-sudo install -m 0755 -d /etc/apt/keyrings 
 sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
 sudo chmod a+r /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc
Line 49: Line 51:
   sudo tee /etc/apt/sources.list.d/docker.list > /dev/null   sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
 for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done  for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done 
-sudo apt -qy update && sudo apt -qy dist-upgrade  && sudo apt install redis-server redis-tools postgresql postgresql-contrib nginx yarn letsencrypt+sudo apt -qy update && sudo apt -qy dist-upgrade  && sudo apt -qy install redis-server redis-tools postgresql postgresql-contrib nginx yarn letsencrypt
 sudo update-ccache-symlinks sudo update-ccache-symlinks
 echo PATH="/usr/lib/ccache:$PATH" >> ~/.bashrc && source ~/.bashrc echo PATH="/usr/lib/ccache:$PATH" >> ~/.bashrc && source ~/.bashrc
 PATH="/usr/lib/ccache:$PATH" PATH="/usr/lib/ccache:$PATH"
 +sudo install -m 0755 -d /etc/apt/keyrings
 </code> </code>
  
Line 59: Line 61:
  
  
-===== Downloading Sources ===== +===== Downloading sources ===== 
-INSTALLPATH=/opt/mastodon+INSTALLPATH=/opt/mastodon/mastodon
 git clone https://github.com/tootsuite/mastodon.git $INSTALLPATH git clone https://github.com/tootsuite/mastodon.git $INSTALLPATH
 +git clone https://github.com/rbenv/rbenv.git ~/.rbenv
 +cd ~/.rbenv && src/configure && make -C src
 +echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
 +echo 'eval "$(rbenv init -)"' >> ~/.bashrc
 +source ~/.bashrc
 +cd $INSTALLPATH
 +gem install bundler
 +git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
 +git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
 +cd $INSTALLPATH && rbenv install 3.2.3
 +cd $INSTALLPATH && rbenv global 3.2.3
  
  
-===== Setup Mastodon: User and Repository Cloning =====+===== Setting up Mastodon: Cloning User and Repository =====
 FIXME FIXME
   * <code>    * <code> 
   INSTALLPATH=/opt/mastodon   INSTALLPATH=/opt/mastodon
   INSTALLUSER=mastodon   INSTALLUSER=mastodon
-  sudo adduser $INSTALLUSER --home=$INSTALLPATH+  sudo adduser $INSTALLUSER 
   sudo adduser $INSTALLUSER docker   sudo adduser $INSTALLUSER docker
 +  sudo usermod --home=$INSTALLPATH $INSTALLUSER
   sudo usermod -g $INSTALLUSER www-data   sudo usermod -g $INSTALLUSER www-data
   sudo usermod -g www-data $INSTALLUSER   sudo usermod -g www-data $INSTALLUSER
 +  sudo chown -R $INSTALLUSER:www-data $INSTALLPATH
   sudo chmod 755 $INSTALLPATH   sudo chmod 755 $INSTALLPATH
   su - $INSTALLUSER -c "cp $INSTALLPATH/.env.production.sample $INSTALLPATH/.env.production"   su - $INSTALLUSER -c "cp $INSTALLPATH/.env.production.sample $INSTALLPATH/.env.production"
Line 79: Line 94:
  
  
-===== Setup Mastodon: .env.production =====+===== Setting up Mastodon: .env.production =====
  
-  * Short Info: You don't need edit the fileit will be overwritten by the next command. +  * Quick note: You dont need to edit the fileit 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 :-) +  * Follow the configuration guide. You dont need to compile your own stuff. REALLY NOT. Save yourself the time :-) 
-  * Thats why we removed the build lines above. +  * That’s why we’ve removed the build lines above. 
-  * Trust me its a pain in the Backside and waste your time... ;-D+  * Trust me, it’s right pain and waste of time... ;-D
     * <code> docker-compose run --rm web bundle exec rake mastodon:setup </code>     * <code> docker-compose run --rm web bundle exec rake mastodon:setup </code>
  
-  * OPTIONAL: Pre-Compile all Assets.+  * OPTIONAL: Pre-compile all assets.
     * <code> docker-compose run --rm web rake assets:precompile </code>     * <code> docker-compose run --rm web rake assets:precompile </code>
  
  
-===== Setup Mastodon: NGINX =====+===== Set up Mastodon: NGINX =====
  
   * We need to create and add some information for NGINX to use it   * 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+  * Note: If you need to use a different reverse proxy in front of it, this hasn’t been tested and may not work
     * <code>     * <code>
 INSTALLPATH=/opt/mastodon INSTALLPATH=/opt/mastodon
Line 103: Line 118:
  
  
-===== Setup Mastodon: systemd =====+===== Setting up Mastodon: systemd =====
  
-  * We Link the service-files to auto-update them+  * We link the service files so they update automatically
     * <code>      * <code> 
 INSTALLPATH=/opt/mastodon INSTALLPATH=/opt/mastodon
Line 114: Line 129:
 sudo systemctl daemon-reload && sudo systemctl enable --now mastodon.service </code> sudo systemctl daemon-reload && sudo systemctl enable --now mastodon.service </code>
  
-  * We Check if it was successfull:+  * We check whether it was successful:
     * <code>      * <code> 
 INSTALLPATH=/opt/mastodon INSTALLPATH=/opt/mastodon
Line 127: Line 142:
  
   * [[https://www.howtoforge.com/how-to-install-mastodon-social-network-on-debian-12/|HowtoForge]]   * [[https://www.howtoforge.com/how-to-install-mastodon-social-network-on-debian-12/|HowtoForge]]
-  * [[https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Docker-Guide.md|Mastodon Github: Docker-Guide]]+  * [[https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Docker-Guide.md|Mastodon GitHub: Docker Guide]]
   * [[https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Production-guide.md|Mastodon Github: Production Guide]]   * [[https://github.com/felx/mastodon-documentation/blob/master/Running-Mastodon/Production-guide.md|Mastodon Github: Production Guide]]
   * [[https://www.linuxcapable.com/how-to-install-redis-on-debian-linux/|LinuxCapable]]   * [[https://www.linuxcapable.com/how-to-install-redis-on-debian-linux/|LinuxCapable]]
   * [[https://hub.sunny.garden/2022/11/19/notes-on-installing-mastodon-from-source/|hub.sunny.garden]]   * [[https://hub.sunny.garden/2022/11/19/notes-on-installing-mastodon-from-source/|hub.sunny.garden]]
   * [[https://gist.github.com/TrillCyborg/84939cd4013ace9960031b803a0590c4|GitHub TrillCyborg]]   * [[https://gist.github.com/TrillCyborg/84939cd4013ace9960031b803a0590c4|GitHub TrillCyborg]]
-  * [[https://github.com/rbenv/ruby-build?tab=readme-ov-file|rbenv Github: howto build]]+  * [[https://github.com/rbenv/ruby-build?tab=readme-ov-file|rbenv Github: how to build]]
   * FIXME    * FIXME 
en/mastodon.1707565169.txt.gz · Last modified: by domele