Files

100 lines
3.8 KiB
Markdown

<img src="assets/snacforge-koala-64.png" alt="snacforge koala mark" width="64" height="64">
# snacforge
snacforge is an independently maintained ActivityPub server derived from
[snac](https://codeberg.org/grunfink/snac2). It concentrates on conservative
security improvements, carefully bounded changes, and reviewable development.
It is not affiliated with or endorsed by the upstream project.
## What it provides
- ActivityPub federation for public posts, replies, follows, boosts, likes,
and private messages
- Multiple local users without requiring a database server
- A small, JavaScript-free web interface
- Mastodon-compatible API support for third-party clients
- Configurable moderation, filtering, notifications, and media handling
- Portable C code with OpenSSL and libcurl as its principal dependencies
- A hardened release build and executable regression checks
- Human-reviewed contributions, with LLM assistance disclosed when used
## Documentation
The authoritative snacforge manuals are maintained in this repository:
- [`doc/snac.1`](doc/snac.1) — user commands and web-interface behaviour
- [`doc/snac.5`](doc/snac.5) — message formatting and on-disk formats
- [`doc/snac.8`](doc/snac.8) — installation and server administration
The installed command and manual names remain `snac`, `snac(1)`, `snac(5)`,
and `snac(8)` for operational compatibility with existing installations and
scripts. Each manual identifies the software as snacforge and notes this
compatibility convention.
## Building and installing
The code uses the GNU `__attribute__((__cleanup__))` extension supported by
GCC, Clang, and Tiny C Compiler. Install OpenSSL and libcurl development files,
then build:
```sh
make
sudo make install
```
Use `make release` for a hardened production binary. On supported ELF
toolchains this enables PIE, strong stack protection, FORTIFY, full RELRO, and
immediate binding.
Run the deterministic regression test with `make check`. `make test` also
builds the SMTP test, which requires a local SMTP server and is therefore not
run automatically. See [`UPSTREAM.md`](UPSTREAM.md) for the reviewed upstream
update procedure.
Platform notes:
- NetBSD: use `make -f Makefile.NetBSD` and
`make -f Makefile.NetBSD install`.
- Systems requiring POSIX realtime linkage: use `make LDFLAGS=-lrt`.
- Systems without shared-memory functions: use
`make CFLAGS=-DWITHOUT_SHM`.
- To omit the Mastodon API: use `make CFLAGS=-DNO_MASTODON_API`.
- Linux Landlock support is opt-in with
`make CFLAGS=-DWITH_LINUX_SANDBOX` and requires Linux 5.13 or newer.
After initialising an instance, copy a desired translation from `po/` into the
instance's `lang/` directory. Deployment, proxy, configuration, migration, and
maintenance details are in `snac(8)`.
## Docker development environment
The supplied Compose setup runs snacforge behind an nginx HTTPS frontend:
```sh
docker-compose build && docker-compose up
```
It stores disposable development data under `data/`, creates a `testuser`, and
generates a fresh self-signed certificate at container startup. Do not use that
setup or its credentials as a production deployment.
## Project links
- Source: <https://git.sdf.org/erici/snacforge>
- Security policy: [`SECURITY.md`](SECURITY.md)
- Contribution policy: [`CONTRIBUTING.md`](CONTRIBUTING.md)
- Release history: [`CHANGELOG.md`](CHANGELOG.md)
- Upstream project: <https://codeberg.org/grunfink/snac2>
Third-party deployment guides and CSS themes written for snac may remain useful
because snacforge preserves its command, data, and web-theme interfaces, but
they are not maintained or endorsed by this project.
## Licence and credits
snacforge is distributed under the MIT licence; see [`LICENSE`](LICENSE).
The fork retains the upstream copyright notices and credits required by that
licence. Fork-specific changes are documented in the Git history and
`CHANGELOG.md`.