micro-blogging software built on ActivityPub, part of the Fediverse.
NoJS, Fast, Lightweight.
Demo: @alice@tinyap.izkluxcvy.foo
- Federate with remote users
- Create text note
- Follow, Reply, Like, Boost, Undo them
- Block domain
- Tiny memory usage
- Tiny web UI
- Mastodon-compatible API
Real memory usage of tinyap.izkluxcvy.foo
$ watch -n 360 'echo $(date "+%F %T"),$(cat /sys/fs/cgroup/system.slice/tinyap.service/memory.current) >> memory.csv'(Note that Argon2 password hasher costs 19MB memory)
- Phanpy for Web
- Pinafore for Web
- Tokodon for Linux, Windows
- Tuba for Linux, Windows
- Ice Cubes for iOS, Mac
- Tusky for Android
- Toot for CLI, TUI
- Rust (for building from source)
- SQLite or PostgreSQL
- HttpS
Download .deb package(features: sqlite, web, api) from Releases
Install TinyAP
$ sudo apt install ./tinyap_amd64.deb
$ tinyap --versionConfigure and run
$ sudo vi /etc/tinyap/config.yaml
$ sudo systemctl enable --now tinyap.serviceClone git repo.
$ git clone --depth 1 https://github.com/izkluxcvy/tinyap.git
$ cd tinyapCreate database.
$ # for SQLite
$ sqlite3 tinyap.db < schema.sql
$ # for PostgreSQL
$ psql -U postgres -c "CREATE DATABASE tinyap"
$ sed -e "s/INTEGER PRIMARY KEY AUTOINCREMENT/BIGSERIAL PRIMARY KEY/g" schema.sql | psql -U postgres -d tinyapConfigure your config.yaml.
$ vi config.yamlBuild and run
$ cargo build --release --features=sqlite,web,api
$ mv target/release/tinyap ./
$ cargo clean
$ ./tinyap --help
$ ./tinyap serveFor Linux/glibc, MALLOC_MMAP_THRESHOLD_=131072 environment variable can suppress memory fragmentation.
mimalloc: use mimalloc for memory allocator instead of system allocatorsqlite: use SQLite for DB (must be exclusive with postgres)postgres: use PostgreSQL for DBweb: text-based tiny Web UIapi: mastodon-compatible APItls: tinyap as a TLS termination
You can place in ./config.yaml or /etc/tinyap/config.yaml or $TINYAP_CONFIG
$ TINYAP_CONFIG=/path/to/config.yaml ./tinyap servehttp {
gzip on;
limit_req_zone $binary_remote_addr zone=tinyaplogin:3m rate=1r/s;
server {
listen 80;
server_name example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
http2 on;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /static/style.css {
proxy_pass http://127.0.0.1:8080;
expires 1d;
}
location /login {
proxy_pass http://127.0.0.1:8080;
limit_req zone=tinyaplogin burst=5 nodelay;
}
location /oauth/authorize {
proxy_pass http://127.0.0.1:8080;
limit_req zone=tinyaplogin burst=5 nodelay;
}
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}
}You can also build with tls feature for tinyap as a TLS termination, using remote proxy like cloudflare without httpd like nginx.
HTML with Jinja template format.
Loaded once when server starts.
Static files like style.css.
Loaded on each access to /static/xxx.xx.
