Increasing Mastodon character limit

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 11.3.0.2
What app is this about: Mastodon

Describe your issue

I would like to increase the character limit on Mastodon toots.

I have tried to follow this guide.
First I did sudo yunohost app shell mastodon as explained by @tituspijean here.
And then I followed the guide but I got stuck when running
RAILS_ENV=production bundle exec rails assets:precompile
as I get the following:

bash: bundle: command not found

What should I do?

Thanks!

I have tried by exiting from this mastodon shell before running the precompile. For a short instant I thought that was the solution, but then I got another problem:

mastodon@sub:~$ RAILS_ENV=production bundle exec rails assets:precompile
bash: bundle: command not found
mastodon@sub:~$ exit
exit

peer@sub:/$ sudo -i
root@sub:~# cd /var/www/mastodon/live
root@sub:/var/www/mastodon/live# RAILS_ENV=production bundle exec rails assets:precompile
Compiling...
Compilation failed:
/var/www/mastodon/live/node_modules/glob/node_modules/minimatch/dist/cjs/ast.js:86
    #fillNegs() {
             ^

SyntaxError: Unexpected token '('
    at new Script (vm.js:88:7)
    at NativeCompileCache._moduleCompile (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
    at Module._compile (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/var/www/mastodon/live/node_modules/glob/node_modules/minimatch/dist/cjs/index.js:9:18)
    at Module._compile (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/var/www/mastodon/live/node_modules/glob/dist/cjs/src/index.js:4:21)
    at Module._compile (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/var/www/mastodon/live/config/webpack/shared.js:6:18)
    at Module._compile (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (/var/www/mastodon/live/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/var/www/mastodon/live/config/webpack/production.js:13:22)

What should I do?

Thank you

Try calling bundle with bin/bundle instead.

I get this:

mastodon@sub:~$ RAILS_ENV=production bin/bundle exec rails assets:precompile
bash: bin/bundle: No such file or directory
mastodon@sub:~$

Oops, sorry, I forgot to change directory to live.

But look what I get now:

mastodon@sub:~$ cd live
mastodon@sub:~/live$ RAILS_ENV=production bin/bundle exec rails assets:precompile
/usr/bin/env: ‘ruby’: No such file or directory
mastodon@sub:~/live$ 

What should I do?

Now I have tried again the same command but this time adding sudo. It has asked me for the password of the mastodon user. I don’t know that password.

I could enter the command doing @yelvington sugestion and happily finished the instructions.

But the character limit stays on 500 : (
I even gave it a reboot.

Any suggestion on what else to check?

In order to catch where the problem could be, now I followed this other guide:
https://3xn.nl/projects/2023/10/06/increasing-the-character-limit-on-mastodon-4-1-x-and-4-2-x/
I could also finished it without a single issue, but the character limit stays on 500.

I would recommend using another Fediverse software that support custom character limit per post.
Off the top of my head: Gotosocial, Glich-soc…

So glitch has a place in its admin panel to change the char limit?

Regarding my issue, apparently the problem is because the precompile is not working because nodejs needs to be updated.

So I guess I will be able to increase the character limit once I upgrade to Yunohost 12, which includes an updated nodejs.

Writing this thing now just in case the thread closes automatically before I upgrade to Yunohost 12 and report the results here…

Yes, the Glitch-soc package for YunoHost has a config option called “Maximum allowed character count in a toot” that you can configure from the app’s config panel.

Please check here for changing the character limit on Mastodon 4.3:
Increasing the Mastodon 4.3 post character and poll options limit - René Fouquet(%5B’server’%2C%20’server,the%20number%20500%20to%202500.
I did it with succes, but had to add nodejs and yarn manually before running RAILS_ENV.

Increase in character limit with new mastodon versions:

Customize Mastodon to Change Your Post Character Limit

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.