default c507e30607 New function xs_unicode_right_to_left(). | hai 3 días | |
---|---|---|
artwork | hai 1 ano | |
doc | hai 4 días | |
examples | hai 2 semanas | |
.gitignore | %!s(int64=2) %!d(string=hai) anos | |
Dockerfile | hai 1 ano | |
LICENSE | hai 10 meses | |
Makefile | hai 1 semana | |
Makefile.NetBSD | hai 1 semana | |
README.md | hai 1 mes | |
RELEASE_NOTES.md | hai 1 semana | |
TODO.md | hai 5 días | |
activitypub.c | hai 5 días | |
data.c | hai 5 días | |
docker-compose.yaml | hai 1 ano | |
format.c | hai 2 semanas | |
html.c | hai 5 días | |
http.c | hai 6 meses | |
http_codes.h | hai 6 meses | |
httpd.c | hai 1 semana | |
main.c | hai 1 semana | |
mastoapi.c | hai 3 días | |
snac.c | hai 1 semana | |
snac.h | hai 5 días | |
upgrade.c | hai 6 meses | |
utils.c | hai 1 mes | |
webfinger.c | hai 2 meses | |
xs.h | hai 1 mes | |
xs_curl.h | hai 2 meses | |
xs_fcgi.h | hai 2 semanas | |
xs_glob.h | hai 2 semanas | |
xs_hex.h | hai 10 meses | |
xs_html.h | hai 6 meses | |
xs_httpd.h | hai 2 semanas | |
xs_io.h | hai 10 meses | |
xs_json.h | hai 2 meses | |
xs_match.h | hai 10 meses | |
xs_mime.h | hai 2 meses | |
xs_openssl.h | hai 10 meses | |
xs_random.h | hai 1 mes | |
xs_regex.h | hai 2 meses | |
xs_set.h | hai 2 meses | |
xs_socket.h | hai 3 meses | |
xs_time.h | hai 2 semanas | |
xs_unicode.h | hai 3 días | |
xs_unicode_tbl.h | hai 3 días | |
xs_unix_socket.h | hai 3 meses | |
xs_url.h | hai 1 semana | |
xs_version.h | hai 3 días |
A simple, minimalistic ActivityPub instance
This program runs as a daemon (proxied by a TLS-enabled real httpd server) and provides the basic services for a Fediverse / ActivityPub instance (sharing messages and stuff from/to other systems like Mastodon, Pleroma, Friendica, etc.).
This is not the manual; man pages snac(1)
(user manual), snac(5)
(formats) and snac(8)
(administrator manual) are what you are looking for.
snac
stands for Social Networks Are Crap.
This program is written in highly portable C. The only external dependencies are openssl
and curl
.
On Debian/Ubuntu, you can satisfy these requirements by running
apt install libssl-dev libcurl4-openssl-dev
On OpenBSD you just need to install curl
:
pkg_add curl
On FreeBSD, to install curl
just type:
pkg install curl
On NetBSD, to install curl
just type:
pkgin install curl
The source code is available here.
Run make
and then make install
as root.
If you're compiling on NetBSD, you should use the specific provided Makefile and run make -f Makefile.NetBSD
and then make -f Makefile.NetBSD install
as root.
From version 2.27, snac
includes support for the Mastodon API; if you are not interested on it, you can compile it out by running
make CFLAGS=-DNO_MASTODON_API
If your compilation process complains about undefined references to shm_open()
and shm_unlink()
(it happens, for example, on Ubuntu 20.04.6 LTS), run it as:
make LDFLAGS=-lrt
If it still gives compilation errors (because your system does not implement the shared memory functions), you can fix it with
make CFLAGS=-DWITHOUT_SHM
See the administrator manual on how to proceed from here.
A docker-compose
file is provided for development and testing. To start snac with an nginx HTTPS frontend, run:
docker-compose build && docker-compose up
This will:
data/
localhost
(see examples/docker-entrypoint.sh
)testuser
and print the user's generated password on the console (see examples/docker-entrypoint.sh
)nginx-alpine-ssl/nginx-selfsigned.*
(see examples/nginx-alpine-ssl/entrypoint.sh
)See the LICENSE file for details.
grunfink @grunfink@comam.es with the help of others.
Buy grunfink a coffee: https://ko-fi.com/grunfink