Configure

The server is configured by environment variables, all prefixed RIM_ except DATABASE_URL and the log filter RUST_LOG. In development an untracked .env file works too. This page is generated from rim_server/src/config.rs, cross-checked with the variable block of the Dockerfile; the compose stack's own settings are in deploy/.env.example.

Listening #

Where the server listens, the origin clients reach it at, and how it treats the proxy in front of it.

VariableWhat it does
RIM_SERVER_HOSTdefault 0.0.0.0

Bind address.

No doc comment in config.rs; described from the Dockerfile.

The container image sets 0.0.0.0.

RIM_SERVER_PORTdefault 8080

Listen port.

No doc comment in config.rs; described from the Dockerfile.

The container image sets 8080.

RIM_PUBLIC_BASE_URLunset by default

e.g. https://rim.example.com. Required to build clickable invite links; without it, invite emails fall back to including the bare token.

Dockerfile: https origin; turns server-to-server traffic on. This or RIM_KEY_LOGIN_AUDIENCES is required: the server binds 0.0.0.0 and refuses to start without an audience for key logins.

RIM_CORS_ALLOWED_ORIGINunset by default

one browser origin accepted besides the server's own (optional); the own origin is RIM_PUBLIC_BASE_URL's, else the request's Host.

No doc comment in config.rs; described from the Dockerfile.

RIM_TRUST_FORWARDED_HEADERSdefault false

When true, the server takes the real client IP for rate-limiting and IP blocks from the first entry of X-Forwarded-For; Forwarded is never read. Only enable this when a trusted reverse proxy (Nginx, Caddy, Traefik, …) is the sole entry point and replaces any X-Forwarded-For the client sent; enabling it without such a proxy lets attackers spoof their IP and defeat the rate limiters.

Dockerfile: Read the client address from X-Forwarded-For / Forwarded when true; only behind a reverse proxy that is the sole way in.

RIM_FORCE_SECURE_COOKIESdefault false

When true, all session and CSRF cookies are issued with Secure=true regardless of the incoming request scheme or X-Forwarded-Proto header. Use this for direct-HTTPS deployments where the reverse proxy does not forward the X-Forwarded-Proto header.

Dockerfile: Mark session and CSRF cookies Secure whatever the request scheme when true.

RIM_KEY_LOGIN_AUDIENCESunset by default

Comma-separated host[:port] values a key login proof may name as its audience.

The audiences a key login proof may name: this server's host[:port] as clients reach it. A proof naming another server is refused, so a server that receives a proof cannot replay it elsewhere.

RIM_KEY_LOGIN_AUDIENCES when set; otherwise the host of RIM_PUBLIC_BASE_URL; otherwise localhost:PORT and 127.0.0.1:PORT, but only for a server bound to a loopback address. Lowercased.

Refused at boot with a message naming both variables when neither is set and RIM_SERVER_HOST accepts connections from other machines.

Dockerfile: comma-separated host[:port] clients reach this server at.

Database and data #

PostgreSQL, the data directory, uploaded files and the key files. The data directory holds the server's identity: back it up.

VariableWhat it does
DATABASE_URLrequired

PostgreSQL connection string.

No doc comment in config.rs; described from the Dockerfile.

RIM_DATABASE_MAX_CONNECTIONSdefault 10

Largest number of Postgres connections the server's pool opens; unset keeps the driver's default of 10.

Unset, it keeps the driver's default of 10.

Dockerfile: Size of the PostgreSQL pool.

RIM_DATA_DIRdefault ./data

Data directory.

No doc comment in config.rs; described from the Dockerfile.

The container image sets /app/data.

RIM_STORAGE_LOCAL_PATHdefault $RIM_DATA_DIR/files; this image sets /app/data/uploads

Directory of uploaded files (attachments, custom emoji, plugin bundles), created when missing; unset uses files under RIM_DATA_DIR.

Unset, it uses `files` under `RIM_DATA_DIR`.

Dockerfile: Directory of uploaded files.

The container image sets /app/data/uploads.

RIM_MAX_WORKSPACE_STORAGE_BYTESdefault 1073741824

Bytes one workspace may store: its attachments, uploads in progress included, and its plugin bundles; an upload past it is refused. Default 1 GiB (1073741824).

Dockerfile: Bytes of attachments and plugin bundles one workspace may store.

RIM_SERVER_KEY_FILEdefault <RIM_DATA_DIR>/server-key.json

Path of the server key file. Default <RIM_DATA_DIR>/server-key.json.

Dockerfile: Server key file; keep the data directory on a volume, the key is the server's identity.

RIM_FRANKING_KEY_FILEdefault <RIM_DATA_DIR>/franking-key.json

Path of the franking key file. Default <RIM_DATA_DIR>/franking-key.json.

Dockerfile: Franking key file.

RIM_PASSWORD_KEY_FILEdefault <RIM_DATA_DIR>/password-key.json

Path of the password key file: the OPAQUE server setup account passwords are registered and checked with, and the key the accounts' server shares are sealed under. Created at first start; the server refuses to start when it is missing while passwords are stored. Back it up with the database: without it every account resets its password with its recovery phrase. Default <RIM_DATA_DIR>/password-key.json.

Dockerfile: OPAQUE setup and share key of account passwords.

Signups and sessions #

Who may sign up and how, the names nobody may take, the probation of new accounts, the workspace every new account joins, how long a session lasts and how long a deleted account waits before its purge. The default is invite-only; invites come from the command line.

VariableWhat it does
RIM_OPEN_REGISTRATIONdefault false

Set RIM_OPEN_REGISTRATION=true to enable open signup.

Dockerfile: Let anyone sign up, rate-limited, when true.

RIM_REGISTRATION_POW_BITSunset by default

Leading zero bits a key-only signup's proof-of-work needs; set, it turns on pow registration. 1 to 40.

Dockerfile: turns on proof-of-work signups with that many leading zero bits.

RIM_DEFAULT_WORKSPACEdefault none

The id of a workspace on this server that every new account joins as a member, with its public channels, whichever way it signs up. Unset keeps signups as they are: a new account joins only the workspace its invite names. The server refuses to start when the workspace does not exist here or is the direct space.

RIM_DEFAULT_WORKSPACE, trimmed; None when unset or blank. Whether the workspace exists is checked against the database at start.

Unset, it keeps signups as they are: a new account joins only the workspace its invite names.

Refused at boot with a message naming the variable when the value is not a workspace id.

Dockerfile: id of a workspace here every new account joins as a member; one that does not exist stops the server at boot.

RIM_DEFAULT_WORKSPACE_FILEdefault none

A JSON file describing the default workspace: its name, DM policy and channels. While nobody has claimed it, each start writes a single-use owner claim link to <RIM_DATA_DIR>/owner-claim.txt; the account that signs up through the link creates the workspace and owns it, and every later start applies the file to it again. Unset, no file is read. Cannot be set together with RIM_DEFAULT_WORKSPACE.

Where the default workspace comes from: the workspace RIM_DEFAULT_WORKSPACE names, the definition RIM_DEFAULT_WORKSPACE_FILE holds (read and checked here, its claim link file in the data directory), or neither.

Refused at boot with a message naming both variables when both are set, the message of default_workspace, or one naming the file and the field it refuses.

Dockerfile: JSON definition of the default workspace; unclaimed, each start writes a single-use owner claim link to <RIM_DATA_DIR>/owner-claim.txt; an invalid file stops the server.

RIM_RESERVED_NAMESdefault none

Comma-separated usernames and display names signups and profile edits refuse, with each followed by -, _, . or a space; the signup through the owner claim link may take them.

RIM_RESERVED_NAMES, compared case-insensitively after NFKC normalisation; nothing is reserved when it is unset or blank.

Refused at boot with a message naming the variable when an entry is empty, as in rim,,admin.

Dockerfile: comma-separated usernames and display names signups and profile edits refuse, also followed by -, _, . or a space; an empty entry stops the server at boot.

RIM_PROBATION_HOURSdefault off

Hours after its creation during which an account cannot create a workspace, write a workspace's shared state, send a DM request to a stranger or set a profile picture, status or bio; an instance operator is never on probation. Unset or 0 turns probation off.

Unset, it turns probation off.

Dockerfile: hours after creation during which an account creates no workspace, writes no shared workspace state and sends no DM request to a stranger; never an instance operator.

RIM_SESSION_TTL_DAYSdefault 30

Session lifetime.

No doc comment in config.rs; described from the Dockerfile.

RIM_TERMS_URLdefault none

The terms of service every signup accepts, an absolute http(s) URL, for terms hosted elsewhere.

RIM_TERMS_URL, trimmed; None when unset or blank.

Refused at boot with a message naming the variable when the value is not an absolute http or https URL with a host.

Dockerfile: absolute http(s) URL of the terms of service; set, every signup must accept it; a malformed URL stops the server at boot.

RIM_TERMS_FILEdefault none

Path of a Markdown file holding the terms of service every signup accepts. The server reads it at start, refuses to start when it is missing, unreadable, empty or larger than 64 KiB, and serves it as a page at /api/terms; that page is then the terms URL. Cannot be set together with RIM_TERMS_URL.

Dockerfile: path of a Markdown file of the terms of service, served at /api/terms, which every signup then accepts; a missing, empty or oversized file, a FILL: placeholder in it, or RIM_TERMS_URL set too stops the server at boot.

RIM_MINIMUM_AGEdefault none

The age, 13 to 21, every signup confirms the person has reached; unset asks for no confirmation. The age is self-declared: nothing checks it.

RIM_MINIMUM_AGE; None when unset.

Refused at boot with a message naming the variable when the age is outside 13..=21.

Dockerfile: age, 13-21, every signup confirms the person has reached; self- declared; outside the range stops the server at boot.

RIM_ACCOUNT_DELETION_GRACE_DAYSdefault 14

Days between an account's deletion request and its purge, 0 to 30; default 14.

Refused at boot with a message naming the variable when the value is above 30.

Dockerfile: days between an account's deletion request and its purge, 0-30; outside the range stops the server at boot.

Roles and federation #

Whether the server is a relay, a host or both, the domain of its people's handles, which servers it talks to, who outside a shared workspace may start a DM, and the per-user quotas of a relay.

VariableWhat it does
RIM_ROLEdefault both

relay, host or both (default).

Refused at boot with a message naming the value when it is not relay, host or both.

Dockerfile: relay, host or both.

RIM_HANDLE_DOMAINdefault the host of RIM_PUBLIC_BASE_URL, else localhost

The domain of this server's handles: people here are @<username>:<domain>, and the signed descriptor declares it as handleDomain. A lowercase DNS name; default the host of RIM_PUBLIC_BASE_URL, else localhost. A domain other than that host must serve {"delegate": "<this server's origin>"} at /.well-known/rim-server, or other servers show no handles for people here.

The domain of this server's handles: RIM_HANDLE_DOMAIN, trimmed and lowercased; when unset or empty, the host of RIM_PUBLIC_BASE_URL, else localhost.

Refused at boot with a message naming RIM_HANDLE_DOMAIN when the domain is not a DNS name (an IPv6 host of RIM_PUBLIC_BASE_URL is not one, and needs the variable set).

Dockerfile: domain of handles, @<username>:<domain>; another domain delegates to this server.

RIM_HOST_ALLOWED_RELAYSdefault any

Comma-separated server ids allowed on host endpoints; empty allows any relay.

Refused at boot with a message naming the first entry that is not a server id.

Dockerfile: Server ids allowed on host endpoints, comma-separated.

RIM_DM_INBOUNDdefault requests

DMs from people on other servers, and from people here who share no workspace with the recipient: open (no floor), requests (default: their first message is a request the recipient accepts), partners (only people on the servers RIM_DM_PARTNERS lists, and on this one, with a request; other servers get no identity or key package of anyone here) or none (nobody outside a shared workspace; other servers get no identity or key package). Members of a shared workspace follow the workspace's rules instead.

Refused at boot with a message naming the variable whose value is not one it takes, or the first partner that is not a server id.

Dockerfile: DMs from other servers, and from people here who share no workspace with the recipient: open, requests (their first message is a request the recipient accepts), partners (only people on the RIM_DM_PARTNERS servers and this one, with a request) or none; with partners or none other servers get no identity of anyone here.

RIM_DM_OUTBOUNDdefault allowed

DMs people here start with people on other servers: allowed (default), partners (only with people on the servers RIM_DM_PARTNERS lists) or none.

Dockerfile: DMs people here start with people on other servers: allowed, partners (only with people on the RIM_DM_PARTNERS servers) or none.

RIM_DM_PARTNERSdefault none

Comma-separated server ids the partners settings of RIM_DM_INBOUND and RIM_DM_OUTBOUND name.

Dockerfile: Server ids the partners settings of RIM_DM_INBOUND and RIM_DM_OUTBOUND name, comma-separated.

RIM_S2S_DENIED_PEERSunset by default

Comma-separated server ids refused on every server-to-server endpoint.

Refused at boot with a message naming the first entry that is not a server id.

Dockerfile: Server ids refused on every server-to-server endpoint, comma-separated.

RIM_S2S_PEER_RATE_PER_MINdefault 600

Server-to-server requests accepted per peer per minute, per node. Default 600.

Dockerfile: Server-to-server requests per peer per minute.

RIM_S2S_MAX_BODY_BYTESdefault 8388608

Largest server-to-server request body. Default 8 MiB.

Dockerfile: Largest server-to-server request body.

RIM_S2S_ALLOW_PRIVATE_ADDRESSESdefault false

Allow peers on loopback, private, link-local and unique-local addresses (development and tests only).

Dockerfile: Allow peers on private addresses when true; development only.

RIM_S2S_ALLOW_HTTPdefault false

Allow server-to-server traffic over plain http (development and tests only).

Dockerfile: Allow server-to-server traffic over http when true; development only.

RIM_S2S_DEVICE_RATE_PER_MINdefault 120

Forwarded requests accepted per device per minute. Default 120.

Dockerfile: Forwarded requests per device per minute.

RIM_S2S_SUBSCRIPTIONS_PER_PEERdefault 10,000

Active delegations one relay may hold on this host. Default 10,000.

Dockerfile: Delegations one relay may hold on this host.

RIM_S2S_PEER_DEAD_AFTER_HOURSdefault 24, from 1 to 168

Hours every delivery to a relay may fail before it is dead: host events are no longer queued for it until a delivery succeeds again. Default 24, from 1 to 168.

Dockerfile: Hours of failed deliveries before a relay is dead and gets nothing queued, 1 to 168.

RIM_RELAY_QUEUE_BYTES_PER_USERdefault 256 MiB

Bytes queued per local user before the oldest items are dropped. Default 256 MiB.

Dockerfile: bytes queued per local user before the oldest items are dropped, at least 1048576.

RIM_RELAY_RETENTION_DAYSdefault 30

Days queued items and DM requests are kept. Default 30.

Dockerfile: days queued items and DM requests are kept, 1-365.

RIM_RELAY_CARD_MAX_BYTESdefault 131072

Largest profile card, in bytes. Default and most 131072.

Dockerfile: largest profile card, 1024-131072.

RIM_RELAY_KEY_PACKAGES_PER_DEVICEdefault 100

Unclaimed one-time key packages per device and cipher suite. Default 100.

Dockerfile: unclaimed key packages per device, 1-1000.

RIM_RELAY_DEVICES_PER_USERdefault 32

Devices that are not revoked, per user. Default 32.

Dockerfile: devices per user that are not revoked, 1-64.

RIM_RELAY_FORWARDS_PER_USER_PER_DAYdefault 50000

Requests a user sends through /api/remote/… per day. Default 50000.

Dockerfile: requests a user sends through /api/remote per day.

RIM_RELAY_DM_REQUESTS_PER_DAYdefault 20

DM requests one sender principal files here per day, and invites a local user sends to people on other servers per day. Default 20.

Dockerfile: DM requests one sender files here, and invites a local user sends to other servers, per day.

Mail #

Transactional email. Without RIM_SMTP_HOST and RIM_SMTP_FROM mail is only logged and the email feature reports itself unavailable.

VariableWhat it does
RIM_NOTIFICATION_DIGEST_INTERVAL_SECSdefault 900

How often (seconds) the notification digest job looks for due digests. Default: 900 (15 minutes); values below 60 are raised to 60.

Dockerfile: Seconds between digest runs, at least 60.

RIM_SMTP_HOSTunset by default

SMTP server; without it or RIM_SMTP_FROM mail is only logged.

No doc comment in config.rs; described from the Dockerfile.

RIM_SMTP_PORTdefault 587

Defaults to 587 (STARTTLS) when unset.

Dockerfile: SMTP port.

RIM_SMTP_USERNAMEdefault none, unauthenticated

SMTP user name.

No doc comment in config.rs; described from the Dockerfile.

RIM_SMTP_PASSWORDdefault none

SMTP password.

No doc comment in config.rs; described from the Dockerfile.

RIM_SMTP_FROMunset by default

The From: address/mailbox, e.g. "RIM <noreply@example.com>".

Dockerfile: From address, e.g. RIM noreply@example.org.

RIM_SMTP_TLSdefault starttls

"starttls" (default) | "implicit" | "none" (dev/localhost only).

Dockerfile: starttls, implicit or none.

Operations #

Metrics, the audit log, features switched off on this instance, logging, the notice shown to people, and how many link preview fetches and password hashes run at once.

VariableWhat it does
RIM_METRICS_ADDRdefault off

host:port of the Prometheus listener serving GET /metrics; unset turns metrics off.

Unset, it turns metrics off.

Refused at boot with a message naming the variable when the value is not an ip:port address.

Dockerfile: ip:port of the Prometheus /metrics listener. In a container bind 0.0.0.0:9090 and do not publish it: keep it on an internal network, never behind the public proxy.

RIM_AUDIT_LOG_PATHdefault the working directory

Directory of the daily audit files audit.<YYYY-MM-DD>.log

Read by rim_logging/src/logging.rs, not config.rs.

RIM_AUDIT_RETENTION_DAYSdefault forever

Days command audit log rows are kept before the daily purge exports and deletes them; unset keeps them forever. 1 to 3650.

Unset, it keeps them forever.

Refused at boot with a message naming the variable when the value is outside 1 to 3650.

Dockerfile: days command audit rows are kept, 1-3650; older rows are exported to $RIM_DATA_DIR/audit-exports and deleted daily.

RIM_AUDIT_LOG_RETENTION_DAYSdefault 90

Days the daily audit files (audit.<YYYY-MM-DD>.log in the directory of RIM_AUDIT_LOG_PATH) are kept; a file whose day is further back is deleted daily. 1 to 3650, default 90.

Refused at boot with a message naming the variable when the value is outside 1 to 3650.

Dockerfile: Days the audit files are kept.

RIM_AUDIT_EXPORT_RETENTION_DAYSunset by default

Days an audit export file in <data dir>/audit-exports/ is kept after it was written; an older one is deleted daily. Unset keeps every export. 1 to 3650.

Unset, it keeps every export.

Refused at boot with a message naming the variable when the value is outside 1 to 3650.

Not in the Dockerfile's variable block.

RIM_FEATURES_DISABLEDdefault none

Comma-separated optional features switched off on this instance, e.g. attachments,custom_emoji; unset or empty keeps every feature on.

RIM_FEATURES_DISABLED as features; empty when unset.

Unset, it keeps every feature on.

Refused at boot with a message naming the variable and the first name that is not a feature, so a typo stops the server instead of leaving a feature on.

Dockerfile: comma-separated optional features to switch off: attachments, link_previews, email, custom_emoji, workspace_plugins, ai_commands, avatars; an unknown name stops the server at boot.

RUST_LOGdefault info

Log filter, e.g. info or rim_server=debug.

The logger reads it, not config.rs.

RIM_ENABLE_GRAPHIQLdefault false

Serve the GraphiQL explorer at GET /api when true.

No doc comment in config.rs; described from the Dockerfile.

RIM_INSTANCE_NOTICEdefault none

A short text shown to people on this instance, at most 500 characters.

RIM_INSTANCE_NOTICE, trimmed; None when unset or blank.

Refused at boot with a message naming the variable when the notice is longer than 500 characters.

Dockerfile: a short text shown to people on this instance, at most 500 characters; longer stops the server at boot.

RIM_ABUSE_CONTACTdefault none

Where to report abuse on this server: an email address or an https URL, published in the signed server descriptor and in serverInfo.

RIM_ABUSE_CONTACT, trimmed; None when unset or blank.

Refused at boot with a message naming the variable when the value is neither an email address nor an absolute https URL, or is longer than [rim_s2s::descriptor::MAX_ABUSE_CONTACT_BYTES] bytes.

Dockerfile: email address or https URL for abuse reports, in the signed descriptor and serverInfo; anything else stops the server at boot.

Profile pictures #

How many profile pictures an account may upload per hour and per day, and the image check that scores each picture before it is stored: refused at the block threshold, stored and reported to the operators at the report threshold.

VariableWhat it does
RIM_AVATAR_UPLOADS_PER_HOURdefault 5

Profile picture uploads one account makes per hour; every upload attempt counts, removing a picture does not, and instance operators are exempt. Defaults to 5; 0 turns the hourly limit off.

Not in the Dockerfile's variable block.

RIM_AVATAR_UPLOADS_PER_DAYdefault 20

Profile picture uploads one account makes per day; every upload attempt counts, removing a picture does not, and instance operators are exempt. Defaults to 20; 0 turns the daily limit off.

Not in the Dockerfile's variable block.

RIM_AVATAR_CHECK_URLdefault none, pictures unchecked

Base URL of the image check service every uploaded profile picture is scored by, an absolute http(s) URL; unset or blank checks nothing.

The profile picture check: RIM_AVATAR_CHECK_URL, trimmed, with RIM_AVATAR_CHECK_BLOCK and RIM_AVATAR_CHECK_REPORT or their defaults. None when the URL is unset or blank; the thresholds are checked either way.

Refused at boot with a message naming the variable when the URL is not an absolute http or https URL with a host, when a threshold is outside (0, 1], or when the report threshold is above the block threshold.

Dockerfile: base URL of the image check service (imagecheck/) every uploaded profile picture is scored by; while it is down picture uploads answer 503.

RIM_AVATAR_CHECK_BLOCKdefault 0.85

The highest category score, in (0, 1], at or above which an uploaded profile picture is refused. Defaults to 0.85.

Dockerfile: highest score at or above which a picture is refused, in (0, 1].

RIM_AVATAR_CHECK_REPORTdefault 0.60

The highest category score, in (0, 1] and at most the block threshold, at or above which an uploaded profile picture is stored and reported to the operators. Defaults to 0.60.

Dockerfile: highest score at or above which a picture is stored and reported to the operators, in (0, 1] and at most the block one; a bad value stops the server at boot.

Text art checks #

The score at which the imagecheck service flags text art for review by moderators and operators.

VariableWhat it does
RIM_TEXT_ART_CHECK_FLAGdefault 0.60

The sexual score, in (0, 1], at or above which a workspace message that looks like text art is flagged and reported, scored by the service at RIM_AVATAR_CHECK_URL. Defaults to 0.60.

The text art check: the image check service of avatar_check with RIM_TEXT_ART_CHECK_FLAG or its default. None when RIM_AVATAR_CHECK_URL is unset or blank; the threshold is checked either way.

Refused at boot with a message naming the variable when the threshold is outside (0, 1], or the message of avatar_check.

Dockerfile: sexual score at or above which a workspace message that looks like text art is flagged and reported, scored by the service at RIM_AVATAR_CHECK_URL, in (0, 1]; a bad value stops the server at boot.

Limits and rate limits #

Request, mutation, message and connection limits of the API, and how often open WebSocket connections recheck their session. Each rate limit is off until set.

VariableWhat it does
RIM_API_MAX_BATCHdefault 20

Most GraphQL requests in one batch. Default 20.

Dockerfile: GraphQL requests in one batch.

RIM_WS_SESSION_RECHECK_SECSdefault 30

Seconds between rechecks of the sessions WebSocket connections run under; unset is 30, 0 turns the recheck off.

Dockerfile: seconds between rechecks of the sessions WebSocket connections run under, closing those that ended elsewhere.

RIM_RATE_REQUESTS_PER_MIN_PER_IPdefault off

Requests one client address sends to /api routes per minute, with a burst of the same size; unset or 0 sets no limit.

Unset, it sets no limit.

Dockerfile: requests per client address per minute to /api routes, with a burst of the same size; over it 429.

RIM_RATE_MUTATIONS_PER_MIN_PER_SESSIONdefault off

Mutation fields one session runs per minute, counted per GraphQL request; a request another server forwards counts per device, other callers without a session per address. Unset or 0 sets no limit.

Unset, it sets no limit.

Dockerfile: mutation fields per session per minute.

RIM_RATE_MESSAGES_PER_MIN_PER_USERdefault off

Messages one user sends per minute; unset or 0 sets no limit.

Unset, it sets no limit.

Dockerfile: messages per user per minute.

RIM_RATE_MESSAGES_BURSTdefault the per-minute number

Messages one user may send at once before the per-minute rate applies; unset uses the per-minute number.

Unset, it uses the per-minute number.

Dockerfile: messages a user may send at once.

RIM_RATE_WS_CONNECTIONS_PER_USERdefault off

WebSocket connections one user holds open at once; unset or 0 sets no limit.

Unset, it sets no limit.

Dockerfile: open WebSocket connections per user.

RIM_RATE_SUBSCRIPTIONS_PER_CONNECTIONdefault off

Subscriptions one WebSocket connection holds at once; unset or 0 sets no limit.

Unset, it sets no limit.

Dockerfile: subscriptions per WebSocket connection.

RIM_RATE_PROBATION_MESSAGES_PER_MINdefault the normal rate

Messages an account in probation sends per minute, with a burst of the same size, instead of the normal message rate; unset or 0 keeps the normal rate.

Unset, it keeps the normal rate.

Dockerfile: messages per minute of an account in probation, instead of the normal rate.

Instance limits #

How much of each thing the instance holds. Each is off until set, except the pending invitations to encrypted conversations; past one a write answers VALIDATION naming the cap, and clients read them from serverInfo.limits.

VariableWhat it does
RIM_LIMIT_WORKSPACES_PER_USERunset by default

Workspaces one user owns, created or handed over to them.

Dockerfile: workspaces one user owns, created or handed over.

RIM_LIMIT_MEMBERS_PER_WORKSPACEunset by default

Members of one workspace; the direct space has no cap.

Dockerfile: members of a workspace (the direct space has none).

RIM_LIMIT_CHANNELS_PER_WORKSPACEunset by default

Unarchived channels of one workspace, public and private; all its channels, archived ones included, are capped at five times this.

Dockerfile: unarchived channels of a workspace, public and private.

RIM_LIMIT_DEVICES_PER_USERunset by default

Devices on one account; the stricter of this and RIM_RELAY_DEVICES_PER_USER applies.

Dockerfile: devices on one account; the stricter of this and RIM_RELAY_DEVICES_PER_USER applies.

RIM_LIMIT_DM_REQUESTS_PER_DAYunset by default

DM requests one user sends to strangers per day; the stricter of this and RIM_RELAY_DM_REQUESTS_PER_DAY applies.

Dockerfile: DM requests to strangers per user per day; the stricter of this and RIM_RELAY_DM_REQUESTS_PER_DAY applies.

RIM_LIMIT_MACROS_PER_WORKSPACEunset by default

Macros of one workspace; a member who is neither Owner nor Moderator holds at most a fifth of them.

Dockerfile: macros of a workspace; a member holds a fifth.

RIM_LIMIT_PIPELINES_PER_WORKSPACEunset by default

Pipelines of one workspace; a member who is neither Owner nor Moderator holds at most a fifth of them.

Dockerfile: pipelines of a workspace; a member holds a fifth.

RIM_LIMIT_PLUGINS_PER_WORKSPACEunset by default

Plugins of one workspace's registry.

Dockerfile: plugins of a workspace's registry.

RIM_LIMIT_INVITES_PER_USER_PER_DAYdefault 50

Workspace invites one user creates per day, and invite emails one user has sent in the last 24 hours; unlike most caps it defaults to 50, and 0 turns it off.

Dockerfile: workspace invites one user creates per day.

RIM_LIMIT_INVITE_MAX_USESunset by default

Uses one invite may have.

Dockerfile: the uses one invite may have.

RIM_LIMIT_MESSAGE_BYTESunset by default

Bytes of one message's text, at most 65536.

Dockerfile: bytes of a message's text, at most 65536; more stops the server at boot.

RIM_LIMIT_PENDING_INVITES_PER_USERdefault 50

Pending invitations to encrypted conversations one user holds; unlike the other caps it defaults to 50, and 0 turns it off.

Dockerfile: pending invitations to encrypted conversations one user holds; unlike the others it is on unless set to 0.

RIM_LIMIT_ACCOUNTSunset by default

Local accounts the instance holds, those waiting out a deletion grace period included; at the cap every signup path is refused as full, an operator's instance invite too.

Dockerfile: local accounts the instance holds, those in their deletion grace period included; at it every signup answers REGISTRATION_FULL.

Command line #

Run without arguments, rim_server (/app/rim-server in the image) starts the server. The subcommands read the same configuration and exit:

rim_server --version
rim_server invite create [--email <address>] [--max-uses <1-50>] [--expires-in-days <1-30>] [--public-url <url>]
rim_server invite list
rim_server invite revoke <invite-id>
rim_server server-key show | rotate | recover --recovery-key-file <file> [--new-recovery-key]
rim_server peer reset | block | unblock <server-id>
rim_server franking-key show | rotate
rim_server principal block <principal-id> --reason <text> [--cascade]
rim_server principal unblock <principal-id>
rim_server principal show <principal-id>
rim_server principal list
rim_server abuse-reports list [--open]
rim_server abuse-reports add [--principal <principal-id>] [--server <server-id>] --reason <text>
rim_server abuse-reports resolve <report-id>
rim_server audit purge [--dry-run] [--older-than-days <1-3650>]
rim_server ip block <cidr> --reason <text> [--expires-in-days <1-365>]
rim_server ip unblock <cidr>
rim_server ip list
rim_server account purge [--dry-run]
rim_server operator grant <username>
rim_server operator revoke <username>
rim_server operator list

invite create prints a signup link; with --email the account it signs up gets that address. docs/server-identity.md explains the key and peer commands, docs/relay.md and docs/operations/relay-public.md the abuse tools, docs/operations/audit-retention.md the purge. ip block refuses an address or CIDR range, IPv4 or IPv6, on every route but /healthz (docs/self-hosting.md, "Limits and blocking"). account purge purges the accounts whose deletion grace period ended now instead of at the next hourly run (docs/self-hosting.md, "Deleted accounts"). operator grant lets an account run the abuse reports, principal blocks and IP blocks from the app (docs/api.md, "Instance moderation").

Generated from rim-server/rim_server/src/config.rs, Dockerfile and README.md at 2dd12c8