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 2021, 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 module required:
41 * URI::Escape 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 - Net::Server deb: libnet-server-perl
78 (for HTTP/IMAP/NNTP background daemons,
79 not needed as systemd services or
82 - Inline::C deb: libinline-c-perl
84 rpm: perl-Inline (or perl-Inline-C)
85 (speeds up process spawning on Linux,
86 see public-inbox-daemon(8))
88 - Email::Address::XS deb: libemail-address-xs-perl
89 pkg: pkg-Email-Address-XS
90 (correct parsing of tricky email
91 addresses, phrases and comments,
94 - Parse::RecDescent deb: libparse-recdescent-perl
95 pkg: p5-Parse-RecDescent
96 rpm: perl-ParseRecDescent
97 (optional, for public-inbox-imapd(1))
99 - BSD::Resource deb: libbsd-resource-perl
101 rpm: perl-BSD-Resource
102 (optional, for PSGI limiters
103 see public-inbox-config(5))
105 - Plack::Middleware::ReverseProxy deb: libplack-middleware-reverseproxy-perl
106 pkg: p5-Plack-Middleware-ReverseProxy
107 rpm: perl-Plack-Middleware-ReverseProxy
108 (ensures redirects are correct when running
109 behind nginx or Varnish)
111 * highlight deb: libhighlight-perl
112 (for syntax highlighting with coderepo)
114 * xapian-compact (tool) deb: xapian-tools
117 (optional, for public-inbox-compact(1))
119 - Linux::Inotify2 deb: liblinux-inotify2-perl
120 rpm: perl-Linux-Inotify2
121 (for public-inbox-watch and -imapd on Linux)
123 The following module is typically pulled in by dependencies listed
124 above, so there is no need to explicitly install them:
126 - DBI deb: libdbi-perl
129 (pulled in by DBD::SQLite)
131 Uncommonly needed modules (see HACKING for development-only modules):
133 - Socket6 deb: libsocket6-perl
136 (pulled in by SpamAssassin and Net::Server,
137 only necessary if using IPv6 with
138 Plack::Middleware::AccessLog or similar
141 - Crypt::CBC deb: libcrypt-cbc-perl
143 (for PublicInbox::Unsubscribe (rarely used))
145 standard MakeMaker installation (Perl)
146 --------------------------------------
148 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
149 This is typically installed with Perl, but RPM-based systems will likely
150 need to install the `perl-ExtUtils-MakeMaker' package.
152 Once the dependencies are installed, you should be able to build and
153 install the system (into /usr/local) with:
157 make test # see HACKING for faster tests for hackers
158 make install # root permissions may be needed
160 symlink-install (public-inbox.git and 1.7.0+)
161 ---------------------------------------------
163 For users who lack permissions and/or wish to minimize their
164 installation footprint, the "symlink-install" target is available in
165 public-inbox.git. The following installs symlinks to $HOME/bin
166 pointing to the source tree:
169 make symlink-install prefix=$HOME
171 Other installation notes
172 ------------------------
174 Debian 8.x (jessie) users, use Debian 8.5 or later if using Xapian:
175 https://bugs.debian.org/808610
177 public-inbox will never store unregeneratable data in Xapian
178 or any other search database we might use; Xapian corruption
179 will not destroy critical data.
181 See the public-inbox-overview(7) man page for the next steps once
182 the installation is complete.
184 The following required packages are part of the Perl standard
185 library. Debian-based distros put them in "libperl5.$MINOR" or
186 "perl-modules-5.$MINOR"; and FreeBSD puts them in "perl5".
187 RPM-based distros split them out into separate packages:
189 * Digest::SHA rpm: perl-Digest-SHA
190 * Data::Dumper rpm: perl-Data-Dumper
191 * Encode rpm: perl-Encode
192 * IO::Compress rpm: perl-IO-Compress
193 * Storable rpm: perl-Storable
194 * Text::ParseWords rpm: perl-Text-Parsewords
199 Copyright 2013-2021 all contributors <meta@public-inbox.org>
200 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>