For the Docker Mastodon admin newbies.
With the script, you increase the character limit to 5000 characters for your instance.
docker-compose exec web sed -i ‘s/500/5000/g’ app/validators/status_length_validator.rb
docker-compose exec web sed -i ‘s/:registrations/:registrations, :max_toot_chars /g’ app/serializers/rest/instance_serializer.rb
docker-compose exec web sed -i ‘s/private/def max_toot_charsn 5000n endnn private/g’ app/serializers/rest/instance_serializer.rb
docker-compose exec web bundle exec rails assets:precompile && echo “pass” || echo “fail”
Save the whole thing as 5000.sh.
Chmod +x 5000.sh
to make it executable. Now you can execute the script with
wait a moment and you have 5000 characters.
Tested with Mastodon v4.1.0rc3
I myself have only slightly modified the script from this forum post here