GlitchSoc - How to use tootctl via SSH?

How to use the tootctl command with yunohost glitchsoc via SSH

My YunoHost server

Hardware: hosted VPS
YunoHost version: 4.3.6.3 (stable)
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no /

Description of my issue

My new glitchsoc instance media storage is growing fast.
I want to apply the tootctl command to remove all cached media older than 5 days but I don’t know how to correctly use tootctl with yunohost glitchsoc via ssh

tootctl media remove --days=5

I’ve tried it with
sudo -u glitchsoc RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin bin/tootctl media remove //there is no tootctl in this location

as well with
sudo -u glitchsoc RAILS_ENV=production PATH=/var/www/glitchsoc/live/bin bin/tootctl media remove

and other variations.

I never used or installed glitchsoc so this message is just random knowledge.

Are there any errors when you run those commands ?
Did YunoHost create a dedicated user for this app ? (This is jist to avoid to run your commands as root)
Is the glitchsoc program in your path or do you have to run a special one where YunoHost installed it ? (Or maybe both exists, maybe ps -ef | grep glitchsoc can help find the right executable).

1 Like

Thank you for your input. I was using the wrong path!

I was now able to find the right command or better said, the right path to the tootctl

//logged via ssh as yunohost admin user
//–days=x will delete all cached media with age >=x


sudo RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin /var/www/glitchsoc/live/bin/tootctl media remove --days=3
2 Likes

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