1
0
Fork
You've already forked mitra
0
forked from silverpill/mitra
  • Rust 99.7%
  • Shell 0.2%
2026年07月02日 09:04:07 +00:00
.cargo Move clippy config from rustflags to cargo manifest 2024年05月22日 23:27:32 +00:00
.woodpecker Change MSRV to 1.85.0 2026年06月30日 14:24:42 +00:00
apx_core Parse expires attribute of integrity proof 2026年07月02日 09:04:07 +00:00
apx_sdk Parse expires attribute of integrity proof 2026年07月02日 09:04:07 +00:00
contrib Add FreeBSD rc.d script ( #237 ) 2026年06月26日 15:53:45 +02:00
docs Add filter parameter to /api/v1/groups/followed API endpoint 2026年06月26日 08:22:50 +00:00
files Add files directory, update readme 2021年11月26日 22:39:54 +00:00
logo Fix Mitra custom emoji size 2023年06月19日 12:57:28 +00:00
mitra Update tokio and actix-web packages 2026年06月11日 19:25:34 +00:00
mitra_activitypub Parse expires attribute of integrity proof 2026年07月02日 09:04:07 +00:00
mitra_adapters Add fts_config configuration option ( #234 ) 2026年06月22日 16:57:20 +02:00
mitra_api Update serde_qs package to version 1 2026年06月30日 14:24:46 +00:00
mitra_cli Rename emoji steal subcommand to emoji copy 2026年06月26日 08:58:58 +00:00
mitra_config Allow admins to push Like activities to C2S outbox 2026年06月07日 15:06:03 +00:00
mitra_models Fix error on reading portable accounts 2026年06月26日 16:07:17 +00:00
mitra_services Update monero-lws package 2026年07月01日 07:34:33 +00:00
mitra_utils Update rust-argon2 package 2026年06月30日 14:24:46 +00:00
mitra_validators Add title parameter to /api/v1/statuses form data 2026年06月17日 07:37:24 +00:00
mitra_workers Add actor to followers collection in database when creating follow relationship 2026年06月24日 17:15:11 +00:00
scripts Add TOML config example to debian package 2026年02月03日 11:53:26 +00:00
.clippy.toml Disallow unwrap() 2024年02月01日 12:57:01 +00:00
.editorconfig Create workspace and move mitractl to a separate crate 2023年01月22日 20:50:28 +00:00
.env Don't change default config file path when production feature is enabled 2025年04月16日 19:00:15 +00:00
.gitignore Add support for configuration files in TOML format 2026年01月27日 17:54:32 +00:00
Cargo.lock Implement base64-url-no-pad multibase encoding 2026年07月01日 11:49:36 +00:00
Cargo.toml Implement base64-url-no-pad multibase encoding 2026年07月01日 11:49:36 +00:00
CHANGELOG.md Parse expires attribute of integrity proof 2026年07月02日 09:04:07 +00:00
config.example.toml Warn about XSS attacks in extra_supported_types doc 2026年05月23日 08:22:53 +00:00
config.example.yaml Warn about XSS attacks in extra_supported_types doc 2026年05月23日 08:22:53 +00:00
config_dev.example.toml Update development config examples 2026年03月22日 16:34:17 +00:00
config_dev.example.yaml Update development config examples 2026年03月22日 16:34:17 +00:00
CONTRIBUTING.md Fix typos 2026年05月17日 08:52:34 +00:00
docker-compose.yaml Update monero docker images 2026年05月21日 18:28:50 +00:00
FEDERATION.md Increase post content limit to 150 kB 2026年05月13日 09:35:58 +00:00
LICENSE Initial commit 2021年09月14日 12:24:05 +00:00
README.md Change MSRV to 1.85.0 2026年06月30日 14:24:42 +00:00
SECURITY.md Add security policy 2025年08月12日 18:52:42 +00:00

Mitra logo

About

Federated micro-blogging platform.

Built on ActivityPub protocol, self-hosted, lightweight. Part of the Fediverse.

Features:

  • Micro-blogging service
    • Quote posts, custom emojis, reactions, polls and more.
    • Default character limit is 5000.
    • Support for markdown-style formatting.
    • Mastodon API.
  • Easy installation and small memory footprint (<50 MB).
  • Interoperable. Can show content from blogs, forums and other types of federated services.
  • Groups.
  • Content subscription service. Subscriptions provide a way to receive monthly payments from subscribers and to publish private content made exclusively for them.
    • Supported payment methods: Monero, a peer to peer digital cash system where transactions are private by default.
  • Account migrations (from one server to another). Identity can be detached from the server.
  • Federation over Tor and/or I2P.

Follow: @mitra@mitra.social

Matrix chat: #mitra:unredacted.org

Instances

Demo instance: https://public.mitra.social/ (invite-only)

Supported clients

Requirements

  • PostgreSQL 15+
  • Rust 1.85+ (when building from source)
  • SSL certificates (i.e. ca-certificates package).

Minimum system requirements:

  • 256 MB RAM (1.5 GB for building from source)
  • 10 GB storage for average single user instance with default configuration

Installation

Debian package

Download package from the Releases page.

Install Mitra:

dpkg -i mitra_amd64.deb

Install PostgreSQL, then create the database:

CREATEUSERmitraWITHPASSWORD'mitra';CREATEDATABASEmitraOWNERmitraENCODING'UTF8';

Open configuration file /etc/mitra/config.yaml and configure the instance.

Create admin account:

su mitra -s $SHELL -c "mitra create-account <username> <password> admin"

Start Mitra:

systemctl enable --now mitra

An HTTP server will be needed to handle HTTPS requests. See examples of Nginx and Caddy configuration files.

Building from source

Install cargo.

Clone the git repository or download the source archive from the Releases page.

Navigate to the repository directory. Then run:

cargo build --release --features production

This command will produce a mitra binary in target/release directory.

Install PostgreSQL, then create the database:

CREATEUSERmitraWITHPASSWORD'mitra';CREATEDATABASEmitraOWNERmitraENCODING'UTF8';

Create configuration file by copying config.example.yaml or config.example.toml, and configure the instance. Default config file path is config.yaml, but it can be changed using CONFIG_PATH environment variable.

Create data and web client directories at locations specified in the configuration file (storage_dir and web_client_dir parameters).

Put any static files into the web client directory. Building instructions for mitra-web frontend can be found at https://codeberg.org/silverpill/mitra-web#project-setup.

Create admin account:

./mitra create-account <username> <password> admin

Start Mitra:

./mitra server

An HTTP server will be needed to handle HTTPS requests. See examples of Nginx and Caddy configuration files.

To run Mitra as a systemd service, check out the systemd unit file example.

Other installation methods

These images and packages are maintained by the community.

Docker images

Alpine Linux

Install from testing repository:

echo '@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
apk update
apk add -vi mitra@testing

Nix

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/mi/mitra/package.nix

YunoHost

https://apps.yunohost.org/app/mitra

Upgrading

Mitra uses semantic versioning (major.minor.patch):

  • patch - bugfixes
  • minor - improvements and new features
  • major - breaking changes

Upgrade to a minor or a patch version is performed by replacing binaries and restarting the service.

Upgrade to a major version requires special migration steps that are documented in release notes.

Debian package

Install package:

dpkg -i mitra_amd64.deb

The server will be stopped automatically during installation. Do not overwrite existing configuration file if asked.

Start Mitra again when the installation is complete:

systemctl start mitra

Configuration

Examples

Environment variables

See defaults.

Tor/I2P federation

See Tor guide and I2P guide.

Payments

Subscriptions can be used without enabling Monero integration.

IPFS integration (experimental)

See guide.

IPFS integration is not actively maintained and may be removed in the future.

Administration

CLI

CLI is stable and breaking changes don't happen in minor releases.

Documentation

REST API

The majority of endpoints imitate Mastodon API. Some Pleroma extensions are supported as well. A number of additional endpoints exist for features that are unique to Mitra.

Client API is stable and breaking changes don't happen in minor releases.

OpenAPI spec

Federation

See FEDERATION.md

ActivityPub Client API

This API is not stable and may be removed in the future.

Documentation

Development

See CONTRIBUTING.md

Start database server

docker-compose up -d

Test connection:

psql -h localhost -p 55432 -U mitra mitra

Start Monero node and wallet server

(this step is optional)

docker-compose --profile monero up -d

Run web service

Create config file, adjust settings if needed:

cp config_dev.example.yaml config.yaml

Compile and run service:

cargo run server

Run CLI

cargo run

Run linter

cargo clippy

Run tests

cargo test

License

AGPL-3.0

Support

Monero: 8Ahza5RM4JQgtdqvpcF1U628NN5Q87eryXQad3Fy581YWTZU8o3EMbtScuioQZSkyNNEEE1Lkj2cSbG4VnVYCW5L1N4os5p