We will edit three different files, two which set the character limit on your instance, and one which tells other clients or apps what your custom character limit is (for those that support it).
1. Switch to the mastodon user
su - mastodon
find the number 500 (it should be written in two different locations). Change both of them to whatever you like.
3. Edit live/app/validators/statuslengthvalidator.rb,
and once again find the number 500 (should exist only once) and change it to the same number as you wrote in the previous file.
4. Edit live/app/serializers/rest/instance_serializer.rb,
and find the row starting with
(should be the ~8th row), and change it so it includes ”:maxtootchars” after ”:registrations”, such as
:languages, :registrations, :maxtootchars,
where the full row now looks something like
:languages, :registrations, :maxtootchars, :approvalrequired, :invitesenabled
At the end of the same file, above where it says private, add the following code:
def max_toot_chars <your value here> end
and change <your value here> to the same value you wrote previously.
5. Enter the live directory and recompile Mastodon,
RAILS_ENV=production bundle exec rails assets:precompile
6. Switch to the root user (with exit), and restart the Mastodon services,
systemctl restart mastodon-sidekiq systemctl reload mastodon-web
and optionally restart the streaming API server,
systemctl restart mastodon-streaming
And you’re done! You should now be able to see the new character limit on your Mastodon instance.