Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SNAC(1)			    General Commands Manual		       SNAC(1)

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.

       This is the user	manual and expects an already running  snac  installa-
       tion.  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 two  data	 streams:  the
       public timeline and the private timeline. There are no other feeds like
       the  server-scoped or the federated firehoses provided by other similar
       ActivityPub implementations like	Mastodon or Pleroma.

       The public timeline, also called	the local timeline, is what an	exter-
       nal  visitor  sees about	the activity of	a snac user: that is, only the
       list of public notes, boosts and	likes the user generates  or  partici-
       pates into. This	is, obviously, read-only, and not very remarkable, un-
       less  the  user publishes messages of staggering	genious. A set of his-
       tory 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.

       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
		     If	you set	this checkbox, your post will be marked	with a
		     content warning. The immediately following, optional text
		     box allows	you to write a description about why your con-
		     tent is so	sensitive.

	     Only for mentioned	people
		     If	you set	this checkbox, your text will not  be  public,
		     but  only	sent  to  those	people you mention in the post
		     body.

	     Reply to (URL)
		     If	you fill this optional text field with the URL of  an-
		     other one's post, your text will be considered as a reply
		     to	it, not	a standalone one.

       More options are	hidden under a toggle control. They are	the following:

	     Follow (by	URL or user@host)
		     Fill  the	input  area  with  a  user  'actor'  URL  or a
		     user@host Fediverse identifier to follow.

	     Boost (by URL)
		     Fill the input area with the URL of a Fediverse  note  to
		     be	boosted.

	     Like (by URL)
		     Fill  the	input area with	the URL	of a Fediverse note to
		     be	liked.

	     User setup...
		     This option opens the user	setup dialog.

	     Followed hashtags...
		     Enter here	the list of hashtags you want to  follow,  one
		     per line, with or without the # symbol.

	     Blocked hashtags...
		     Enter  here  the  list of hashtags	you want to block, one
		     per line, with or without the # symbol.

       The user	setup dialog allows  some  user	 information  to  be  changed,
       specifically:

	     User name
		     Your  user	 name,	or not really that. People like	to in-
		     clude emojis, flags and strange symbols for some reason.

	     Avatar URL
		     The URL of	a picture to be	used as	your avatar  in	 time-
		     lines around the world.

	     Bio     Enter  here  a  bunch of self-indulgent blurb about your-
		     self.  The	same markup options available for  text	 notes
		     apply here.

	     Always show sensitive content
		     By	 default,  snac	 hides	content	marked as sensitive by
		     their publishers.	If you check  this  option,  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  pro-
		     vided  fields (Bot	API key	and Chat id). You need to cre-
		     ate both a	Telegram channel  and  a  bot  for  this;  the
		     process  is  rather cumbersome but	it's documented	every-
		     where. 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.sh server), fill the	 two  provided	fields
		     (ntfy  server/topic  and,	if protected, the token).  You
		     need to refer to the https://ntfy.sh web  site  for  more
		     information on this process.

	     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 can-
		     not 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.

	     Drop direct messages from people you don't	follow
		     Just  what	 it says in the	tin. This is to	mitigate spam-
		     mers coming from Fediverse	instances with lax / open reg-
		     istration 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 set, 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 set, posts are not  published  via  the
		     public web	interface, only	via the	ActivityPub protocol.

	     Collapse top threads by default
		     If	 this  toggle is set, the private timeline will	always
		     show conversations	collapsed by default. This allows eas-
		     ier navigation through long threads.

	     Follow requests must be approved
		     If	this toggle is set, follow requests are	not  automati-
		     cally 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 set, the	number of followers  and  fol-
		     lowing accounts are made public (this is only the number;
		     the specific lists	of accounts are	never published).

	     Web interface language
		     If	 the administrator has installed any language file, it
		     can be selected here.

	     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  con-
       tribute	something  to a	conversation, the full thread is bumped	up, so
       new interactions	are shown always at the	top of the page	while the for-
       gotten ones languish at the bottom.

       Private notes (a.k.a. direct messages) are also shown in	 the  timeline
       as  normal  messages,  but marked with a	cute lock to mark them as non-
       public. Replies to direct messages are also private and cannot be liked
       nor boosted.

       For each	entry in the timeline, a set of	reasonable actions in the form
       of buttons will be shown. These can be:

	     Reply   Unveils a text area to write your intelligent  and	 acute
		     comment to	an uninformed fellow. This note	is sent	to the
		     original  author  as  well	as to your followers. The note
		     can include mentions in the  @user@format;	 these	people
		     will  also	become recipients of the message. If you reply
		     to	a boost	or like, you are really	replying to the	 note,
		     not to the	admirer	of it.

	     Like    Click  this  if you admire	this post. The poster and your
		     followers will be informed.

	     Boost   Click this	if you want to propagate this post to all your
		     followers.	The original author will also be informed.

	     Bookmark
		     Click this	to bookmark a post.

	     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 ac-
		     tivity written by you, the	appropriate message is sent to
		     the rest of involved  parts  telling  them	 that  you  no
		     longer  want  your	thing in their servers (not all	imple-
		     mentations	 really	 obey  this  kind   of	 requirements,
		     though).

	     MUTE    This  is  the most	important button in snac and the Fedi-
		     verse in general. 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.

	     Edit    Posts written by you on snac version 2.19 and  later  can
		     be	edited and resent to their recipients.

   Command-line	options
       The command-line	tool provide the following commands:

	     init [basedir]
		     Initializes the data storage. This	is an interactive com-
		     mand;  necessary  information  will  be prompted for. The
		     basedir directory must not	exist.

	     upgrade basedir
		     Upgrades the data storage after installing	a new version.
		     Only necessary if snac complains and demands it.

	     httpd basedir
		     Starts the	daemon.

	     purge basedir
		     Purges old	data from the timeline of all users.

	     adduser basedir [uid]
		     Adds a new	user to	the server.  This  is  an  interactive
		     command; necessary	information will be prompted for.

	     deluser basedir uid
		     Deletes a user, unfollowing all accounts first.

	     resetpwd basedir uid
		     Resets a user's password to a new,	random one.

	     queue basedir uid
		     Processes the output queue	of the specified user, sending
		     all  enqueued  messages and re-enqueing the failing ones.
		     This command must not be executed if the server  is  run-
		     ning.

	     follow basedir uid	actor
		     Sends a Follow message 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 ...]
		     Enqueues a	Create + Note message to all followers.	If the
		     text  argument  is	-e, the	external editor	defined	by the
		     EDITOR environment	variable will be invoked to prepare  a
		     message;  if  it's	 - (a lonely hyphen), the post content
		     will be read from stdin.  The rest	of command line	 argu-
		     ments  are	 treated  as media files to be attached	to the
		     post. The LANG environment	variable (if defined) is  used
		     as	the post language.

	     note_unlisted basedir uid text [file file ...]
		     Like  the	previous  one,	but  creates an	"unlisted" (or
		     "quiet public") post.

	     note_mention basedir uid text [file file ...]
		     Like the previous one, but	creates	a post	only  for  ac-
		     counts 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  will be immediately blocked without further in-
		     spection.

	     unblock basedir instance_url
		     Unblocks a	previously blocked instance.

	     verify_links basedir uid
		     Verifies all links	stored as metadata for the given user.
		     This verification is done by downloading the link content
		     and searching for a link back to the snac user  url  that
		     also  contains a rel="me" attribute. These	links are spe-
		     cially marked as verified in the user's  public  timeline
		     and also via the Mastodon API.

	     export_csv	basedir	uid
		     Exports  some  account  data  as  Mastodon-compatible CSV
		     files. After executing this command, the following	 files
		     will  be  written	to the export/ subdirectory inside the
		     user  directory:	bookmarks.csv,	 blocked_accounts.csv,
		     lists.csv,	and following_accounts.csv.

	     alias basedir uid @account@remotehost
		     Sets an account as	an alias of this one. This is a	neces-
		     sary  step	to migrate an account to a remote Mastodon in-
		     stance (see snac(8),  section  'Migrating	from  snac  to
		     Mastodon').

	     migrate basedir uid
		     Starts a migration	from this account to the one set as an
		     alias  (see  snac(8),  section  'Migrating	 from  snac to
		     Mastodon').

	     import_csv	basedir	uid
		     Imports CSV data files from a Mastodon export. This  com-
		     mand expects the following	files to be inside the import/
		     subdirectory of a user's directory	inside the server base
		     directory:	     bookmarks.csv,	 blocked_accounts.csv,
		     lists.csv,	and following_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 the import/ subdirectory of a user's	direc-
		     tory  inside  the server base directory.  This option can
		     be	used 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 the	import/	subdi-
		     rectory  of a user's directory inside the server base di-
		     rectory.

   Migrating an	account	to/from	Mastodon
       See snac(8) for details.

   Using Mastodon-compatible apps
       Since version 2.27, snac	includes support for the Mastodon API, so  you
       can  use	 Mastodon-compatible mobile and	desktop	applications to	access
       your account. Given a correctly configured server, the usage  of	 these
       programs	 should	 be  straightforward.  Please take note	that they will
       show your timeline in a 'Mastodon fashion' (i.e., as a  plain  list  of
       posts), so you will lose	the fancy, nested thread post display with the
       most active threads at the top that the web interface of	snac provides.

   Implementing	post bots
       snac makes very easy to post messages in	a non-interactive manner. This
       example posts a string:

	     uptime | snac note	$SNAC_BASEDIR $SNAC_USER -

       You  can	setup 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 com-
       mand-line http tool like	curl(1)	or similar.  This  has	the  advantage
       that you	can do it remotely from	any host, anywhere; the	only thing you
       need is an API Token. This is 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

ENVIRONMENT
       SNAC_BASEDIR
	       This  optional  environment variable can	be set to the base di-
	       rectory 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 you sys-
	       tem (which is probably your case).

       DEBUG   Overrides  the  debugging level from the	server 'dbglevel' con-
	       figuration 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 messages.

       LANG    The language of the post	when sending messages.

SEE ALSO
       snac(5),	snac(8)

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.

BUGS
       Probably	many. Some issues may be even documented in the	TODO.md	file.

FreeBSD	Ports 14.quarterly	  $Mdocdate$			       SNAC(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=snac&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>

home | help