diff options
| -rw-r--r-- | doc/snac.1 | 208 | ||||
| -rw-r--r-- | doc/snac.5 | 131 | ||||
| -rw-r--r-- | doc/snac.8 | 326 | ||||
| -rw-r--r-- | doc/susie.png | bin | 0 -> 116 bytes | |||
| -rw-r--r-- | doc/susie.txt | 3 | ||||
| -rw-r--r-- | doc/susie32.png | bin | 0 -> 134 bytes | |||
| -rw-r--r-- | doc/susie64.png | bin | 0 -> 138 bytes |
7 files changed, 668 insertions, 0 deletions
diff --git a/doc/snac.1 b/doc/snac.1 new file mode 100644 index 0000000..f2ed24d --- /dev/null +++ b/doc/snac.1 | |||
| @@ -0,0 +1,208 @@ | |||
| 1 | .Dd $Mdocdate$ | ||
| 2 | .Dt SNAC 1 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm snac | ||
| 6 | .Nd A simple, minimalistic ActivityPub instance | ||
| 7 | .Sh SYNOPSIS | ||
| 8 | .Nm | ||
| 9 | .Cm command | ||
| 10 | .Ar basedir | ||
| 11 | .Op Ar option ... | ||
| 12 | .Sh DESCRIPTION | ||
| 13 | The | ||
| 14 | .Nm | ||
| 15 | daemon processes messages from other servers in the Fediverse | ||
| 16 | using the ActivityPub protocol. | ||
| 17 | .Pp | ||
| 18 | This is the user manual and expects an already running | ||
| 19 | .Nm | ||
| 20 | installation. For the administration manual, see | ||
| 21 | .Xr snac 8 . | ||
| 22 | For file and data formats, see | ||
| 23 | .Xr snac 5 . | ||
| 24 | .Ss Web Interface | ||
| 25 | The web interface provided by | ||
| 26 | .Nm | ||
| 27 | is split in two data streams: the public timeline and the | ||
| 28 | private timeline. There are no other feeds like the server-scoped | ||
| 29 | or the federated firehoses provided by other similar ActivityPub | ||
| 30 | implementations like Mastodon or Pleroma. | ||
| 31 | .Pp | ||
| 32 | The public timeline, also called the local timeline, is what an | ||
| 33 | external visitor sees about the activity of a | ||
| 34 | .Nm | ||
| 35 | user: that is, only the list of public notes, boosts and likes | ||
| 36 | the user generates or participates into. This is, obviously, | ||
| 37 | read-only, and not very remarkable, unless the user publishes | ||
| 38 | messages of staggering genious. A set of history links, grouped | ||
| 39 | by month, will also be available at the bottom of the page. | ||
| 40 | .Pp | ||
| 41 | The private timeline, or simply the timeline, is the private, | ||
| 42 | password-protected area of a | ||
| 43 | .Nm | ||
| 44 | server where the user really interacts with the rest of the | ||
| 45 | Fediverse. | ||
| 46 | .Pp | ||
| 47 | The top area of the timeline provides a big text area to write | ||
| 48 | notes for the public (i.e. for the user followers). As this is | ||
| 49 | the second most important activity on the Fediverse, this is | ||
| 50 | located in the most prominent area of the user page. You can | ||
| 51 | enter plain text, @user@host mentions and other things. See the | ||
| 52 | .Xr snac 5 | ||
| 53 | manual for more information on the allowed markup. | ||
| 54 | .Pp | ||
| 55 | More options are hidden under a toggle control. They are the | ||
| 56 | following: | ||
| 57 | .Bl -tag -offset indent | ||
| 58 | .It Follow (by URL or user@host) | ||
| 59 | Fill the input area with a user 'actor' URL or a user@host | ||
| 60 | Fediverse identifier to follow. | ||
| 61 | .It Boost (by URL) | ||
| 62 | Fill the input area with the URL of a Fediverse note to be | ||
| 63 | boosted. | ||
| 64 | .It User setup... | ||
| 65 | This option opens the user setup dialog. | ||
| 66 | .El | ||
| 67 | .Pp | ||
| 68 | The user setup dialog allows some user information to be | ||
| 69 | changed, specifically: | ||
| 70 | .Bl -tag -offset indent | ||
| 71 | .It User name | ||
| 72 | Your user name, or not really that. People like to include | ||
| 73 | emojis, flags and strange symbols for some reason. | ||
| 74 | .It Avatar URL | ||
| 75 | The URL of a picture to be used as your avatar in timelines | ||
| 76 | around the world. | ||
| 77 | .It Bio | ||
| 78 | Enter here a bunch of self-indulgent blurb about yourself. | ||
| 79 | The same markup options available for text notes apply here. | ||
| 80 | .It Password | ||
| 81 | Write the same string in these two fields to change your | ||
| 82 | password. Don't write anything if you don't want to do this. | ||
| 83 | .El | ||
| 84 | .Pp | ||
| 85 | The rest of the page contains your timeline in reverse | ||
| 86 | chronological order (i.e., newest interactions first). | ||
| 87 | .Nm | ||
| 88 | shows the conversations as nested trees, unlike other Fediverse | ||
| 89 | software; everytime something new is added to a conversation, | ||
| 90 | the full thread is bumped up, so new interactions are shown | ||
| 91 | always at the top of the page while the forgotten ones languish | ||
| 92 | at the bottom. | ||
| 93 | .Pp | ||
| 94 | Private notes (a.k.a. direct messages) are also shown in | ||
| 95 | the timeline as normal messages, but marked with a cute lock | ||
| 96 | to mark them as non-public. Replies to direct messages are | ||
| 97 | also private and cannot be liked nor boosted. | ||
| 98 | .Pp | ||
| 99 | For each entry in the timeline, a set of reasonable actions | ||
| 100 | in the form of buttons will be shown. These can be: | ||
| 101 | .Bl -tag -offset indent | ||
| 102 | .It Reply | ||
| 103 | Unveils a text area to write your intelligent and acute comment | ||
| 104 | to an uninformed fellow. This note is sent to the original | ||
| 105 | author as well as to your followers. The note can include | ||
| 106 | mentions in the @user@format; these people will also become | ||
| 107 | recipients of the message. If you reply to a boost or like, | ||
| 108 | you are really replying to the note, not to the admirer of it. | ||
| 109 | .It Like | ||
| 110 | Click this if you admire this post. The poster and your | ||
| 111 | followers will be informed. | ||
| 112 | .It Boost | ||
| 113 | Click this if you want to propagate this post to all your | ||
| 114 | followers. The original author will also be informed. | ||
| 115 | .It Follow | ||
| 116 | Click here if you want to start receiving all the shenanigans | ||
| 117 | the original author of the post will write in the future. | ||
| 118 | .It Unfollow | ||
| 119 | Click here if you are fed up of this fellow's activities. | ||
| 120 | .It Delete | ||
| 121 | Click here to send this post to the bin. If it's an activity | ||
| 122 | written by you, the appropriate message is sent to the rest | ||
| 123 | of involved parts telling them that you no longer want your | ||
| 124 | thing in their servers (not all implementations really obey | ||
| 125 | this kind of requirements, though). | ||
| 126 | .It MUTE | ||
| 127 | This is the most important button in | ||
| 128 | .Nm | ||
| 129 | and the Fediverse in general. Click it if you don't want | ||
| 130 | to read crap from this user again in the forseeable future. | ||
| 131 | .El | ||
| 132 | .Ss Command-line options | ||
| 133 | The command-line tool provide the following commands: | ||
| 134 | .Bl -tag -offset indent | ||
| 135 | .It Cm init Op basedir | ||
| 136 | Initializes the database. This is an interactive command; necessary | ||
| 137 | information will be prompted for. The | ||
| 138 | .Ar basedir | ||
| 139 | directory must not exist. | ||
| 140 | .It Cm check Ar basedir Op uid | ||
| 141 | Does a minimal health check to the database and its users. If a | ||
| 142 | user id is provided, only this user will be checked. | ||
| 143 | .It Cm purge Ar basedir Op uid | ||
| 144 | Purges old data from the timeline of all users. If a user id is | ||
| 145 | provided, only this user's timeline will be purged. | ||
| 146 | .It Cm adduser Ar basedir Op uid | ||
| 147 | Adds a new user to the server. This is an interactive command; | ||
| 148 | necessary information will be prompted for. Also, a copy of | ||
| 149 | the server | ||
| 150 | .Pa style.css | ||
| 151 | is installed in the user's | ||
| 152 | .Pa static/ | ||
| 153 | directory. | ||
| 154 | .It Cm httpd Ar basedir | ||
| 155 | Starts the daemon. | ||
| 156 | .It Cm queue Ar basedir Ar uid | ||
| 157 | Processes the output queue of the specied user, sending all | ||
| 158 | enqueued messages and re-enqueing the failing ones. This command | ||
| 159 | must not be executed if the server is running. | ||
| 160 | .It Cm update Ar basedir Ar uid | ||
| 161 | Enqueues a user information Update message to all followers. | ||
| 162 | .It Cm passwd Ar basedir Ar uid | ||
| 163 | Changes the password for a user (interactive). | ||
| 164 | .It Cm follow Ar basedir Ar uid Ar actor | ||
| 165 | Sends a Follow message for the specified actor URL. | ||
| 166 | .It Cm unfollow Ar basedir Ar uid Ar actor | ||
| 167 | Sends an Unfollow message for the specified actor URL. | ||
| 168 | .It Cm mute Ar basedir Ar uid Ar actor | ||
| 169 | Mutes an actor for the specified user. This is the most important | ||
| 170 | command for the Fediverse. The user will no longer receive nor | ||
| 171 | read another activity from the specified moron. | ||
| 172 | .It Cm unmute Ar basedir Ar uid Ar actor | ||
| 173 | In case a muted moron is no longer a moron, it can be unmuted | ||
| 174 | this way. This is the least used command ever. | ||
| 175 | .It Cm like Ar basedir Ar uid Ar url | ||
| 176 | Enqueues a Like message for a post given its url. | ||
| 177 | .It Cm announce Ar basedir Ar uid Ar url | ||
| 178 | Enqueues an Announce (boost) message for a message post its url. | ||
| 179 | .It Cm request Ar basedir Ar uid Ar url | ||
| 180 | Requests an object and dumps it to stdout. This is a very low | ||
| 181 | level command that is not very useful to you. | ||
| 182 | .It Cm note Ar basedir Ar uid Ar text | ||
| 183 | Enqueues a Create + Note message to all followers. If the | ||
| 184 | .Ar text | ||
| 185 | argument is - (a lonely hyphen), the external editor defined | ||
| 186 | by the EDITOR environment variable will be invoked to prepare | ||
| 187 | a message. | ||
| 188 | .El | ||
| 189 | .Sh ENVIRONMENT | ||
| 190 | .Bl -tag -width Ds | ||
| 191 | .It Ev DEBUG | ||
| 192 | Overrides the debugging level from the server 'dbglevel' configuration | ||
| 193 | variable. Set it to an integer value. The higher, the deeper in meaningless | ||
| 194 | verbiage you'll find yourself into. | ||
| 195 | .It Ev EDITOR | ||
| 196 | The user-preferred interactive text editor to prepare messages. | ||
| 197 | .El | ||
| 198 | .Sh SEE ALSO | ||
| 199 | .Xr snac 5 , | ||
| 200 | .Xr snac 8 | ||
| 201 | .Sh AUTHORS | ||
| 202 | .An grunfink | ||
| 203 | .Sh LICENSE | ||
| 204 | See the LICENSE file for details. | ||
| 205 | .Sh CAVEATS | ||
| 206 | Use the Fediverse sparingly. Don't fear the mute button. | ||
| 207 | .Sh BUGS | ||
| 208 | Plenty. Some issues may be documented in the TODO.md file. | ||
diff --git a/doc/snac.5 b/doc/snac.5 new file mode 100644 index 0000000..a5311e4 --- /dev/null +++ b/doc/snac.5 | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | .Dd $Mdocdate$ | ||
| 2 | .Dt SNAC 5 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm snac | ||
| 6 | .Nd message formatting and file format documentation | ||
| 7 | .Sh DESCRIPTION | ||
| 8 | The | ||
| 9 | .Nm | ||
| 10 | daemon processes messages from other servers in the Fediverse | ||
| 11 | using the ActivityPub protocol. | ||
| 12 | .Pp | ||
| 13 | This manual describes the allowed formatting of note messages | ||
| 14 | and the disk storage layout of | ||
| 15 | .Nm | ||
| 16 | server and user data. For the operation manual, see | ||
| 17 | .Xr snac 1 . | ||
| 18 | For the administration manual, see | ||
| 19 | .Xr snac 8 . | ||
| 20 | .Ss Message Formatting | ||
| 21 | Message notes respect the entered new line breaks rigurously. | ||
| 22 | A special subset of Markdown is allowed, including: | ||
| 23 | .Bl -tag -width tenletters | ||
| 24 | .It bold | ||
| 25 | **text between two pairs of asterisks** | ||
| 26 | .It italic | ||
| 27 | *text between a pair of asterisks* | ||
| 28 | .It code | ||
| 29 | Text `between backticks` is formatted as code. | ||
| 30 | .Bd -literal | ||
| 31 | ``` | ||
| 32 | /* text between lines with only three backticks is preformatted */ | ||
| 33 | int main(int argc, char *argv[]) | ||
| 34 | { | ||
| 35 | return 0; | ||
| 36 | } | ||
| 37 | |||
| 38 | ``` | ||
| 39 | .Ed | ||
| 40 | .It links | ||
| 41 | Standalone URLs. | ||
| 42 | .It quoted text | ||
| 43 | Lines starting with >. | ||
| 44 | .It User Mentions | ||
| 45 | Strings in the format @user@host are requested using the Webfinger | ||
| 46 | protocol and converted to links and mentions if something reasonable | ||
| 47 | is found. | ||
| 48 | .El | ||
| 49 | .Pp | ||
| 50 | HTML tags are left untouched. This is probably a bad idea that may | ||
| 51 | change in future versions. | ||
| 52 | .Pp | ||
| 53 | .Ss Disk Layout | ||
| 54 | This section documents version 1 of the disk storage layout. It's still | ||
| 55 | subject to change. | ||
| 56 | .Pp | ||
| 57 | The base directory contains the following files and folders: | ||
| 58 | .Bl -tag -width tenletters | ||
| 59 | .It Pa server.json | ||
| 60 | Server configuration. | ||
| 61 | .It Pa user/ | ||
| 62 | Directory holding user subdirectories. | ||
| 63 | .El | ||
| 64 | .Pp | ||
| 65 | Each user directory is a subdirectory of | ||
| 66 | .Pa BASEDIR/user/ , | ||
| 67 | has the user id as name and contains the following subdirectories and files: | ||
| 68 | .Bl -tag -width tenletters | ||
| 69 | .It Pa user.json | ||
| 70 | User configuration file. | ||
| 71 | .It Pa key.json | ||
| 72 | SHA-1 secret/public key PEM data. | ||
| 73 | .It Pa actors/ | ||
| 74 | This subdirectory stores cached 'Person' ActivityPub messages as JSON files. Each | ||
| 75 | file name is an MD5 hash of the actor URL. | ||
| 76 | .It Pa timeline/ | ||
| 77 | This subdirectory stores the user's timeline. Everytime a valid message arrives, | ||
| 78 | it's stored in this directory as a JSON object. The file name spec is: a Unix | ||
| 79 | timestamp followed by a hyphen followed by an MD5 of the message Id. Additionally, | ||
| 80 | metadata for each message parent and children is stored under the '_snac' field; | ||
| 81 | parent messages with new children are renamed with an updated timestamp so that | ||
| 82 | the more recently updated thread is shown at the top. This directory is presented | ||
| 83 | in the web interface in reverse file name order up to a maximum, hardcoded limit. | ||
| 84 | These files are purged when they are considered old (this time can be changed by | ||
| 85 | tweaking the server configuration). | ||
| 86 | .It Pa local/ | ||
| 87 | This subdirectory stores all activities generated by this user as hardlinks to | ||
| 88 | their analogue entries in the | ||
| 89 | .Pa timeline/ | ||
| 90 | subdirectory. These files are never deleted. | ||
| 91 | .It Pa followers/ | ||
| 92 | This subdirectory stores the 'Follow' ActivityPub message from each | ||
| 93 | Fediverse user that is following this user as a JSON file. Each file name is | ||
| 94 | an MD5 hash of the actor that is a follower of this user. | ||
| 95 | .It Pa following/ | ||
| 96 | This subdirectory stores the 'Follow' (not yet confirmed) or the 'Accept' | ||
| 97 | (confirmed) ActivityPub message for each actor that is being followed. Each file | ||
| 98 | name is an MD5 hash of the actor. | ||
| 99 | .It Pa muted/ | ||
| 100 | This directory contains files which names are MD5 hashes of muted actors. The | ||
| 101 | content is a line containing the actor URL. | ||
| 102 | Messages from these actors will be ignored on input and not shown in any timeline. | ||
| 103 | .It Pa queue/ | ||
| 104 | This directory contains the output queue of messages generated by the user as | ||
| 105 | JSON files. File names contain timestamps that indicate when the message will | ||
| 106 | be sent. Messages not accepted by their respective servers will be re-enqueued | ||
| 107 | for later retransmission until a maximum number of retries is reached, | ||
| 108 | then discarded. | ||
| 109 | .It Pa static/ | ||
| 110 | Files in this directory are served as-is when requested from the | ||
| 111 | .Pa https://HOST/s/... | ||
| 112 | URL path. A special file named | ||
| 113 | .Pa style.css | ||
| 114 | can contain user-specific CSS code to be inserted into the HTML of the | ||
| 115 | web interface. | ||
| 116 | .It Pa history/ | ||
| 117 | This directory contains generated HTML files. They may be snapshots of the | ||
| 118 | local timeline in previous months or other cached data. | ||
| 119 | .It Pa archive/ | ||
| 120 | This directory stores all input/output traffic of ActivityPub messages. There | ||
| 121 | is a different file for each day. This information is only stored if | ||
| 122 | .Nm | ||
| 123 | is run with a debug level >= 1. | ||
| 124 | .El | ||
| 125 | .Sh SEE ALSO | ||
| 126 | .Xr snac 1 , | ||
| 127 | .Xr snac 8 | ||
| 128 | .Sh AUTHORS | ||
| 129 | .An grunfink | ||
| 130 | .Sh LICENSE | ||
| 131 | See the LICENSE file for details. | ||
diff --git a/doc/snac.8 b/doc/snac.8 new file mode 100644 index 0000000..94afe71 --- /dev/null +++ b/doc/snac.8 | |||
| @@ -0,0 +1,326 @@ | |||
| 1 | .Dd $Mdocdate$ | ||
| 2 | .Dt SNAC 8 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm snac | ||
| 6 | .Nd snac administration | ||
| 7 | .Sh DESCRIPTION | ||
| 8 | The | ||
| 9 | .Nm | ||
| 10 | daemon processes messages from other servers in the Fediverse | ||
| 11 | using the ActivityPub protocol. | ||
| 12 | .Pp | ||
| 13 | This is the admin manual. For user operation, see | ||
| 14 | .Xr snac 1 . | ||
| 15 | For file and data formats, see | ||
| 16 | .Xr snac 5 . | ||
| 17 | .Ss Installation | ||
| 18 | Install the OpenSSL and urllib3 Python3 external packages, and run as root | ||
| 19 | .Bd -literal -offset indent | ||
| 20 | make install | ||
| 21 | .Ed | ||
| 22 | .Ss Database Initialization | ||
| 23 | Once | ||
| 24 | .Nm | ||
| 25 | is properly installed on the system, designate a directory where | ||
| 26 | the server and user data are to be stored. This directory | ||
| 27 | must not exist yet. | ||
| 28 | .Nm | ||
| 29 | must always be run as a regular user; you can create one for | ||
| 30 | it or use your own. To initialize the database, execute | ||
| 31 | .Bd -literal -offset indent | ||
| 32 | snac init $HOME/snac-data | ||
| 33 | .Ed | ||
| 34 | .Pp | ||
| 35 | A small set of questions will be asked regarding the installation, | ||
| 36 | specially the host name it will run under, the local network address | ||
| 37 | and port | ||
| 38 | .Nm | ||
| 39 | will listen to, the optional path prefix and possibly other things. | ||
| 40 | .Pp | ||
| 41 | You can launch the | ||
| 42 | .Nm | ||
| 43 | process by running | ||
| 44 | .Bd -literal -offset indent | ||
| 45 | snac httpd $HOME/snac-data | ||
| 46 | .Ed | ||
| 47 | .Pp | ||
| 48 | Use a web browser to connect to the specified address and port. You | ||
| 49 | should see a greeting page. | ||
| 50 | .Pp | ||
| 51 | Log messages are sent to the standard error stream. By default, only | ||
| 52 | relevant information is written there. You can increase the debugging | ||
| 53 | level by editing the 'dbglevel' field in the | ||
| 54 | .Pa server.json | ||
| 55 | file or by setting a numeric value between 0 and 3 to the DEBUG | ||
| 56 | environment variable, see below. | ||
| 57 | .Pp | ||
| 58 | If you run | ||
| 59 | .Nm | ||
| 60 | in an OS controlled by | ||
| 61 | .Xr systemd 1 , | ||
| 62 | you can prepare a user service to start/stop the daemon. Following the | ||
| 63 | previous example, create the file | ||
| 64 | .Pa ~/.config/systemd/user/snac.service | ||
| 65 | with the following content: | ||
| 66 | .Bd -literal -offset indent | ||
| 67 | [Unit] | ||
| 68 | Description=snac daemon | ||
| 69 | |||
| 70 | [Service] | ||
| 71 | Type=simple | ||
| 72 | Restart=always | ||
| 73 | RestartSec=5 | ||
| 74 | ExecStart=/usr/local/bin/snac httpd /path/to/snac-data | ||
| 75 | |||
| 76 | [Install] | ||
| 77 | WantedBy=default.target | ||
| 78 | .Ed | ||
| 79 | .Pp | ||
| 80 | And activate it by running | ||
| 81 | .Bd -literal -offset indent | ||
| 82 | systemctl --user enable snac.service | ||
| 83 | systemctl --user start snac.service | ||
| 84 | .Ed | ||
| 85 | .Pp | ||
| 86 | For other operating systems, please read the appropriate documentation | ||
| 87 | on how to install a daemon as a non-root service. | ||
| 88 | .Ss Server Setup | ||
| 89 | .Pp | ||
| 90 | An http server with TLS and proxying support must already be | ||
| 91 | installed and configured. | ||
| 92 | .Nm | ||
| 93 | runs as a daemon and listens on a TCP/IP socket, preferrably | ||
| 94 | on a local interface. It can serve the full domain or only | ||
| 95 | a directory. The http server must be configured to route to the | ||
| 96 | .Nm | ||
| 97 | socket all related traffic and also the webfinger standard | ||
| 98 | address. The Host header must be propagated. | ||
| 99 | See the examples below. | ||
| 100 | .Ss Adding Users | ||
| 101 | .Pp | ||
| 102 | Users must be created from the command line. | ||
| 103 | You can do it by running | ||
| 104 | .Bd -literal -offset indent | ||
| 105 | snac adduser $HOME/snac-data | ||
| 106 | .Ed | ||
| 107 | .Pp | ||
| 108 | All needed data will be prompted for. There is no artificial limit | ||
| 109 | on the number of users that can be created. | ||
| 110 | .Ss Customization | ||
| 111 | The | ||
| 112 | .Pa server.json | ||
| 113 | configuration file allows some behaviour tuning: | ||
| 114 | .Bl -tag -width tenletters | ||
| 115 | .It Ic host | ||
| 116 | The host name. | ||
| 117 | .It Ic prefix | ||
| 118 | The URL path prefix. | ||
| 119 | .It Ic address | ||
| 120 | The listen network address. | ||
| 121 | .It Ic port | ||
| 122 | The list network port. | ||
| 123 | .It Ic dbglevel | ||
| 124 | The debug level. An integer value, being 0 the less verbose (the default). | ||
| 125 | .It Ic layout | ||
| 126 | The disk storage layout version. Never touch this. | ||
| 127 | .It Ic queue_retry_max | ||
| 128 | Messages sent out are stored in a queue. If the posting of a messages fails, | ||
| 129 | it's re-enqueued for later. This integer configures the maximum count of | ||
| 130 | times the sending will be retried. | ||
| 131 | .It Ic queue_retry_minutes | ||
| 132 | The number of minutes to wait before the failed posting of a message is | ||
| 133 | retried. This is not linear, but multipled by the number of retries | ||
| 134 | already done. | ||
| 135 | .It Ic max_timeline_entries | ||
| 136 | This is the maximum timeline entries shown in the web interface. | ||
| 137 | .It Ic timeline_purge_days | ||
| 138 | Entries in the timeline older that this number of days are purged. | ||
| 139 | .It Ic css_urls | ||
| 140 | This is a list of URLs to CSS files that will be inserted, in this order, | ||
| 141 | in the HTML before the user CSS. Use these files to configure the global | ||
| 142 | site layout. | ||
| 143 | .El | ||
| 144 | .Pp | ||
| 145 | You must restart the server to make effective these changes. | ||
| 146 | .Pp | ||
| 147 | If a file named | ||
| 148 | .Pa greeting.html | ||
| 149 | is present in the server base directory, it will be returned whenever | ||
| 150 | the base URL of the server is requested. Fill it with whatever | ||
| 151 | information about the instance you want to supply to people | ||
| 152 | visiting the server, like sign up requirements, site policies | ||
| 153 | and such. The special %userlist% mark in the file will cause | ||
| 154 | the list of users in this instance to be inserted. | ||
| 155 | .Pp | ||
| 156 | Users can change a bit of information about themselves from the | ||
| 157 | web interface. See | ||
| 158 | .Xr snac 1 | ||
| 159 | for details. Further, every user has a private CSS file in their | ||
| 160 | .Pa static/style.css | ||
| 161 | that can be modified to suit their needs. This file contains | ||
| 162 | a copy of the | ||
| 163 | .Pa style.css | ||
| 164 | file in the server root and it's inserted into the HTML output. | ||
| 165 | It's not easily accesible from the web interface to avoid users | ||
| 166 | shooting themselves in the foot by destroying everything. | ||
| 167 | .Ss Old Data Purging | ||
| 168 | The Fediverse generates big loads of data that get old and | ||
| 169 | stale very quickly. By default, | ||
| 170 | .Nm | ||
| 171 | does not delete anything; you must do it explicitly by issuing a | ||
| 172 | .Ar purge | ||
| 173 | command periodically. A cron entry will suffice. You can add the | ||
| 174 | following to the | ||
| 175 | .Nm | ||
| 176 | user's crontab: | ||
| 177 | .Bd -literal -offset indent | ||
| 178 | # execute a data purge on Sundays at 4 am | ||
| 179 | 0 4 * * 0 /usr/local/bin/snac purge /path/to/snac-data | ||
| 180 | .Ed | ||
| 181 | .Pp | ||
| 182 | Other directories, like | ||
| 183 | .Pa archive/ , | ||
| 184 | can grow very quickly if the debug level is greater than 0. These | ||
| 185 | files must be deleted manually. | ||
| 186 | .Pp | ||
| 187 | The user-generated data (the local timeline) is never deleted. | ||
| 188 | .Ss ActivityPub Support | ||
| 189 | These are the following activities and objects that | ||
| 190 | .Nm | ||
| 191 | supports: | ||
| 192 | .Bl -tag -width tenletters | ||
| 193 | .It Vt Follow | ||
| 194 | Complete support, on input and output. | ||
| 195 | .It Vt Undo | ||
| 196 | For | ||
| 197 | .Vt Follow , | ||
| 198 | .Vt Like | ||
| 199 | and | ||
| 200 | .Vt Announce | ||
| 201 | objects, on input and output. | ||
| 202 | .It Vt Create | ||
| 203 | For | ||
| 204 | .Vt Note | ||
| 205 | objects, on input and output. | ||
| 206 | .It Vt Accept | ||
| 207 | For | ||
| 208 | .Vt Follow | ||
| 209 | objects, on input and output. | ||
| 210 | .It Vt Like | ||
| 211 | For | ||
| 212 | .Vt Note | ||
| 213 | objects, on input and output. | ||
| 214 | .It Vt Announce | ||
| 215 | For | ||
| 216 | .Vt Note | ||
| 217 | objects, on input and output. | ||
| 218 | .It Vt Update | ||
| 219 | For | ||
| 220 | .Vt Person | ||
| 221 | objects, on input and output. Support for updating | ||
| 222 | .Vt Note | ||
| 223 | objects will probably be added in the future. | ||
| 224 | .It Vt Delete | ||
| 225 | Supported for | ||
| 226 | .Vt Note | ||
| 227 | and | ||
| 228 | .Vt Tomsbtone | ||
| 229 | objects on input, and for | ||
| 230 | .Vt Note | ||
| 231 | objects on output. | ||
| 232 | .El | ||
| 233 | .Pp | ||
| 234 | The rest of activities and objects are dropped on input. | ||
| 235 | .Pp | ||
| 236 | There is partial support for | ||
| 237 | .Vt OrderedCollection | ||
| 238 | objects in the | ||
| 239 | .Pa /outbox | ||
| 240 | (with the last 20 entries of the local timeline shown). No pagination | ||
| 241 | is supported. Intentionally, the | ||
| 242 | .Pa /followers | ||
| 243 | and | ||
| 244 | .Pa /following | ||
| 245 | paths return empty lists. | ||
| 246 | .Ss Other Considerations | ||
| 247 | .Nm | ||
| 248 | stores all the messages it receives as JSON files, which are usually | ||
| 249 | bloated and filled with redundant information. Using a filesystem with | ||
| 250 | file compression enabled (like btrfs or zfs) will probably be a good | ||
| 251 | choice to store the | ||
| 252 | .Nm | ||
| 253 | database into. | ||
| 254 | .Sh ENVIRONMENT | ||
| 255 | .Bl -tag -width Ds | ||
| 256 | .It Ev DEBUG | ||
| 257 | Overrides the debugging level from the server 'dbglevel' configuration | ||
| 258 | variable. Set it to an integer value. The higher, the deeper in meaningless | ||
| 259 | verbiage you'll find yourself into. | ||
| 260 | .El | ||
| 261 | .Sh EXAMPLES | ||
| 262 | You want to install the | ||
| 263 | .Nm | ||
| 264 | Fediverse daemon in the host example.com, that is correctly configured | ||
| 265 | with a valid TLS certificate and running the nginx httpd server. | ||
| 266 | The service will be installed under the | ||
| 267 | .Pa fedi | ||
| 268 | location. Two users, walter and jessie, will be hosted in the system. | ||
| 269 | Their Fediverse presence addresses will be https://example.com/fedi/walter | ||
| 270 | and https://example.com/fedi/jesse, respectively. They will be known | ||
| 271 | in the Fediverse as @walter@example.com and @jesse@example.com. The | ||
| 272 | .Nm | ||
| 273 | daemon will run as the user snacusr in the system and listen to the | ||
| 274 | localhost:8001 network socket. All data will be stored in the | ||
| 275 | .Pa /home/snacusr/fedidata | ||
| 276 | directory. | ||
| 277 | .Pp | ||
| 278 | Log into the system as snacusr and execute: | ||
| 279 | .Bd -literal -offset indent | ||
| 280 | snac init /home/snacusr/fedidata | ||
| 281 | .Ed | ||
| 282 | .Pp | ||
| 283 | Answer "example.com" to the host name question, "/fedi" to the path | ||
| 284 | prefix question, "localhost" to the address and "8001" to the port. | ||
| 285 | .Pp | ||
| 286 | Create the users | ||
| 287 | .Bd -literal -offset indent | ||
| 288 | snac adduser /home/snacusr/fedidata walter | ||
| 289 | snac adduser /home/snacusr/fedidata jesse | ||
| 290 | .Ed | ||
| 291 | .Pp | ||
| 292 | Answer the questions with reasonable values. | ||
| 293 | .Pp | ||
| 294 | Execute the server: | ||
| 295 | .Bd -literal -offset indent | ||
| 296 | snac httpd /home/snacusr/fedidata | ||
| 297 | .Ed | ||
| 298 | .Pp | ||
| 299 | Edit the nginx configuration and add the following snippet to the | ||
| 300 | example.com server section: | ||
| 301 | .Bd -literal -offset indent | ||
| 302 | location /.well-known/webfinger { | ||
| 303 | proxy_pass http://localhost:8001; | ||
| 304 | proxy_set_header Host $http_host; | ||
| 305 | } | ||
| 306 | |||
| 307 | location /fedi { | ||
| 308 | proxy_pass http://localhost:8001; | ||
| 309 | proxy_set_header Host $http_host; | ||
| 310 | } | ||
| 311 | .Ed | ||
| 312 | .Pp | ||
| 313 | Restart the nginx daemon and connect to https://example.com/fedi/walter. | ||
| 314 | The empty, default screen will be shown. Enter the admin section with the | ||
| 315 | credentials defined for this user. Search people, start following | ||
| 316 | them, engage in arid discussions and generally enjoy the frustrating | ||
| 317 | experience of Social Media. | ||
| 318 | .Sh SEE ALSO | ||
| 319 | .Xr snac 1 , | ||
| 320 | .Xr snac 5 | ||
| 321 | .Sh AUTHORS | ||
| 322 | .An grunfink | ||
| 323 | .Sh LICENSE | ||
| 324 | See the LICENSE file for details. | ||
| 325 | .Sh CAVEATS | ||
| 326 | JSON files are fragile when modified by hand. Take care. | ||
diff --git a/doc/susie.png b/doc/susie.png new file mode 100644 index 0000000..99f19bc --- /dev/null +++ b/doc/susie.png | |||
| Binary files differ | |||
diff --git a/doc/susie.txt b/doc/susie.txt new file mode 100644 index 0000000..e361642 --- /dev/null +++ b/doc/susie.txt | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAA | ||
| 2 | A3iMLMAAAAO0lEQVQI1wEwAM//AAZgAAcwAA/4AAPkAB3cAAPgAKXIAKfIAH/ | ||
| 3 | 8AD/8ADw8AB56AA/2AEPtAMwfAO+/UlQP2C3B0yEAAAAASUVORK5CYII= | ||
diff --git a/doc/susie32.png b/doc/susie32.png new file mode 100644 index 0000000..0269607 --- /dev/null +++ b/doc/susie32.png | |||
| Binary files differ | |||
diff --git a/doc/susie64.png b/doc/susie64.png new file mode 100644 index 0000000..739d154 --- /dev/null +++ b/doc/susie64.png | |||
| Binary files differ | |||