all repos — honk @ v0.8.1

my fork of honk

docs/honk.8 (view raw)

  1.\"
  2.\" Copyright (c) 2019 Ted Unangst
  3.\"
  4.\" Permission to use, copy, modify, and distribute this software for any
  5.\" purpose with or without fee is hereby granted, provided that the above
  6.\" copyright notice and this permission notice appear in all copies.
  7.\"
  8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 15.\"
 16.Dd $Mdocdate$
 17.Dt HONK 8
 18.Os
 19.Sh NAME
 20.Nm honk
 21.Nd honk administration
 22.Sh DESCRIPTION
 23The
 24.Nm
 25daemon processes messages from other federated servers.
 26This is the admin manual.
 27For user operation, see
 28.Xr honk 1 .
 29.Ss SETUP
 30.Pp
 31Set up a TLS reverse proxy.
 32.Nm
 33can listen on TCP or unix sockets, but will not terminate TLS.
 34https is a required component for federation.
 35.Pp
 36Make sure to pass the Host header, if necessary (as for nginx).
 37.Bd -literal -offset indent
 38proxy_set_header Host $http_host;
 39.Ed
 40.Ss BUILD
 41Building
 42.Nm
 43requires a go compiler and libsqlite.
 44On
 45.Ox
 46this is the go and sqlite3 packages.
 47Other platforms may require additional development libraries or headers
 48to be installed.
 49Run make.
 50Please be patient.
 51Even on fast machines, building from source can take several seconds.
 52.Ss OPTIONS
 53The following options control where
 54.Nm
 55looks for data.
 56.Bl -tag -width datadirx
 57.It Fl datadir
 58The root data directory, where the database and other user data are stored.
 59Requires write access.
 60Defaults to ".".
 61.It Fl viewdir
 62The root view directory, where html and other templates are stored.
 63Read only.
 64Defaults to ".".
 65.El
 66.Ss INIT
 67Run the
 68.Ic init
 69command.
 70This will create the database and ask four questions, as well as creating
 71the initial user.
 72.Ss OPERATION
 73Run honk.
 74Log messages are sent to stderr and should probably be redirected to a file.
 75.Ss CUSTOMIZATION
 76Add custom memes (stickers) to the
 77.Pa memes
 78data directory.
 79Image and video files are supported.
 80.Pp
 81Add custom emus (emoji) to the
 82.Pa emus
 83data directory.
 84Image files are supported.
 85.Pp
 86Site CSS may be overridden by creating a
 87.Pa views/local.css
 88file in the data directory.
 89A restart is required after changes.
 90.Pp
 91Custom HTML messages may be added to select pages by using the
 92.Ic admin
 93command.
 94A restart is required after changes.
 95.Bl -tag -width tenletters
 96.It server
 97Displayed on the home page.
 98.It about
 99Displayed on the about page.
100.It login
101Displayed about the login form.
102.El
103.Pp
104.Ss USER ADMIN
105New users can be added with the
106.Ic adduser
107command.
108This is discouraged.
109.Pp
110Passwords may be reset with the
111.Ic chpass Ar username
112command.
113.Ss MAINTENANCE
114The database may grow large over time.
115The
116.Ic cleanup Op Ar days
117command exists to purge old data, by default 30 days.
118This removes unreferenced, unsaved posts and attachments.
119It does not remove any original content.
120.Ss UPGRADE
121Stop the old honk process.
122Backup the database.
123Perform the upgrade with the
124.Ic upgrade
125command.
126Restart.
127.Pp
128There's also a
129.Pa blob.db
130file which is important to backup and restore.
131.Pp
132The current version of the honk binary may be printed with the
133.Ic version
134command.
135.Ss SECURITY
136.Nm
137is not currently hardened against SSRF, server side request forgery.
138Be mindful of what other services may be exposed via localhost or the
139local network.
140.Ss DEBUG
141Debug mode may be enabled or disabled by running
142.Ic debug Ar on|off .
143In debug mode, secure cookies are disabled and templates are reloaded
144every request.
145.Sh FILES
146.Nm
147files are split between the data directory and the view directory.
148Both default to "." but may be specified by command line options.
149.Pp
150The data directory contains:
151.Bl -tag -width views/local.css
152.It Pa honk.db
153The main database.
154.It Pa blob.db
155Media and attachment storage.
156.It Pa emus
157Custom emoji.
158.It Pa memes
159Stickers and such.
160.It Pa views/local.css
161Locally customized CSS.
162.El
163.Pp
164The view directory contains:
165.Bl -tag -width views
166.It Pa views
167HTML templates and CSS files.
168.El
169.Sh EXAMPLES
170This series of commands creates a new database, sets a friendly
171welcome message, and runs honk.
172.Bd -literal -offset indent
173honk-v98> make
174honk-v98> ./honk -datadir ../honkdata init
175username: puffy
176password: OxychromaticBlowfishSwatDynamite
177listen address: /var/www/honk.sock
178server name: honk.example.com
179honk-v98> ./honk -datadir ../honkdata admin
180honk-v98> date; ./honk -datadir ../honkdata >> log 2>&1
181.Ed
182.Pp
183Upgrade to the next version.
184Clean things up a bit.
185.Bd -literal -offset indent
186datadir> cp honk.db backup.db
187datadir> cd ../honk-v99
188honk-v99> make
189honk-v99> ./honk -datadir ../honkdata upgrade
190honk-v99> ./honk -datadir ../honkdata cleanup
191honk-v99> date; ./honk -datadir ../honkdata >> log 2>&1
192.Ed
193.Sh ENVIRONMENT
194Image processing and scaling requires considerable memory.
195It is recommended to adjust the datasize ulimit to at least 1GB.
196.Sh SEE ALSO
197.Xr intro 1 ,
198.Xr honk 1
199.Sh CAVEATS
200There's no online upgrade capability.
201Upgrades may result in minutes of downtime.