CLI

CLI

The gogs CLI can be used as follows:
sudo -u git /home/git/gogs/gogs -c /run/gogs/app.ini

For example, to delete inactive accounts:
sudo -u git /home/git/gogs/gogs admin delete-inactive-users -c /run/gogs/app.ini

To create a backup:
sudo -u git GOGS_CUSTOM=/app/data/custom /home/git/gogs/gogs backup -c /run/gogs/app.ini --target /app/data/backups