Mastodon

Contents

Mastodon#

TODO

Services#

See also

  • Adventures in Mastodon Self-Hosting: Clean Media Storage with tootctl | Matt Burke [1]

  1. create a Systemd unit file

    /home/jobs/services/by-user/root/mastodon-cleanup.service#
    [Unit]
    Requires=docker-compose.mastodon.service
    Requires=network-online.target
    After=docker-compose.mastodon.service
    After=network-online.target
    
    [Service]
    Type=simple
    WorkingDirectory=/home/jobs/scripts/by-user/root/docker/mastodon
    Restart=no
    ExecStart=/usr/bin/bash -c '/usr/bin/docker-compose run --rm web tootctl media remove --days 7 && /usr/bin/docker-compose run --rm web tootctl media remove --days 7 --prune-profiles'
    
  2. create a Systemd timer unit file

    /home/jobs/services/by-user/root/mastodon-cleanup.timer#
    [Unit]
    Description=Once every week cleanup Mastodon
    
    [Timer]
    OnCalendar=weekly
    Persistent=true
    
    [Install]
    WantedBy=timers.target
    

Footnotes