default c507e30607 New function xs_unicode_right_to_left(). | há 1 dia atrás | |
---|---|---|
artwork | há 1 ano atrás | |
doc | há 2 dias atrás | |
examples | há 1 semana atrás | |
.gitignore | há 2 anos atrás | |
Dockerfile | há 1 ano atrás | |
LICENSE | há 10 meses atrás | |
Makefile | há 1 semana atrás | |
Makefile.NetBSD | há 1 semana atrás | |
README.md | há 1 mês atrás | |
RELEASE_NOTES.md | há 1 semana atrás | |
TODO.md | há 3 dias atrás | |
activitypub.c | há 2 dias atrás | |
data.c | há 2 dias atrás | |
docker-compose.yaml | há 1 ano atrás | |
format.c | há 2 semanas atrás | |
html.c | há 2 dias atrás | |
http.c | há 6 meses atrás | |
http_codes.h | há 5 meses atrás | |
httpd.c | há 4 dias atrás | |
main.c | há 4 dias atrás | |
mastoapi.c | há 1 dia atrás | |
snac.c | há 1 semana atrás | |
snac.h | há 2 dias atrás | |
upgrade.c | há 6 meses atrás | |
utils.c | há 1 mês atrás | |
webfinger.c | há 2 meses atrás | |
xs.h | há 1 mês atrás | |
xs_curl.h | há 2 meses atrás | |
xs_fcgi.h | há 2 semanas atrás | |
xs_glob.h | há 2 semanas atrás | |
xs_hex.h | há 10 meses atrás | |
xs_html.h | há 6 meses atrás | |
xs_httpd.h | há 2 semanas atrás | |
xs_io.h | há 10 meses atrás | |
xs_json.h | há 2 meses atrás | |
xs_match.h | há 10 meses atrás | |
xs_mime.h | há 2 meses atrás | |
xs_openssl.h | há 10 meses atrás | |
xs_random.h | há 1 mês atrás | |
xs_regex.h | há 2 meses atrás | |
xs_set.h | há 2 meses atrás | |
xs_socket.h | há 3 meses atrás | |
xs_time.h | há 2 semanas atrás | |
xs_unicode.h | há 1 dia atrás | |
xs_unicode_tbl.h | há 1 dia atrás | |
xs_unix_socket.h | há 3 meses atrás | |
xs_url.h | há 1 semana atrás | |
xs_version.h | há 1 dia atrás |
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