{"id":21456209,"url":"https://github.com/etkecc/synapse-user-autoerase","last_synced_at":"2025-07-15T00:30:57.579Z","repository":{"id":252239109,"uuid":"839696798","full_name":"etkecc/synapse-user-autoerase","owner":"etkecc","description":"A simple tool to automatically erase users and their media using Synapse Admin API","archived":false,"fork":false,"pushed_at":"2024-11-07T10:48:00.000Z","size":69,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-07T11:35:28.362Z","etag":null,"topics":["admin-api","cli","synapse"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etkecc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"liberapay":"etkecc"}},"created_at":"2024-08-08T06:33:14.000Z","updated_at":"2024-11-07T10:44:34.000Z","dependencies_parsed_at":"2024-08-08T15:12:30.154Z","dependency_job_id":"1c8ef8a3-8ed5-431f-851d-b7aec90cfdbd","html_url":"https://github.com/etkecc/synapse-user-autoerase","commit_stats":null,"previous_names":["etke-cc/synapse-user-autoerase"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etkecc%2Fsynapse-user-autoerase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etkecc%2Fsynapse-user-autoerase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etkecc%2Fsynapse-user-autoerase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etkecc%2Fsynapse-user-autoerase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etkecc","download_url":"https://codeload.github.com/etkecc/synapse-user-autoerase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226002970,"owners_count":17558157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-api","cli","synapse"],"created_at":"2024-11-23T05:14:45.352Z","updated_at":"2024-11-23T05:14:46.122Z","avatar_url":"https://github.com/etkecc.png","language":"Go","funding_links":["https://liberapay.com/etkecc"],"categories":[],"sub_categories":[],"readme":"# Synapse User Auto Eraser\n\nThis is a simple script that will erase users, their media, and redact all their events from a Synapse server based on specific criteria:\n\n- not an admin\n- not a guest\n- not deactivated\n- not contain a specific string in their MXID\n- not older than a specific threshold in days\n\nIt was developed for the [etke.cc demo server](https://etke.cc/demo/) for the purpose of cleaning up the user database.\n\nAnother purpose of this repo is to be a test stand for migrating our [gitlab repos](https://gitlab.com/etke.cc) to [github](https://github.com/etkecc)\n\nDon't expect this to be a full-featured tool, it's just a simple script that does one thing.\n\n## Configuration\n\nConfiguration is done via environment variables (`.env` file is supported as well). The following variables are supported:\n\n- `SUAE_HOST` - Synapse server host, e.g. `https://matrix.example.com` (without trailing slash)\n- `SUAE_TOKEN` - Synapse homeserver admin token\n- `SUAE_PREFIXES` - Space-separated list of additional MXID prefixes that should be excluded from deletion\n- `SUAE_TTL` - Maximum age of the user in days, users younger than this value will not be deleted\n- `SUAE_DRYRUN` - If set to `true`, the script will only print the list of users that would be deleted. You **WANT** to run it in dry-run mode first to make sure you're not deleting the wrong users.\n\nCheck `.env.example` for an example configuration.\n\n\n## Usage\n\n```bash\n# if you want to run it with docker, do this\n$ docker run --rm --env-file .env ghcr.io/etkecc/synapse-user-autoerase\n# if you have binary, run it like this\n$ synapse-user-auto-erase\n# if you want to run from source\n$ just run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetkecc%2Fsynapse-user-autoerase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetkecc%2Fsynapse-user-autoerase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetkecc%2Fsynapse-user-autoerase/lists"}