2019-08-20 07:40:35 +02:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2019 Ted Unangst
|
|
|
|
.\"
|
|
|
|
.\" Permission to use, copy, modify, and distribute this software for any
|
|
|
|
.\" purpose with or without fee is hereby granted, provided that the above
|
|
|
|
.\" copyright notice and this permission notice appear in all copies.
|
|
|
|
.\"
|
|
|
|
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
.\"
|
|
|
|
.Dd $Mdocdate$
|
|
|
|
.Dt HONK 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm honk
|
|
|
|
.Nd honk administration
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
daemon processes messages from other federated servers.
|
|
|
|
This is the admin manual.
|
|
|
|
For user operation, see
|
|
|
|
.Xr honk 1 .
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Setup
|
2019-08-20 07:40:35 +02:00
|
|
|
.Pp
|
|
|
|
Set up a TLS reverse proxy.
|
2019-09-23 00:19:07 +02:00
|
|
|
.Nm
|
|
|
|
can listen on TCP or unix sockets, but will not terminate TLS.
|
|
|
|
https is a required component for federation.
|
2020-09-14 02:20:48 +02:00
|
|
|
Also, http signature verification requires accurate time keeping.
|
2019-09-23 00:19:07 +02:00
|
|
|
.Pp
|
|
|
|
Make sure to pass the Host header, if necessary (as for nginx).
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
.Ed
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Build
|
2019-10-12 17:16:16 +02:00
|
|
|
Building
|
|
|
|
.Nm
|
2023-01-04 16:32:39 +01:00
|
|
|
requires a go compiler 1.16 and libsqlite.
|
2019-10-12 17:16:16 +02:00
|
|
|
On
|
|
|
|
.Ox
|
|
|
|
this is the go and sqlite3 packages.
|
|
|
|
Other platforms may require additional development libraries or headers
|
|
|
|
to be installed.
|
|
|
|
Run make.
|
|
|
|
Please be patient.
|
|
|
|
Even on fast machines, building from source can take several seconds.
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Options
|
2019-11-01 20:48:31 +01:00
|
|
|
The following options control where
|
|
|
|
.Nm
|
|
|
|
looks for data.
|
2022-02-06 06:57:36 +01:00
|
|
|
.Bl -tag -width datadirxdirx
|
|
|
|
.It Fl datadir Ar dir
|
2019-11-01 20:48:31 +01:00
|
|
|
The root data directory, where the database and other user data are stored.
|
2021-01-18 01:28:39 +01:00
|
|
|
This directory contains all user data that persists across upgrades.
|
2019-11-01 20:48:31 +01:00
|
|
|
Requires write access.
|
|
|
|
Defaults to ".".
|
2022-02-06 06:57:36 +01:00
|
|
|
.It Fl viewdir Ar dir
|
2019-11-01 20:48:31 +01:00
|
|
|
The root view directory, where html and other templates are stored.
|
2021-01-18 01:28:39 +01:00
|
|
|
The contents of this directory are generally replaced with each release.
|
2019-11-01 20:48:31 +01:00
|
|
|
Read only.
|
|
|
|
Defaults to ".".
|
|
|
|
.El
|
2022-02-06 06:57:36 +01:00
|
|
|
.Pp
|
|
|
|
The following options control log output.
|
|
|
|
Acceptable values include "stderr" (the default), "stdout", "null", "syslog",
|
|
|
|
or a file name.
|
|
|
|
syslog messages will be sent to the UUCP facility.
|
|
|
|
.Bl -tag -width errorlogxlogx
|
|
|
|
.It Fl errorlog Ar log
|
|
|
|
The error log.
|
|
|
|
Something bad has happened.
|
|
|
|
.It Fl infolog Ar log
|
|
|
|
The informative messages log.
|
|
|
|
Something has happened, but probably not too bad.
|
|
|
|
.It Fl debuglog Ar log
|
|
|
|
The debug log.
|
|
|
|
There's probably no reason to care.
|
|
|
|
.It Fl log Ar log
|
|
|
|
Set all three logs.
|
|
|
|
.El
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Init
|
2019-10-09 23:11:25 +02:00
|
|
|
Run the
|
|
|
|
.Ic init
|
|
|
|
command.
|
2019-09-23 00:19:07 +02:00
|
|
|
This will create the database and ask four questions, as well as creating
|
|
|
|
the initial user.
|
2019-11-13 01:00:00 +01:00
|
|
|
See below about importing existing data.
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Operation
|
2019-09-23 00:19:07 +02:00
|
|
|
Run honk.
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Customization
|
2021-01-18 01:28:39 +01:00
|
|
|
The funzone contains fun flair that users may add to posts and profiles.
|
2019-10-12 17:02:01 +02:00
|
|
|
Add custom memes (stickers) to the
|
|
|
|
.Pa memes
|
2019-11-01 20:48:31 +01:00
|
|
|
data directory.
|
2019-10-12 17:02:01 +02:00
|
|
|
Image and video files are supported.
|
|
|
|
Add custom emus (emoji) to the
|
|
|
|
.Pa emus
|
2019-11-01 20:48:31 +01:00
|
|
|
data directory.
|
2022-05-11 22:15:40 +02:00
|
|
|
PNG and GIF files are supported.
|
2019-10-12 17:02:01 +02:00
|
|
|
.Pp
|
|
|
|
Site CSS may be overridden by creating a
|
|
|
|
.Pa views/local.css
|
2019-11-01 20:48:31 +01:00
|
|
|
file in the data directory.
|
2022-03-02 22:03:59 +01:00
|
|
|
Site JS may similarly be included by creating
|
|
|
|
.Pa views/local.js .
|
2019-10-21 02:11:15 +02:00
|
|
|
A restart is required after changes.
|
2022-03-02 20:24:18 +01:00
|
|
|
A site icon.png and favicon.ico will be served from the views directory
|
|
|
|
in the data directory, if present.
|
2019-10-12 17:02:01 +02:00
|
|
|
.Pp
|
2019-10-21 02:09:44 +02:00
|
|
|
Custom HTML messages may be added to select pages by using the
|
|
|
|
.Ic admin
|
|
|
|
command.
|
2021-04-04 17:25:52 +02:00
|
|
|
This interface is a little rough.
|
2019-10-21 02:11:15 +02:00
|
|
|
A restart is required after changes.
|
2019-10-21 02:09:44 +02:00
|
|
|
.Bl -tag -width tenletters
|
|
|
|
.It server
|
|
|
|
Displayed on the home page.
|
|
|
|
.It about
|
|
|
|
Displayed on the about page.
|
|
|
|
.It login
|
2021-01-18 01:28:39 +01:00
|
|
|
Displayed on the login form.
|
2019-12-10 03:20:35 +01:00
|
|
|
.It avatar colors
|
|
|
|
Four 32-bit hex colors (RGBA).
|
2019-10-21 02:09:44 +02:00
|
|
|
.El
|
2019-10-12 17:02:01 +02:00
|
|
|
.Pp
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss User Admin
|
2019-10-12 17:02:01 +02:00
|
|
|
New users can be added with the
|
|
|
|
.Ic adduser
|
|
|
|
command.
|
|
|
|
This is discouraged.
|
2019-10-13 01:21:29 +02:00
|
|
|
.Pp
|
|
|
|
Passwords may be reset with the
|
2019-11-06 19:26:35 +01:00
|
|
|
.Ic chpass Ar username
|
2019-10-13 01:21:29 +02:00
|
|
|
command.
|
2019-12-10 20:03:44 +01:00
|
|
|
.Pp
|
|
|
|
Users may be deleted with the
|
|
|
|
.Ic deluser Ar username
|
|
|
|
command.
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Maintenance
|
2019-09-23 00:19:07 +02:00
|
|
|
The database may grow large over time.
|
2019-10-09 23:11:25 +02:00
|
|
|
The
|
2019-11-06 19:26:35 +01:00
|
|
|
.Ic cleanup Op Ar days
|
2021-01-18 01:28:39 +01:00
|
|
|
command exists to purge old external data, by default 30 days.
|
2019-11-01 06:36:07 +01:00
|
|
|
This removes unreferenced, unsaved posts and attachments.
|
|
|
|
It does not remove any original content.
|
2020-09-02 23:47:18 +02:00
|
|
|
.Pp
|
|
|
|
Backups may be performed by running
|
|
|
|
.Ic backup dirname .
|
2021-01-18 01:28:39 +01:00
|
|
|
Backups only include the minimal necessary information, such as user posts
|
|
|
|
and follower information, but not external posts.
|
2022-05-31 20:55:20 +02:00
|
|
|
.Pp
|
|
|
|
Sometimes servers simply disappear, resulting in many errors trying to deliver
|
|
|
|
undeliverable messages.
|
|
|
|
Running
|
|
|
|
.Ic unplug Ar hostname
|
|
|
|
will delete all subscriptions and pending deliveries.
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Upgrade
|
2019-09-23 00:19:07 +02:00
|
|
|
Stop the old honk process.
|
|
|
|
Backup the database.
|
2019-10-09 23:11:25 +02:00
|
|
|
Perform the upgrade with the
|
|
|
|
.Ic upgrade
|
|
|
|
command.
|
2019-09-23 00:19:07 +02:00
|
|
|
Restart.
|
2019-10-12 17:02:01 +02:00
|
|
|
.Pp
|
2019-11-01 22:36:04 +01:00
|
|
|
The current version of the honk binary may be printed with the
|
|
|
|
.Ic version
|
|
|
|
command.
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Security
|
2019-10-20 04:59:28 +02:00
|
|
|
.Nm
|
|
|
|
is not currently hardened against SSRF, server side request forgery.
|
|
|
|
Be mindful of what other services may be exposed via localhost or the
|
|
|
|
local network.
|
2022-05-31 20:55:20 +02:00
|
|
|
.Ss Development
|
|
|
|
Development mode may be enabled or disabled by running
|
2022-03-01 02:40:23 +01:00
|
|
|
.Ic devel Ar on|off .
|
|
|
|
In devel mode, secure cookies are disabled, TLS certs are not verified,
|
|
|
|
and templates are reloaded every request.
|
2019-11-13 05:56:56 +01:00
|
|
|
.Ss Import
|
2019-11-13 01:00:00 +01:00
|
|
|
Data may be imported and converted from other services using the
|
|
|
|
.Ic import
|
|
|
|
command.
|
2019-12-23 07:39:17 +01:00
|
|
|
Currently supports Mastodon and Twitter exported data.
|
2022-05-31 20:55:20 +02:00
|
|
|
Posts are imported and backdated to appear as old honks.
|
|
|
|
The Mastodon following list is imported, but must be refollowed.
|
2019-11-13 01:00:00 +01:00
|
|
|
.Pp
|
2019-12-23 07:39:17 +01:00
|
|
|
To prepare a Mastodon data archive, extract the archive-longhash.tar.gz file.
|
|
|
|
.Dl ./honk import username mastodon source-directory
|
|
|
|
.Pp
|
|
|
|
To prepare a Twitter data archive, extract the twitter-longhash.zip file.
|
2019-11-13 01:00:00 +01:00
|
|
|
After unzipping the data archive, navigate to the tweet_media directory
|
|
|
|
and unzip any zip files contained within.
|
|
|
|
.Dl ./honk import username twitter source-directory
|
2020-03-05 21:29:34 +01:00
|
|
|
.Ss Advanced Options
|
2022-05-21 00:48:40 +02:00
|
|
|
Advanced configuration values may be set by running the
|
|
|
|
.Ic setconfig Ar key value
|
|
|
|
command.
|
|
|
|
For example, to increase the fast timeout value from 5 seconds to 10:
|
|
|
|
.Dl ./honk setconfig fasttimeout 10
|
|
|
|
.Pp
|
2020-03-05 21:29:34 +01:00
|
|
|
To support separate mentions without a subdomain,
|
|
|
|
e.g. @user@example.com and https://honk.example.com/u/user,
|
2022-05-21 00:48:40 +02:00
|
|
|
set config key 'masqname' to 'example.com'.
|
2020-05-29 19:05:05 +02:00
|
|
|
Route
|
|
|
|
.Pa /.well-known/webfinger
|
|
|
|
from the top domain to honk.
|
|
|
|
.Pp
|
|
|
|
Custom URL seperators (not "u" and "h") may be specified by adding
|
|
|
|
"usersep" and "honksep" options to the config table.
|
|
|
|
e.g. example.com/users/username/honk/somehonk instead of
|
|
|
|
example.com/u/username/h/somehonk.
|
2019-11-01 20:48:31 +01:00
|
|
|
.Sh FILES
|
|
|
|
.Nm
|
|
|
|
files are split between the data directory and the view directory.
|
|
|
|
Both default to "." but may be specified by command line options.
|
|
|
|
.Pp
|
|
|
|
The data directory contains:
|
|
|
|
.Bl -tag -width views/local.css
|
|
|
|
.It Pa honk.db
|
|
|
|
The main database.
|
|
|
|
.It Pa blob.db
|
|
|
|
Media and attachment storage.
|
|
|
|
.It Pa emus
|
|
|
|
Custom emoji.
|
|
|
|
.It Pa memes
|
|
|
|
Stickers and such.
|
2022-03-02 22:03:59 +01:00
|
|
|
.It Pa views/local.js
|
|
|
|
Locally customized JS.
|
2019-11-01 20:48:31 +01:00
|
|
|
.It Pa views/local.css
|
|
|
|
Locally customized CSS.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The view directory contains:
|
|
|
|
.Bl -tag -width views
|
|
|
|
.It Pa views
|
|
|
|
HTML templates and CSS files.
|
|
|
|
.El
|
2019-11-06 19:26:35 +01:00
|
|
|
.Sh EXAMPLES
|
|
|
|
This series of commands creates a new database, sets a friendly
|
|
|
|
welcome message, and runs honk.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
honk-v98> make
|
|
|
|
honk-v98> ./honk -datadir ../honkdata init
|
|
|
|
username: puffy
|
|
|
|
password: OxychromaticBlowfishSwatDynamite
|
|
|
|
listen address: /var/www/honk.sock
|
|
|
|
server name: honk.example.com
|
|
|
|
honk-v98> ./honk -datadir ../honkdata admin
|
2022-07-23 23:49:29 +02:00
|
|
|
honk-v98> date; ./honk -log honk.log -datadir ../honkdata
|
2019-11-06 19:26:35 +01:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2019-12-09 10:58:58 +01:00
|
|
|
The views directory includes a sample pleroma.css to change color scheme.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
honk-v98> mkdir ../honkdata/views
|
|
|
|
honk-v98> cp views/pleroma.css ../honkdata/views/local.css
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2019-11-06 19:26:35 +01:00
|
|
|
Upgrade to the next version.
|
|
|
|
Clean things up a bit.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
datadir> cp honk.db backup.db
|
|
|
|
datadir> cd ../honk-v99
|
|
|
|
honk-v99> make
|
|
|
|
honk-v99> ./honk -datadir ../honkdata upgrade
|
|
|
|
honk-v99> ./honk -datadir ../honkdata cleanup
|
2022-07-23 23:49:29 +02:00
|
|
|
honk-v99> date; ./honk -log honk.log -datadir ../honkdata
|
2019-11-06 19:26:35 +01:00
|
|
|
.Ed
|
2019-10-09 23:11:25 +02:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
Image processing and scaling requires considerable memory.
|
|
|
|
It is recommended to adjust the datasize ulimit to at least 1GB.
|
2019-08-20 07:40:35 +02:00
|
|
|
.Sh SEE ALSO
|
2019-10-09 23:11:25 +02:00
|
|
|
.Xr intro 1 ,
|
2019-08-20 07:40:35 +02:00
|
|
|
.Xr honk 1
|
|
|
|
.Sh CAVEATS
|
2019-09-23 00:19:07 +02:00
|
|
|
There's no online upgrade capability.
|
|
|
|
Upgrades may result in minutes of downtime.
|