SNAC(1)
π SNAC(1) β General Commands Manual π
okay bestie, welcome to the snac user manual π This is where you land when you already have a running snac installation, so we're not doing setup from scratch. For the admin manual, see snac(8). For file and data formats, see snac(5). periodt.
β¨ NAME β¨
snac β A simple, minimalistic ActivityPub instance
π¦ SYNOPSIS π¦
snac command basedir [option ...]
π DESCRIPTION π
The snac daemon processes messages from other servers in the Fediverse using the ActivityPub protocol. it's giving main character energy π
This is the user manual and expects an already running snac installation. For the administration manual, see snac(8). For file and data formats, see snac(5).
π Web Interface π
The web interface provided by snac is split in three data streams: the public timeline, the private timeline and the instance timeline. There are no other feeds like the federated firehoses provided by other similar ActivityPub implementations like Mastodon or Pleroma. fr fr.
The public timeline, also called the local timeline, is what an external visitor sees about the activity of a snac user: that is, only the list of public notes, boosts and likes the user generates or participates into. This is, obviously, read-only, and not very remarkable, unless the user publishes messages of staggering genius. π A set of history links, grouped by month, will also be available at the bottom of the page.
The private timeline, or simply the timeline, is the private, password-protected area of a snac server where the user really interacts with the rest of the Fediverse. it's giving secret garden energy π
The top area of the timeline provides a big text area to write notes for the public (i.e. for the user followers). As this is the second most important activity on the Fediverse, this is located in the most prominent area of the user page. You can enter plain text, @user@host mentions and other things. See the snac(5) manual for more information on the allowed markup.
Other fields immediately below the big text one allow some control about the post to be sent:
- Sensitive content β tick this checkbox and your post gets marked with a content warning. The optional text box right after it lets you write a description about why your content is so sensitive.
- Visibility β these radio buttons set the scope of the new post. Pick from Public, Unlisted, Followers-only and Direct Message (this one only goes to accounts mentioned in the post body).
- Reply to (URL) β drop the URL of someone else's post in this optional text field, and your text becomes a reply to it instead of a standalone post.
- Draft β tick this checkbox and your text won't be sent when you hit the Post button. It gets stored for later editing in the "Drafts" section.
- Language β a dropdown to pick the language your post is written in. It only shows up after you configure the set of languages you expect to use in the User Settings (see below).
- Scheduled post... β this dropdown lets you set a date and time for when the post goes out.
- Attachments... β this dropdown lets you upload media attachments (images, audio, video, etc.) to your post.
- Poll... β this dropdown gives you the voting options and turns your post into a poll. You can set the options to be voted, whether it's a multiple choice poll, and the due date.
More options are tucked under dropdown menus. Here they are:
- Follow (by URL or user@host) β put a user 'actor' URL or a
user@hostFediverse identifier in the input area to follow them. - Boost (by URL) β put the URL of a Fediverse note in the input area to boost it.
- Like (by URL) β put the URL of a Fediverse note in the input area to like it.
- User setup... β opens the user setup dialog.
- Followed hashtags... β list the hashtags you want to follow here, one per line, with or without the
#symbol. Since version2.78, URLs to RSS feeds of ActivityPub objects are also allowed (like e.g.https://mastodon.social/tags/bloomscrolling). - Blocked hashtags... β list the hashtags you want to block here, one per line, with or without the
#symbol. - Muted words... β list words to be silenced here. If a post includes any of this words, it's hidden behind a dropdown.
The user setup dialog allows some user information to be changed, specifically:
- User name β your user name, or not really that. People like to include emojis, flags and strange symbols for some reason.
- Avatar URL β the URL of a picture to be used as your avatar in timelines around the world.
- Bio β enter here a bunch of self-indulgent blurb about yourself. The same markup options available for text notes apply here.
- Always show sensitive content β by default,
snachides content marked as sensitive by their publishers. Tick this option and sensitive content is always shown. - Email address for notifications β if this field is not empty, an email message will be sent to this address whenever a post written by you is liked, boosted or replied to.
- Telegram notifications β to enable notifications via Telegram, fill the two provided fields (Bot API key and Chat id). You need to create both a Telegram channel and a bot for this; the process is rather cumbersome but it's documented everywhere. The Bot API key is a long string of alphanumeric characters and the chat id is a big, negative number.
- ntfy notifications β to enable notifications via ntfy (both self-hosted or standard
ntfy.shserver), fill the two provided fields (ntfy server/topic and, if protected, the token). You need to refer to thehttps://ntfy.shweb site for more information on this process. - Notify webhook β if this is set to an URL, an HTTP POST will be sent to it whenever a new notification happens (see the 'Webhook for notifications' section below for more information).
- Maximum days to keep posts β this numeric value specifies the number of days to pass before posts (yours and others') will be purged. This value overrides what the administrator defined in the global server settings only if it's lesser (i.e. you cannot keep posts for longer than what the admin desires). A value of
0(the default) means that the global server settings will apply to the posts in your timeline. Also, if the administrator has configured it, purged local posts generate a Delete activity that is sent everywhere. - Drop direct messages from people you don't follow β just what it says in the tin. This is to mitigate spammers coming from Fediverse instances with lax / open registration processes. Please take note that this also avoids possibly legitimate people trying to contact you.
- This account is a bot β set this checkbox if this account behaves like a bot (i.e. posts are automatically generated).
- Auto-boost all mentions to this account β if this toggle is on, all mentions to this account are boosted to all followers. This can be used to create groups.
- This account is private β if this toggle is on, posts are not published via the public web interface, only via the ActivityPub protocol.
- Collapse top threads by default β if this toggle is on, the private timeline will always show conversations collapsed by default. This allows easier navigation through long threads.
- Follow requests must be approved β if this toggle is on, follow requests are not automatically accepted, but notified and stored for later review. Pending follow requests will be shown in the people page to be approved or discarded.
- Publish follower and following metrics β if this toggle is on, the number of followers and following accounts are made public (this is only the number; the specific lists of accounts are never published).
- Show unlisted posts in the public page and RSS feed β if this toggle is on, posts with a scope set as 'unlisted' are shown both in the public page and the RSS feed. Please take note that, previous to version
2.92, these posts were always shown in these channels. - Web interface language β if the administrator has installed any language file, it can be selected here.
- Time zone β the time zone the user is on (default:
UTC). Only used for scheduled posts. - Languages you usually post in β fill this string with the ISO 639 Language Codes you expect to write your posts in, space-separated (example:
en fr pt_BR). - Don't show posts written in these languages β a space-separated string of ISO 639 Language Codes (example:
en fr de). - Password β write the same string in these two fields to change your password. Don't write anything if you don't want to do this.
The rest of the page contains your timeline in reverse chronological order (i.e., newest interactions first). snac shows the conversations as nested trees, unlike other Fediverse software; every time you contribute something to a conversation, the full thread is bumped up, so new interactions are shown always at the top of the page while the forgotten ones languish at the bottom. iconic behavior, honestly πβ¨
okay so private notes β a.k.a. direct messages, the only socially acceptable way to slide into someone's inbox π β they show up in the timeline like any other normal message, except they get a cute lil lock π on them so everyone knows they're not public. And replies to direct messages are private too, obviously, and they can't be liked or boosted. Sorry bestie, that's just the rules.
For every single entry in the timeline, snac serves you a lil lineup of reasonable actions in the form of buttons, and honestly, taste. They can be:
Reply...β unveils a text area so you can write your very intelligent, very acute comment at some uninformed fellow. This note gets sent to the original author and to your followers. You can drop mentions in the@user@formatinside it, and those people become recipients of the message too. Also important, iykyk: if you reply to a boost or a like, you're really replying to the note, not to the person who admired it. πEmoji react...β unveils a text area where you react with an emoji by typing its identifier, which has to match one of the emojis defined in theemojis.jsonfile. For now, only emoji identifiers wrapped in colons work, periodt.Likeβ click this if you admire this post. The poster and your followers both get informed. π«ΆBoostβ click this if you wanna propagate this post to all your followers. The original author gets informed as well. Main character distribution energy.Bookmarkβ click this to bookmark a post. A lil keep-forever pile, we love it.Followβ click here if you want to start receiving all the shenanigans the original author of the post will write in the future. πUnfollowβ click here if you are fed up of this fellow's activities πDeleteβ click here to send this post to the bin. If it's an activity written by you, the appropriate message gets sent to the rest of the involved parts telling them you no longer want your thing on their servers (ngl, not all implementations really obey this kind of requirement though π).MUTEβ this is the most important button in snac and in the Fediverse in general, no cap. Click it if you don't want to read crap from this user again in the foreseeable future. π«Hideβ if a conversation is getting long and annoying but not enough to MUTE its author forever, click this button to avoid seeing the post and its children anymore. Bestie boundaries β¨Editβ posts written by you on snac version 2.19 and later can be edited and resent to their recipients. Glow-up your own post, iconic.
π οΈ Command-line options π»
The command-line tool provides the following commands:
init [basedir]β initializes the data storage. This one's interactive; it'll prompt you for all the necessary information. Heads up: the basedir directory must not exist yet.upgrade basedirβ upgrades the data storage after you install a new version. Only necessary if snac complains and demands it (and it will, dramatically).httpd basedirβ starts the daemon. go server go β¨purge basedirβ purges old data from the timeline of all users. spring cleaning energy π§Ήadduser basedir [uid]β adds a new user to the server. Interactive; it'll prompt for everything it needs.deluser basedir uidβ deletes a user, unfollowing all of their accounts first.resetpwd basedir uidβ resets a user's password to a new, random one.update basedir uidβ sends a user's updated profile out to the following instances.queue basedir uidβ processes the output queue of the specified user, sending all enqueued messages and re-enqueuing the ones that failed.
Do not run this one while the server is running. fr fr, don't.
follow basedir uid actorβ sends aFollowmessage for the specified actor URL.request basedir uid urlβ requests an object and dumps it to stdout. This is a very low level command that is not very useful to you. πannounce basedir uid urlβ announces (boosts) a post via its URL.note basedir uid text [file file ... [-r inReplyTo [-d YYYYmmddHHMMSS]]]β enqueues aCreate+Notemessage to all followers. If the text argument is-e, the external editor defined by theEDITORenvironment variable gets invoked to prepare a message; if it's-(a lonely hyphen), the post content is read from stdin. The rest of the command line arguments are treated as media files to be attached to the post. TheLANGenvironment variable (if defined) is used as the post language. You can also pass an optional URL to a Fediverse post, prefixed with-r, to make this note a reply to it. And if a date inYYYYmmddHHMMSSformat follows-d, the note is scheduled for that moment instead of posted immediately (and that date must be in the same timezone the user has configured in the web UI).note_unlisted basedir uid text [file file ... [-r inReplyTo [-d YYYYmmddHHMMSS]]]β like the previous one, but it creates an "unlisted" (or "quiet public") post. π€«note_mention basedir uid text [file file ... [-r inReplyTo [-d YYYYmmddHHMMSS]]]β like the previous one, but the post is only for the accounts mentioned in the post body.block basedir instance_urlβ blocks a full instance, given its URL or domain name. All subsequent incoming activities with identifiers from that instance get immediately blocked, without further inspection. π·unblock basedir instance_urlβ unblocks a previously blocked instance. forgiveness era ποΈverify_links basedir uidβ verifies all links or account handles stored as metadata for the given user. The verification is done by downloading the link content and searching for a link back to the snac user url that also contains arel="me"attribute. These links get specially marked as verified in the user's public timeline and also via the Mastodon API. certified βexport_csv basedir uidβ exports some account data as Mastodon-compatible CSV files. Once this command runs, the following files get written to theexport/subdirectory inside the user directory:bookmarks.csv,blocked_accounts.csv,lists.csv, andfollowing_accounts.csv.export_posts basedir uidβ exports all posts written by the user to the fileoutbox.jsoninside theexport/subdirectory inside the user directory. The format is compatible with the one generated by the equivalent option in Mastodon.alias basedir uid @account@remotehostβ sets an account as an alias of this one. This is a necessary step to migrate an account to a remote Mastodon instance (seesnac(8), section 'Migrating from snac to Mastodon').migrate basedir uidβ starts a migration from this account to the one set as an alias (seesnac(8), section 'Migrating from snac to Mastodon'). bye bestie, safe travels π¦import_csv basedir uidβ imports CSV data files from a Mastodon export. This command expects the following files to be inside theimport/subdirectory of a user's directory inside the server base directory:bookmarks.csv,blocked_accounts.csv,lists.csv, andfollowing_accounts.csv.state basedirβ dumps the current state of the server and its threads. For example:
server: comam.es (snac/2.45-dev)
uptime: 0:03:09:52
job fifo size (cur): 45
job fifo size (peak): 1532
thread #0 state: input
thread #1 state: input
thread #2 state: waiting
thread #3 state: waiting
thread #4 state: output
thread #5 state: output
thread #6 state: output
thread #7 state: waiting
The job fifo size values show the current and peak sizes of the in-memory job queue. The thread state can be: waiting (idle waiting for a job to be assigned), input or output (processing I/O packets) or stopped (not running, only to be seen while starting or stopping the server).
import_list basedir uid fileβ imports a Mastodon list in CSV format. The file must be stored inside theimport/subdirectory of a user's directory inside the server base directory. You can use this option to import "Mastodon Follow Packs". πimport_block_list basedir uid fileβ imports a Mastodon list of accounts to be blocked, in CSV format. The file must be stored inside theimport/subdirectory of a user's directory inside the server base directory.lists basedir uidβ prints the name of the user created lists.list_members basedir uid nameβ prints the list of actors in the named list.list_create basedir uid nameβ creates a new list. β¨list_remove basedir uid nameβ removes an existing list.list_add basedir uid name accountβ adds an account (by its@name@hosthandle or actor URL) to a list.list_del basedir uid name actor_urlβ deletes an actor (by its actor URL) from a list.top_ten basedir uid [N]β returns the ids of the top ten (or top N) most popular posts, considering the sum of likes and boosts. π
π Migrating an account to/from Mastodon π
See snac(8) for details. That's the whole vibe β the migration lore lives over in section 8, bestie.
π Using Mastodon-compatible apps
Since version 2.27, snac ships with support for the Mastodon API, so bestieβ¦ you can literally use Mastodon-compatible mobile and desktop apps to access your account. π Assuming your server is configured correctly, using these programs should be a totally straightforward, no-drama situation.
Heads up though: they'll show your timeline in a "Mastodon fashion" (i.e., as a plain list of posts), so you lose the fancy, nested thread post display with the most active threads at the top that the web interface of snac gives you. RIP to the pretty threads, but it's fine, we move. π
π€ Implementing post bots
snac makes it so easy to post messages in a non-interactive manner. Obsessed. This example posts a string:
uptime | snac note $SNAC_BASEDIR $SNAC_USER -
You can set up a line like this from a crontab(5) or similar. Take note that you need:
- a) command-line access to the same machine that hosts the snac instance, and
- b) write permissions to the storage directories and files.
You can also post non-interactively using the Mastodon API and a command-line http tool like curl(1) or similar. This one has the advantage that you can do it remotely from any host, anywhere β the only thing you need is an API Token. Here's an example:
curl -X POST https://$SNAC_HOST/api/v1/statuses \
--header "Authorization: Bearer ${TOKEN}" -d "status=$(uptime)"
You can obtain an API Token by connecting to the following URL:
https://$SNAC_HOST/oauth/x-snac-get-token
π Webhook for notifications
Since version 2.78, users can set the URL to a webhook that will receive an HTTP POST with every notification (in JSON format). iconic behavior β¨ This can be used to implement some automation whenever a new activity happens, like autorepliers, chatbots, interactive textual games or whatever. The examples/ subdirectory contains a tiny Python program that implements an auto-follower for every new follow. π«Ά
The JSON notification object includes the following data:
idβ a unique notification identifieractorβ the origin actor idtargetβ the target actor iddateβ the notification datemsgβ the full ActivityPub action JSON objectobjidβ the object identifier (extracted frommsg, may benull)typeβ the action type (extracted frommsg)utypeβ the action subtype (extracted frommsg, may benull)uidβ the user identifier (account name)basedirβ the server base directorybaseurlβ the server base URLaccountβ the origin actor objectreplyβ the activity this post is a reply to (may not exist)
π ENVIRONMENT
SNAC_BASEDIRβ This optional environment variable can be set to the base directory of your installation; if set, you don't have to add the base directory as an argument to command-line operations. This may prove useful if you only have one snac instance in your system (which is probably your case, bestie π).DEBUGβ Overrides the debugging level from the serverdbglevelconfiguration variable. Set it to an integer value. The higher, the deeper in meaningless verbiage you'll find yourself into. πEDITORβ The user-preferred interactive text editor to prepare notes. πLANGβ The language of the post when sending notes from the command line.
π SEE ALSO
π AUTHORS
grunfink @grunfink@comam.es: https://comam.es/snac/grunfink
π LICENSE
See the LICENSE file for details.
π«£ CAVEATS
Use the Fediverse sparingly. Don't fear the MUTE button. π (no cap, muting is self-care)
π BUGS
Probably many. π Some issues may be even documented in the TODO.md file.
okay that's the whole page babes, you're officially a snac scholar now πβ¨ This one comes from the Debian folks, with the $Mdocdate$ date stamp and the SNAC(1) section tag down at the bottom β go forth and post responsibly, mwah π
π
π¦ where this page comes from
- ubuntu stonking: snac2 2.94-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms