1 public-inbox (server-side) installation
2 ---------------------------------------
4 This is for folks who want to setup their own public-inbox instance.
5 Clients should use normal git-clone/git-fetch, IMAP or NNTP clients
6 if they want to import mail into their personal inboxes.
8 As of 2022, public-inbox is packaged by several OS distributions,
9 listed in alphabetical order: Debian, GNU Guix, NixOS, and Void Linux.
11 public-inbox is developed on Debian GNU/Linux systems and will
12 never depend on packages outside of the "main" component of
13 the "stable" distribution, currently Debian 10.x ("buster"),
14 but older versions of Debian remain supported.
16 Most packages are available in other GNU/Linux distributions
17 and FreeBSD. CentOS 7.x users will likely want newer git and
18 Xapian packages for better performance and v2 inbox support:
19 https://public-inbox.org/meta/20210421151308.yz5hzkgm75klunpe@nitro.local/
21 TODO: this still needs to be documented better,
22 also see the scripts/ and sa_config/ directories in the source tree
27 public-inbox requires a number of other packages to access its full
28 functionality. The core tools are, of course:
30 * Git (1.8.0+, 2.6+ for writing v2 inboxes)
32 * DBD::SQLite (needed for IMAP, NNTP, message threading, and v2 inboxes)
34 To accept incoming mail into a public inbox, you'll likely want:
36 * MTA - postfix is recommended (for public-inbox-mda)
37 * SpamAssassin (spamc/spamd) (for public-inbox-watch/public-inbox-mda)
39 Beyond that, there is one non-standard Perl package required:
41 * URI deb: liburi-perl
44 (for HTML/Atom generation)
46 Plack and Date::Parse are optional as of public-inbox v1.3.0,
47 but required for older releases:
49 * Plack deb: libplack-perl
51 rpm: perl-Plack, perl-Plack-Test,
52 (for HTML/Atom generation)
54 - Date::Parse deb: libtimedate-perl
57 (for broken, mostly historical emails)
59 Where "deb" indicates package names for Debian-derived distributions,
60 "pkg" is for the FreeBSD package (maybe other common BSDs, too), and
61 "rpm" is for RPM-based distributions (only known to work on Fedora).
63 Numerous optional modules are likely to be useful as well:
65 - DBD::SQLite deb: libdbd-sqlite3-perl
68 (for v2, IMAP, NNTP, or gzipped mboxes)
70 - Search::Xapian or Xapian(.pm) deb: libsearch-xapian-perl
71 pkg: p5-Search-Xapian OR p5-Xapian
72 rpm: perl-Search-Xapian
73 (HTTP and IMAP search)
75 - Inline::C deb: libinline-c-perl
77 rpm: perl-Inline (or perl-Inline-C)
78 (speeds up process spawning on Linux,
79 see public-inbox-daemon(8))
81 - Email::Address::XS deb: libemail-address-xs-perl
82 pkg: pkg-Email-Address-XS
83 (correct parsing of tricky email
84 addresses, phrases and comments,
87 - Parse::RecDescent deb: libparse-recdescent-perl
88 pkg: p5-Parse-RecDescent
89 rpm: perl-ParseRecDescent
90 (optional, for public-inbox-imapd(1))
92 - Mail::IMAPClient deb: libmail-imapclient-perl
93 pkg: p5-Mail-IMAPClient
94 rpm: perl-Mail-IMAPClient
95 (optional for lei and public-inbox-watch)
97 - BSD::Resource deb: libbsd-resource-perl
99 rpm: perl-BSD-Resource
100 (optional, for PSGI limiters
101 see public-inbox-config(5))
103 - Plack::Middleware::ReverseProxy deb: libplack-middleware-reverseproxy-perl
104 pkg: p5-Plack-Middleware-ReverseProxy
105 rpm: perl-Plack-Middleware-ReverseProxy
106 (ensures redirects are correct when running
107 behind nginx or Varnish)
109 * highlight deb: libhighlight-perl
110 (for syntax highlighting with coderepo)
112 * xapian-compact (tool) deb: xapian-tools
115 (optional, for public-inbox-compact(1))
117 * curl (tool) deb, pkg, rpm: curl
118 (for HTTP(S) externals with curl)
120 - Linux::Inotify2 deb: liblinux-inotify2-perl
121 rpm: perl-Linux-Inotify2
122 (for lei, public-inbox-watch and -imapd
125 - IO::KQueue pkg: p5-IO-KQueue
126 (for lei, public-inbox-watch and -imapd
129 - Net::Server deb: libnet-server-perl
132 (for HTTP/IMAP/NNTP background daemons,
133 not needed as systemd services or
136 The following module is typically pulled in by dependencies listed
137 above, so there is no need to explicitly install them:
139 - DBI deb: libdbi-perl
142 (pulled in by DBD::SQLite)
144 Uncommonly needed modules (see HACKING for development-only modules):
146 - Socket6 deb: libsocket6-perl
149 (pulled in by SpamAssassin and Net::Server,
150 only necessary if using IPv6 with
151 Plack::Middleware::AccessLog or similar
154 - Crypt::CBC deb: libcrypt-cbc-perl
156 (for PublicInbox::Unsubscribe (rarely used))
158 standard MakeMaker installation (Perl)
159 --------------------------------------
161 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
162 This is typically installed with Perl, but RPM-based systems will likely
163 need to install the `perl-ExtUtils-MakeMaker' package.
165 Once the dependencies are installed, you should be able to build and
166 install the system (into /usr/local) with:
170 make test # see HACKING for faster tests for hackers
171 make install # root permissions may be needed
173 symlink-install (public-inbox.git and 1.7.0+)
174 ---------------------------------------------
176 For users who lack permissions and/or wish to minimize their
177 installation footprint, the "symlink-install" target is available in
178 public-inbox.git. The following installs symlinks to $HOME/bin
179 pointing to the source tree:
182 make symlink-install prefix=$HOME
184 Other installation notes
185 ------------------------
187 Debian 8.x (jessie) users, use Debian 8.5 or later if using Xapian:
188 https://bugs.debian.org/808610
190 public-inbox-* commands will never store unregeneratable data in
191 Xapian nor any other search database we might use; Xapian
192 corruption will not destroy critical data. Note: `lei' DOES store
193 unregeneratable data in Xapian and SQLite.
195 See the public-inbox-overview(7) man page for the next steps once
196 the installation is complete.
198 The following required packages are part of the Perl standard
199 library. Debian-based distros put them in "libperl5.$MINOR" or
200 "perl-modules-5.$MINOR"; and FreeBSD puts them in "perl5".
201 RPM-based distros split them out into separate packages:
203 * Digest::SHA rpm: perl-Digest-SHA
204 * Data::Dumper rpm: perl-Data-Dumper
205 * Encode rpm: perl-Encode
206 * IO::Compress rpm: perl-IO-Compress
207 * Storable rpm: perl-Storable
208 * Text::ParseWords rpm: perl-Text-Parsewords
213 Copyright all contributors <meta@public-inbox.org>
214 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>