1
0
Fork
You've already forked mitra
0
forked from silverpill/mitra
Federated social network
  • Rust 99.8%
  • Shell 0.1%
2024年11月11日 19:00:42 +00:00
.cargo Move clippy config from rustflags to cargo manifest 2024年05月22日 23:27:32 +00:00
apx_core Add package-level documentation strings to apx_core and apx_sdk 2024年11月11日 19:00:42 +00:00
apx_sdk Add package-level documentation strings to apx_core and apx_sdk 2024年11月11日 19:00:42 +00:00
contrib Reduce number of log files in monero-wallet-rpc config example 2024年09月19日 19:06:57 +00:00
docs Add gemini: to the list of supprorted autolink schemes 2024年11月08日 18:15:34 +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_activitypub Add federation.deliverer_pool_size configuration option 2024年11月07日 23:02:51 +00:00
mitra_adapters Improve logging of media deletions 2024年11月06日 22:42:01 +00:00
mitra_cli Implement Copy for integer enums in mitra_models package 2024年11月03日 16:35:41 +00:00
mitra_config Add federation.deliverer_pool_size configuration option 2024年11月07日 23:02:51 +00:00
mitra_models Support "conversation" visibility for replies to followers-only posts 2024年11月06日 13:59:25 +00:00
mitra_services Update chrono package 2024年10月20日 19:04:36 +00:00
mitra_utils Add post title to og:title value 2024年11月07日 18:57:20 +00:00
mitra_validators Allow followers-only self-replies to followers-only posts 2024年11月06日 13:01:06 +00:00
scripts Add SQL query for generating remote media report 2024年10月21日 00:49:09 +00:00
src Add post title to og:title value 2024年11月07日 18:57:20 +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 Refactor parse_env function and fix documentation 2024年08月29日 13:44:12 +00:00
.gitignore Add files directory, update readme 2021年11月26日 22:39:54 +00:00
Cargo.lock Bump version 2024年11月07日 23:04:12 +00:00
Cargo.toml Bump version 2024年11月07日 23:04:12 +00:00
CHANGELOG.md Bump version 2024年11月07日 23:04:12 +00:00
config.example.yaml Remove node_url parameter from Monero configuration 2024年09月06日 10:30:27 +00:00
config_dev.example.yaml Change locations of configuration file examples 2024年01月10日 16:35:41 +00:00
CONTRIBUTING.md Update CONTRIBUTING.md 2024年06月03日 22:24:49 +00:00
docker-compose.yaml Remove version directive from docker-compose file 2024年10月19日 07:54:27 +00:00
FEDERATION.md Update list of supported activities in FEDERATION.md 2024年10月02日 20:00:51 +00:00
LICENSE Initial commit 2021年09月14日 12:24:05 +00:00
README.md Document upgrade procedure 2024年11月11日 15:11:51 +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 and more.
    • Default character limit is 5000.
    • Support for a limited subset of markdown-style formatting.
  • Easy installation and small memory footprint (<50 MB).
  • Mastodon API.
  • 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:hackliberty.org

Instances

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

Supported clients

Requirements

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

Minimum system requirements:

  • 256 MB RAM (1 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 "mitractl create-account <username> <password> admin"

Start Mitra:

systemctl start mitra

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

Building from source

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

Install cargo. Then run:

cargo build --release --features production

This command will produce two binaries in target/release directory, mitra and mitractl.

Install PostgreSQL, then create the database:

CREATEUSERmitraWITHPASSWORD'mitra';CREATEDATABASEmitraOWNERmitraENCODING'UTF8';

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

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

Create admin account:

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

Start Mitra:

./mitra

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 image

https://hub.docker.com/r/bleakfuture0/mitra

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

Hosting providers

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.

Configuration

Environment variables

See defaults.

Tor/I2P federation

See Tor guide and I2P guide.

Payments

IPFS integration (experimental)

See guide.

Administration

CLI

mitractl is a command-line tool for performing instance maintenance.

Documentation

Client API

The majority of endpoints imitate Mastodon API. A number of additional endpoints exist for features that are not supported by Mastodon.

Client API is not stable and may change in minor releases.

OpenAPI spec

Federation

See FEDERATION.md

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

Run CLI

cargo run --bin mitractl

Run linter

cargo clippy

Run tests

cargo test

License

AGPL-3.0

Support

Monero: 8Ahza5RM4JQgtdqvpcF1U628NN5Q87eryXQad3Fy581YWTZU8o3EMbtScuioQZSkyNNEEE1Lkj2cSbG4VnVYCW5L1N4os5p