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-09-23 00:19:07 +02: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.
|
|
|
|
.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-10-12 17:19:43 +02:00
|
|
|
.Ss BUILD
|
2019-10-12 17:16:16 +02:00
|
|
|
Building
|
|
|
|
.Nm
|
|
|
|
requires a go compiler and libsqlite.
|
|
|
|
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-09-23 00:19:07 +02:00
|
|
|
.Ss INIT
|
2019-10-09 23:11:25 +02:00
|
|
|
Run the
|
|
|
|
.Ic init
|
|
|
|
command.
|
2019-09-23 00:19:07 +02:00
|
|
|
.Dl ./honk init
|
|
|
|
This will create the database and ask four questions, as well as creating
|
|
|
|
the initial user.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
username: (desired username)
|
|
|
|
password: (desired password)
|
|
|
|
listenaddr: (tcp or unix: localhost:31337, /var/www/honk.sock, etc.)
|
|
|
|
servername: (public DNS name: honk.example.com)
|
|
|
|
.Ed
|
|
|
|
.Ss OPERATION
|
|
|
|
Run honk.
|
2019-10-12 17:02:01 +02:00
|
|
|
.Dl date; ./honk >> log 2>&1
|
2019-09-23 00:19:07 +02:00
|
|
|
Log messages are sent to stderr and should probably be redirected to a file.
|
2019-10-12 17:02:01 +02:00
|
|
|
.Ss CUSTOMIZATION
|
|
|
|
Add custom memes (stickers) to the
|
|
|
|
.Pa memes
|
|
|
|
directory.
|
|
|
|
Image and video files are supported.
|
|
|
|
.Pp
|
|
|
|
Add custom emus (emoji) to the
|
|
|
|
.Pa emus
|
|
|
|
directory.
|
|
|
|
Image files are supported.
|
|
|
|
.Pp
|
|
|
|
Site CSS may be overridden by creating a
|
|
|
|
.Pa views/local.css
|
|
|
|
file.
|
|
|
|
.Pp
|
2019-10-20 22:28:09 +02:00
|
|
|
Custom messages may be set by editing the database.
|
2019-10-12 17:02:01 +02:00
|
|
|
(Sorry.)
|
2019-10-20 23:02:55 +02:00
|
|
|
.Dl update config set value = 'message' where key = 'servermsg';
|
|
|
|
.Dl update config set value = 'message' where key = 'aboutmsg';
|
|
|
|
.Dl update config set value = 'message' where key = 'loginmsg';
|
2019-10-12 17:02:01 +02:00
|
|
|
.Pp
|
|
|
|
.Ss ADMIN
|
|
|
|
New users can be added with the
|
|
|
|
.Ic adduser
|
|
|
|
command.
|
|
|
|
This is discouraged.
|
|
|
|
.Dl ./honk adduser
|
2019-10-13 01:21:29 +02:00
|
|
|
.Pp
|
|
|
|
Passwords may be reset with the
|
|
|
|
.Ic chpass
|
|
|
|
command.
|
|
|
|
.Dl ./honk chpass username
|
2019-09-23 00:19:07 +02:00
|
|
|
.Ss MAINTENANCE
|
|
|
|
The database may grow large over time.
|
2019-10-09 23:11:25 +02:00
|
|
|
The
|
|
|
|
.Ic cleanup
|
|
|
|
command exists to purge old data, by default 30 days.
|
2019-09-23 00:19:07 +02:00
|
|
|
.Ss UPGRADE
|
|
|
|
Stop the old honk process.
|
|
|
|
.Dl pkill honk
|
|
|
|
Backup the database.
|
|
|
|
.Dl cp honk.db backup.db
|
2019-10-09 23:11:25 +02:00
|
|
|
Perform the upgrade with the
|
|
|
|
.Ic upgrade
|
|
|
|
command.
|
2019-09-23 00:19:07 +02:00
|
|
|
.Dl ./honk upgrade
|
|
|
|
Restart.
|
|
|
|
.Dl ./honk
|
2019-10-12 17:02:01 +02:00
|
|
|
.Pp
|
|
|
|
There's also a
|
|
|
|
.Pa blob.db
|
|
|
|
file which is important to backup and restore.
|
2019-10-20 04:59:28 +02:00
|
|
|
.Sh SECURITY
|
|
|
|
.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.
|
2019-10-20 22:39:01 +02:00
|
|
|
.Sh DEBUG
|
|
|
|
Debug mode may be enabled or disabled by running
|
|
|
|
.Ic debug Ar on|off .
|
|
|
|
In debug mode, secure cookies are disabled and templates are reloaded
|
|
|
|
every request.
|
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.
|