Updated 02/14/2026 ================== Note: Run all these steps as root unless told otherwise apt install -y curl wget gnupg lsb-release ca-certificates curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list wget -O /usr/share/keyrings/postgresql.asc https://www.postgresql.org/media/keys/ACCC4CF8.asc echo "deb [signed-by=/usr/share/keyrings/postgresql.asc] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/postgresql.list apt update apt install -y \ imagemagick ffmpeg libvips-tools libpq-dev libxslt1-dev file git \ protobuf-compiler pkg-config autoconf bison build-essential \ libssl-dev libyaml-dev libreadline-dev zlib1g-dev libffi-dev \ libgdbm-dev nginx nodejs redis-server postgresql certbot \ python3-certbot-nginx libidn-dev libicu-dev libjemalloc-dev corepack enable adduser --disabled-password mastodon sudo -u postgres psql CREATE USER mastodon CREATEDB; \q su - mastodon git clone https://github.com/mastodon/mastodon.git live && cd live git checkout $(git tag -l | grep '^v[0-9.]*$' | sort -V | tail -n 1) git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install bundle config deployment 'true' bundle config without 'development test' bundle install yarn install