Recommended to use in conjunction with list-local-users.
Users will be removed from joined rooms by default.
Can be overridden with --no-leave-rooms.
Removing a mass amount of users from a room may cause a significant amount of leave events. The time to leave rooms may depend significantly on joined rooms and servers.
This command needs a newline separated list of users provided in a Markdown code block below the command.
**Usage:** `admin users deactivate-all [OPTIONS]`
###### **Options:**
*`-n`, `--no-leave-rooms` — Does not leave any rooms the user is in on deactivation
*`-f`, `--force` — Also deactivate admin accounts and will assume leave all rooms too
## `admin users suspend`
- Suspend a user
Suspended users are able to log in, sync, and read messages, but are not able to send events nor redact them, cannot change their profile, and are unable to join, invite to, or knock on rooms.
Suspended users can still leave rooms and deactivate their account. Suspending them effectively makes them read-only.
**Usage:** `admin users suspend <USER_ID>`
###### **Arguments:**
*`<USER_ID>` — Username of the user to suspend
## `admin users unsuspend`
- Unsuspend a user
Reverses the effects of the `suspend` command, allowing the user to send messages, change their profile, create room invites, etc.
**Usage:** `admin users unsuspend <USER_ID>`
###### **Arguments:**
*`<USER_ID>` — Username of the user to unsuspend
## `admin users list-users`
- List local users in the database
**Usage:** `admin users list-users`
## `admin users list-joined-rooms`
- Lists all the rooms (local and remote) that the specified user is joined in
- Puts a room tag for the specified user and room ID.
This is primarily useful if you'd like to set your admin room to the special "System Alerts" section in Element as a way to permanently see your admin room without it being buried away in your favourites or rooms. To do this, you would pass your user, your admin room's internal ID, and the tag name `m.server_notice`.
*`--exclude-disabled` — Excludes rooms that we have federation disabled with
*`--exclude-banned` — Excludes rooms that we have banned
*`--no-details` — Whether to only output room IDs without supplementary room information
## `admin rooms info`
- View information about a room we know about
**Usage:** `admin rooms info <COMMAND>`
###### **Subcommands:**
*`list-joined-members` — - List joined members in a room
*`view-room-topic` — - Displays room topic
## `admin rooms info list-joined-members`
- List joined members in a room
**Usage:** `admin rooms info list-joined-members [OPTIONS] <ROOM_ID>`
###### **Arguments:**
*`<ROOM_ID>`
###### **Options:**
*`--local-only` — Lists only our local users in the specified room
## `admin rooms info view-room-topic`
- Displays room topic
Room topics can be huge, so this is in its own separate command
**Usage:** `admin rooms info view-room-topic <ROOM_ID>`
###### **Arguments:**
*`<ROOM_ID>`
## `admin rooms moderation`
- Manage moderation of remote or local rooms
**Usage:** `admin rooms moderation <COMMAND>`
###### **Subcommands:**
*`ban-room` — - Bans a room from local users joining and evicts all our local users (including server admins) from the room. Also blocks any invites (local and remote) for the banned room, and disables federation entirely with it
*`ban-list-of-rooms` — - Bans a list of rooms (room IDs and room aliases) from a newline delimited codeblock similar to `user deactivate-all`. Applies the same steps as ban-room
*`unban-room` — - Unbans a room to allow local users to join again
*`list-banned-rooms` — - List of all rooms we have banned
## `admin rooms moderation ban-room`
- Bans a room from local users joining and evicts all our local users (including server admins) from the room. Also blocks any invites (local and remote) for the banned room, and disables federation entirely with it
*`<ROOM>` — The room in the format of `!roomid:example.com` or a room alias in the format of `#roomalias:example.com`
## `admin rooms moderation ban-list-of-rooms`
- Bans a list of rooms (room IDs and room aliases) from a newline delimited codeblock similar to `user deactivate-all`. Applies the same steps as ban-room
- Fetch `/.well-known/matrix/support` from the specified server
Despite the name, this is not a federation endpoint and does not go through the federation / server resolution process as per-spec this is supposed to be served at the server_name.
Respecting homeservers put this file here for listing administration, moderation, and security inquiries. This command provides a way to easily fetch that information.
*`clear-caches` — - Clears all of Continuwuity's caches
*`backup-database` — - Performs an online backup of the database (only available for RocksDB at the moment)
*`list-backups` — - List database backups
*`admin-notice` — - Send a message to the admin room
*`reload-mods` — - Hot-reload the server
*`restart` — - Restart the server
*`shutdown` — - Shutdown the server
## `admin server uptime`
- Time elapsed since startup
**Usage:** `admin server uptime`
## `admin server show-config`
- Show configuration values
**Usage:** `admin server show-config`
## `admin server reload-config`
- Reload configuration values
**Usage:** `admin server reload-config [PATH]`
###### **Arguments:**
*`<PATH>`
## `admin server list-features`
- List the features built into the server
**Usage:** `admin server list-features [OPTIONS]`
###### **Options:**
*`-a`, `--available`
*`-e`, `--enabled`
*`-c`, `--comma`
## `admin server memory-usage`
- Print database memory usage statistics
**Usage:** `admin server memory-usage`
## `admin server clear-caches`
- Clears all of Continuwuity's caches
**Usage:** `admin server clear-caches`
## `admin server backup-database`
- Performs an online backup of the database (only available for RocksDB at the moment)
**Usage:** `admin server backup-database`
## `admin server list-backups`
- List database backups
**Usage:** `admin server list-backups`
## `admin server admin-notice`
- Send a message to the admin room
**Usage:** `admin server admin-notice [MESSAGE]...`
###### **Arguments:**
*`<MESSAGE>`
## `admin server reload-mods`
- Hot-reload the server
**Usage:** `admin server reload-mods`
## `admin server restart`
- Restart the server
**Usage:** `admin server restart [OPTIONS]`
###### **Options:**
*`-f`, `--force`
## `admin server shutdown`
- Shutdown the server
**Usage:** `admin server shutdown`
## `admin media`
- Commands for managing media
**Usage:** `admin media <COMMAND>`
###### **Subcommands:**
*`delete` — - Deletes a single media file from our database and on the filesystem via a single MXC URL or event ID (not redacted)
*`delete-list` — - Deletes a codeblock list of MXC URLs from our database and on the filesystem. This will always ignore errors
*`delete-past-remote-media` — - Deletes all remote (and optionally local) media created before or after [duration] time using filesystem metadata first created at date, or fallback to last modified date. This will always ignore errors by default
*`delete-all-from-user` — - Deletes all the local media from a local user on our server. This will always ignore errors by default
*`delete-all-from-server` — - Deletes all remote media from the specified remote server. This will always ignore errors by default
*`get-file-info` —
*`get-remote-file` —
*`get-remote-thumbnail` —
## `admin media delete`
- Deletes a single media file from our database and on the filesystem via a single MXC URL or event ID (not redacted)
**Usage:** `admin media delete [OPTIONS]`
###### **Options:**
*`--mxc <MXC>` — The MXC URL to delete
*`--event-id <EVENT_ID>` — - The message event ID which contains the media and thumbnail MXC URLs
## `admin media delete-list`
- Deletes a codeblock list of MXC URLs from our database and on the filesystem. This will always ignore errors
**Usage:** `admin media delete-list`
## `admin media delete-past-remote-media`
- Deletes all remote (and optionally local) media created before or after [duration] time using filesystem metadata first created at date, or fallback to last modified date. This will always ignore errors by default
**Usage:** `admin media delete-past-remote-media [OPTIONS] <DURATION>`
###### **Arguments:**
*`<DURATION>` — - The relative time (e.g. 30s, 5m, 7d) within which to search
###### **Options:**
*`-b`, `--before` — - Only delete media created before [duration] ago
*`-a`, `--after` — - Only delete media created after [duration] ago
*`--yes-i-want-to-delete-local-media` — - Long argument to additionally delete local media
## `admin media delete-all-from-user`
- Deletes all the local media from a local user on our server. This will always ignore errors by default
**Usage:** `admin media delete-all-from-user <USERNAME>`
###### **Arguments:**
*`<USERNAME>`
## `admin media delete-all-from-server`
- Deletes all remote media from the specified remote server. This will always ignore errors by default
**Usage:** `admin media delete-all-from-server [OPTIONS] <SERVER_NAME>`
###### **Arguments:**
*`<SERVER_NAME>`
###### **Options:**
*`--yes-i-want-to-delete-local-media` — Long argument to delete local media
## `admin media get-file-info`
**Usage:** `admin media get-file-info <MXC>`
###### **Arguments:**
*`<MXC>` — The MXC URL to lookup info for
## `admin media get-remote-file`
**Usage:** `admin media get-remote-file [OPTIONS] <MXC>`
###### **Arguments:**
*`<MXC>` — The MXC URL to fetch
###### **Options:**
*`-s`, `--server <SERVER>`
*`-t`, `--timeout <TIMEOUT>`
Default value: `10000`
## `admin media get-remote-thumbnail`
**Usage:** `admin media get-remote-thumbnail [OPTIONS] <MXC>`
###### **Arguments:**
*`<MXC>` — The MXC URL to fetch
###### **Options:**
*`-s`, `--server <SERVER>`
*`-t`, `--timeout <TIMEOUT>`
Default value: `10000`
*`--width <WIDTH>`
Default value: `800`
*`--height <HEIGHT>`
Default value: `800`
## `admin check`
- Commands for checking integrity
**Usage:** `admin check <COMMAND>`
###### **Subcommands:**
*`check-all-users` —
## `admin check check-all-users`
**Usage:** `admin check check-all-users`
## `admin debug`
- Commands for debugging things
**Usage:** `admin debug <COMMAND>`
###### **Subcommands:**
*`echo` — - Echo input of admin command
*`get-auth-chain` — - Get the auth_chain of a PDU
*`parse-pdu` — - Parse and print a PDU from a JSON
*`get-pdu` — - Retrieve and print a PDU by EventID from the Continuwuity database
*`get-short-pdu` — - Retrieve and print a PDU by PduId from the Continuwuity database
*`get-remote-pdu` — - Attempts to retrieve a PDU from a remote server. Inserts it into our database/timeline if found and we do not have this PDU already (following normal event auth rules, handles it as an incoming PDU)
*`get-remote-pdu-list` — - Same as `get-remote-pdu` but accepts a codeblock newline delimited list of PDUs and a single server to fetch from
*`get-room-state` — - Gets all the room state events for the specified room
*`get-signing-keys` — - Get and display signing keys from local cache or remote server
*`get-verify-keys` — - Get and display signing keys from local cache or remote server
*`ping` — - Sends a federation request to the remote server's `/_matrix/federation/v1/version` endpoint and measures the latency it took for the server to respond
*`force-device-list-updates` — - Forces device lists for all local and remote users to be updated (as having new keys available)
*`change-log-level` — - Change tracing log level/filter on the fly
*`sign-json` — - Sign JSON blob
*`verify-json` — - Verify JSON signatures
*`verify-pdu` — - Verify PDU
*`first-pdu-in-room` — - Prints the very first PDU in the specified room (typically m.room.create)
*`latest-pdu-in-room` — - Prints the latest ("last") PDU in the specified room (typically a message)
*`force-set-room-state-from-server` — - Forcefully replaces the room state of our local copy of the specified room, with the copy (auth chain and room state events) the specified remote server says
*`resolve-true-destination` — - Runs a server name through Continuwuity's true destination resolution process
*`memory-stats` — - Print extended memory usage
*`runtime-metrics` — - Print general tokio runtime metric totals
*`runtime-interval` — - Print detailed tokio runtime metrics accumulated since last command invocation
- Attempts to retrieve a PDU from a remote server. Inserts it into our database/timeline if found and we do not have this PDU already (following normal event auth rules, handles it as an incoming PDU)
*`<SERVER>` — Argument for us to attempt to fetch all the events from the specified remote server
###### **Options:**
*`-f`, `--force` — If set, ignores errors, else stops at the first error/failure
## `admin debug get-room-state`
- Gets all the room state events for the specified room.
This is functionally equivalent to `GET /_matrix/client/v3/rooms/{roomid}/state`, except the admin command does *not* check if the sender user is allowed to see state events. This is done because it's implied that server admins here have database access and can see/get room info themselves anyways if they were malicious admins.
Of course the check is still done on the actual client API.
**Usage:** `admin debug get-room-state <ROOM_ID>`
###### **Arguments:**
*`<ROOM_ID>` — Room ID
## `admin debug get-signing-keys`
- Get and display signing keys from local cache or remote server
- Sends a federation request to the remote server's `/_matrix/federation/v1/version` endpoint and measures the latency it took for the server to respond
**Usage:** `admin debug ping <SERVER>`
###### **Arguments:**
*`<SERVER>`
## `admin debug force-device-list-updates`
- Forces device lists for all local and remote users to be updated (as having new keys available)
- Forcefully replaces the room state of our local copy of the specified room, with the copy (auth chain and room state events) the specified remote server says.
A common desire for room deletion is to simply "reset" our copy of the room. While this admin command is not a replacement for that, if you know you have split/broken room state and you know another server in the room that has the best/working room state, this command can let you use their room state. Such example is your server saying users are in a room, but other servers are saying they're not in the room in question.
This command will get the latest PDU in the room we know about, and request the room state at that point in time via `/_matrix/federation/v1/state/{roomId}`.
Optional argument is a character mask (a sequence of characters in any order) which enable additional extended statistics. Known characters are "abdeglmx". For convenience, a '*' will enable everything.
**Usage:** `admin debug memory-stats [OPTS]`
###### **Arguments:**
*`<OPTS>`
## `admin debug runtime-metrics`
- Print general tokio runtime metric totals
**Usage:** `admin debug runtime-metrics`
## `admin debug runtime-interval`
- Print detailed tokio runtime metrics accumulated since last command invocation
**Usage:** `admin query short short-event-id <EVENT_ID>`
###### **Arguments:**
*`<EVENT_ID>`
## `admin query short short-room-id`
**Usage:** `admin query short short-room-id <ROOM_ID>`
###### **Arguments:**
*`<ROOM_ID>`
## `admin query raw`
- raw service
**Usage:** `admin query raw <COMMAND>`
###### **Subcommands:**
*`raw-maps` — - List database maps
*`raw-get` — - Raw database query
*`raw-del` — - Raw database delete (for string keys)
*`raw-keys` — - Raw database keys iteration
*`raw-keys-sizes` — - Raw database key size breakdown
*`raw-keys-total` — - Raw database keys total bytes
*`raw-vals-sizes` — - Raw database values size breakdown
*`raw-vals-total` — - Raw database values total bytes
*`raw-iter` — - Raw database items iteration
*`raw-keys-from` — - Raw database keys iteration
*`raw-iter-from` — - Raw database items iteration
*`raw-count` — - Raw database record count
*`compact` — - Compact database
## `admin query raw raw-maps`
- List database maps
**Usage:** `admin query raw raw-maps`
## `admin query raw raw-get`
- Raw database query
**Usage:** `admin query raw raw-get <MAP> <KEY>`
###### **Arguments:**
*`<MAP>` — Map name
*`<KEY>` — Key
## `admin query raw raw-del`
- Raw database delete (for string keys)
**Usage:** `admin query raw raw-del <MAP> <KEY>`
###### **Arguments:**
*`<MAP>` — Map name
*`<KEY>` — Key
## `admin query raw raw-keys`
- Raw database keys iteration
**Usage:** `admin query raw raw-keys <MAP> [PREFIX]`
###### **Arguments:**
*`<MAP>` — Map name
*`<PREFIX>` — Key prefix
## `admin query raw raw-keys-sizes`
- Raw database key size breakdown
**Usage:** `admin query raw raw-keys-sizes [MAP] [PREFIX]`
###### **Arguments:**
*`<MAP>` — Map name
*`<PREFIX>` — Key prefix
## `admin query raw raw-keys-total`
- Raw database keys total bytes
**Usage:** `admin query raw raw-keys-total [MAP] [PREFIX]`
###### **Arguments:**
*`<MAP>` — Map name
*`<PREFIX>` — Key prefix
## `admin query raw raw-vals-sizes`
- Raw database values size breakdown
**Usage:** `admin query raw raw-vals-sizes [MAP] [PREFIX]`
###### **Arguments:**
*`<MAP>` — Map name
*`<PREFIX>` — Key prefix
## `admin query raw raw-vals-total`
- Raw database values total bytes
**Usage:** `admin query raw raw-vals-total [MAP] [PREFIX]`
###### **Arguments:**
*`<MAP>` — Map name
*`<PREFIX>` — Key prefix
## `admin query raw raw-iter`
- Raw database items iteration
**Usage:** `admin query raw raw-iter <MAP> [PREFIX]`
###### **Arguments:**
*`<MAP>` — Map name
*`<PREFIX>` — Key prefix
## `admin query raw raw-keys-from`
- Raw database keys iteration
**Usage:** `admin query raw raw-keys-from [OPTIONS] <MAP> <START>`
###### **Arguments:**
*`<MAP>` — Map name
*`<START>` — Lower-bound
###### **Options:**
*`-l`, `--limit <LIMIT>` — Limit
## `admin query raw raw-iter-from`
- Raw database items iteration
**Usage:** `admin query raw raw-iter-from [OPTIONS] <MAP> <START>`
###### **Arguments:**
*`<MAP>` — Map name
*`<START>` — Lower-bound
###### **Options:**
*`-l`, `--limit <LIMIT>` — Limit
## `admin query raw raw-count`
- Raw database record count
**Usage:** `admin query raw raw-count [MAP] [PREFIX]`
###### **Arguments:**
*`<MAP>` — Map name
*`<PREFIX>` — Key prefix
## `admin query raw compact`
- Compact database
**Usage:** `admin query raw compact [OPTIONS]`
###### **Options:**
*`-m`, `--map <MAP>`
*`--start <START>`
*`--stop <STOP>`
*`--from <FROM>`
*`--into <INTO>`
*`--parallelism <PARALLELISM>` — There is one compaction job per column; then this controls how many columns are compacted in parallel. If zero, one compaction job is still run at a time here, but in exclusive-mode blocking any other automatic compaction jobs until complete