Mastodon comes with a default post size of 500 characters. This is changable and can be increased fairly easily by editing a couple of files.

I am running Mastodon 4.0.2 with Glitch-soc, so I know that works :)

Before you start

Take a backup! At a mimimum copy the files you’re editing, and I would recommend dumping the database and tarballing the Mastodon folder. See this post and scroll to the bottom for the backup script I use.

Edit Files

Change to your Mastodon folder (replace nano with your favorite editor)

nano app/validators/status_length_validator.rb

Search for “500” (without the quotes) and replace it with your desired post length. I found it once but for some reason sometimes it’s there twice, replace both. I changed to 1000 then exit and save.

nano app/serializers/rest/instance_serializer.rb

This time we are going to update the “attributes” block. Find the block that looks like the below, it will finish at registrations. Add “, :max_post_chars” to the end so it looks like this:

attributes :domain, :title, :version, :source_url, :description,
:usage, :thumbnail, :languages, :configuration,
:registrations, :max_post_chars

Then scroll down to nearly the bottom of the file, and you will see the word “private”. On the line above copy and past this in (replacing 1000 with your number):

def max_post_chars
1000
end

Again, exit and save.

That’s the end of the editing. One last precompile:

RAILS_ENV=production bundle exec rails assets:precompile

And service restart

systemctl restart mastodon-sidekiq.service mastodon-streaming.service mastodon-web.service

And you should now be able to post using the new character limit!