Login
You're viewing the y.diskcat.com public feed.
  • Oct 29, 2026, 5:23 PM

    Mastodon Server - sehr sicherheitskritisches und eiliges Update auf v4.7.4

    (diesmal etwas komplexer und zeitintensiver, da Ruby ein Update auf 4.0.9 braucht und assets:precompile gemacht werden muss)

    su - mastodon
    cd /home/mastodon/live/
    git fetch && git checkout v4.7.4
    git -C "$(rbenv root)"/plugins/ruby-build pull
    RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install
    bundle install
    yarn install --immutable
    RAILS_ENV=production bundle exec rails assets:precompile
    su - root
    systemctl restart mastodon-sidekiq
    systemctl daemon-reload
    systemctl reload mastodon-web
    exit
    exit

    github.com/mastodon/mastodon/r

    💬 1🔄 1⭐ 6

Replies

  • Oct 29, 2026, 5:31 PM

    Und wenn ihr von Ubuntu 24.04.1 auf Ubuntu 26.04.1 hochgerüstet habt, dann kommt der Fehler:

    "WARNUNG: Version von Sortierfolge für Datenbank »mastodon_production« stimmt nicht überein
    DETAIL: Die Datenbank wurde mit Sortierfolgenversion 2.39 erzeugt, aber das Betriebssystem hat Version 2.43."

    Dann laufen auch die Aufräumtools nicht.
    (RAILS_ENV=production /home/mastodon/live/bin/tootctl preview_cards remove
    RAILS_ENV=production /home/mastodon/live/bin/tootctl preview_cards remove etc)

    Ich habe nicht genau verstanden, was ich da gemacht habe, aber es scheint zu funktionieren. Aufräumkommandos gehen jedenfalls wieder und die Instanz läuft. Hier meine Holzhammerlösung nach u.a. Link:

    ACHTUNG: Erst Systemsicherung oder DB-Sicherung durchführen!

    su - mastodon
    cd /home/mastodon/live/

    su - root
    systemctl stop mastodon-web mastodon-sidekiq mastodon-streaming
    exit

    sudo -u postgres reindexdb mastodon_production

    sudo -u postgres psql -c "ALTER DATABASE mastodon_production REFRESH COLLATION VERSION;"
    sudo -u postgres psql -c "ALTER DATABASE template1 REFRESH COLLATION VERSION;"
    sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;"

    sudo -u postgres reindexdb mastodon_production

    sudo -u postgres psql -c "ALTER DATABASE mastodon_production REFRESH COLLATION VERSION;"
    sudo -u postgres psql -c "ALTER DATABASE template1 REFRESH COLLATION VERSION;"
    sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;"

    su - root
    systemctl start mastodon-web mastodon-sidekiq mastodon-streaming
    exit
    exit

    just-stuff.blog/postgresql-col

    💬 0🔄 0⭐ 5
  • Oct 29, 2026, 5:29 PM

    @33dBm Ich betreibe zwar selber kein Mastodon, finde es aber voll gut das du deine Erfahrungen bzw deine Variante der Upgradeanleitung einfach teilst.

    (Auch wenn ich persönlich lieber `sudo -u mastodon -i` anstatt `su - mastodon` nehmen würde.)

    💬 0🔄 0⭐ 0