1 public-inbox / lei installation
2 -------------------------------
4 This is for people who want to run public-inbox on their server or
5 lei as a command-line tool. Any HTTP, IMAP, NNTP, or POP3 client can
6 access public-inbox servers, as can git-{clone,fetch} on the HTTP(S)
9 Since our marketing sucks, ease of installation is an important goal
10 for this project and we only depend on distro-provided packages.
12 As of 2024, public-inbox is packaged by several OS distributions,
13 listed in alphabetical order: Debian, GNU Guix, NixOS, and Void Linux.
15 public-inbox is developed on Debian GNU/Linux systems and will
16 never depend on packages outside of the "main" component of
17 the "oldstable" distribution, currently Debian 11.x ("bullseye"),
18 but older versions of Debian remain supported (as are newer ones).
20 Most packages are available in other GNU/Linux distributions,
21 Alpine Linux, FreeBSD, NetBSD, OpenBSD, and DragonflyBSD.
22 CentOS 7.x users will likely want newer git and Xapian for
23 better performance and v2 inbox support:
24 https://public-inbox.org/meta/20210421151308.yz5hzkgm75klunpe@nitro.local/
26 As of 2.0, install/deps.perl makes it easier to install target
27 dependencies needed for certain features. See install/README in
28 the source tree for more info.
30 Also see sa_config/ directories in the source tree for recommended
31 SpamAssassin configuration examples if using public-inbox-mda or
37 public-inbox requires a number of other packages to access its full
38 functionality. The core tools are, of course:
40 * Git (1.8.0+, 2.6+ for writing v2 inboxes)
42 * DBD::SQLite (needed for IMAP, NNTP, message threading, and v2 inboxes)
44 To accept incoming mail into a public inbox, you'll likely want:
46 * MTA - postfix is recommended (for public-inbox-mda)
47 * SpamAssassin (spamc/spamd) (for public-inbox-watch/public-inbox-mda)
49 Beyond that, there is one non-standard Perl package required:
51 * URI deb: liburi-perl
54 (for HTML/Atom generation)
56 Where "deb" indicates package names for Debian-derived distributions,
57 "pkg" is for the FreeBSD package (and some other common BSDs, too),
58 "pkgin" for NetBSD, "apk" for Alpine Linux and "rpm" is for RPM-based
59 distributions (only known to work on Fedora).
61 Most users will likely also want the following:
63 - DBD::SQLite deb: libdbd-sqlite3-perl
66 (for v2, IMAP, NNTP, or gzipped mboxes)
68 - Xapian(.pm) (or Search::Xapian) deb: libsearch-xapian-perl
69 pkg: p5-Xapian (FreeBSD, NetBSD)
70 xapian-bindings-perl (OpenBSD)
71 rpm: perl-Search-Xapian
72 (required for lei; HTTP and IMAP search)
74 Other modules might be useful as well, depending on your use case and
77 - Plack deb: libplack-perl
79 rpm: perl-Plack, perl-Plack-Test,
80 (for WWW interface, public-inbox-httpd(1))
82 - Inline::C deb: libinline-c-perl
84 rpm: perl-Inline (or perl-Inline-C)
85 (required for lei on *BSD;
86 speeds up process spawning on Linux,
87 see public-inbox-daemon(8))
89 - Email::Address::XS deb: libemail-address-xs-perl
90 pkg: p5-Email-Address-XS
91 (correct parsing of tricky email
92 addresses, phrases and comments)
94 - Parse::RecDescent deb: libparse-recdescent-perl
95 pkg: p5-Parse-RecDescent
96 rpm: perl-ParseRecDescent
97 (for public-inbox-imapd(1))
99 - Mail::IMAPClient deb: libmail-imapclient-perl
100 pkg: p5-Mail-IMAPClient
101 rpm: perl-Mail-IMAPClient
102 (only for lei and public-inbox-watch
103 when reading from IMAP)
105 - BSD::Resource deb: libbsd-resource-perl
107 rpm: perl-BSD-Resource
108 (only for PSGI limiters,
109 see public-inbox-config(5))
111 - Plack::Middleware::ReverseProxy deb: libplack-middleware-reverseproxy-perl
112 pkg: p5-Plack-Middleware-ReverseProxy
113 rpm: perl-Plack-Middleware-ReverseProxy
114 (ensures redirects are correct when running
115 behind nginx or Varnish)
117 * highlight deb: libhighlight-perl
118 (for syntax highlighting with coderepo)
120 * xapian-tools deb: xapian-tools
124 (for public-inbox-compact(1) and
125 public-inbox-cindex(1))
127 * Xapian development files deb: libxapian-dev
131 rpm: xapian-core-devel / xapian14-core-libs
132 (for public-inbox-cindex(1) and future
133 performance enhancements)
135 * curl (tool) deb, pkg, rpm: curl
136 (for lei HTTP(S) externals with curl and
137 public-inbox-clone(1))
139 - Linux::Inotify2 deb: liblinux-inotify2-perl
140 rpm: perl-Linux-Inotify2
141 (for lei, public-inbox-watch and -imapd
142 on Linux; not required as of 2.0))
144 - IO::KQueue pkg: p5-IO-KQueue
145 (for lei, public-inbox-watch and -imapd
148 - Net::Server deb: libnet-server-perl
151 (for HTTP/IMAP/NNTP background daemons,
152 not needed as systemd services or
155 The following module is typically pulled in by dependencies listed
156 above, so there is no need to explicitly install it:
158 - DBI deb: libdbi-perl
161 (pulled in by DBD::SQLite)
163 Uncommonly needed modules (see HACKING for development-only modules):
165 - Socket6 deb: libsocket6-perl
168 (pulled in by SpamAssassin and Net::Server,
169 only necessary if using IPv6 with
170 Plack::Middleware::AccessLog or similar
173 - Crypt::CBC deb: libcrypt-cbc-perl
175 (for PublicInbox::Unsubscribe (rarely used))
177 - Date::Parse deb: libtimedate-perl
180 (for broken, mostly historical emails)
182 standard MakeMaker installation (Perl)
183 --------------------------------------
185 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
186 This is typically installed with Perl, but RPM-based systems will likely
187 need to install the `perl-ExtUtils-MakeMaker' package.
189 Once the dependencies are installed, you should be able to build and
190 install the system (into /usr/local) with:
194 make test # see HACKING for faster tests for hackers
195 make install # root permissions may be needed
197 symlink-install (public-inbox.git and 1.7.0+)
198 ---------------------------------------------
200 For users who lack permissions and/or wish to minimize their
201 installation footprint, the "symlink-install" target is available in
202 public-inbox.git. The following installs symlinks to $HOME/bin
203 pointing to the source tree:
206 make symlink-install prefix=$HOME
208 Other installation notes
209 ------------------------
211 Debian 8.x (jessie) users, use Debian 8.5 or later if using Xapian:
212 https://bugs.debian.org/808610
214 public-inbox-* commands will never store unregeneratable data in
215 Xapian nor any other search database we might use; Xapian
216 corruption will not destroy critical data. Note: `lei' DOES store
217 unregeneratable data in Xapian and SQLite.
219 See the public-inbox-overview(7) man page for the next steps once
220 the installation is complete.
222 The following required packages are part of the Perl standard
223 library. Debian-based distros put them in "libperl5.$MINOR" or
224 "perl-modules-5.$MINOR"; and FreeBSD puts them in "perl5".
225 RPM-based distros split them out into separate packages:
227 * autodie rpm: perl-autodie
228 * Digest::SHA rpm: perl-Digest-SHA
229 * Data::Dumper rpm: perl-Data-Dumper
230 * IO::Compress rpm: perl-IO-Compress
231 * Sys::Syslog rpm: perl-Sys-Syslog
232 * Text::ParseWords rpm: perl-Text-Parsewords
237 Copyright all contributors <meta@public-inbox.org>
238 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>