README.md 1.94 KB
Newer Older
Kai Michaelis's avatar
Kai Michaelis committed
1 2
Hagrid
======
Kai Michaelis's avatar
Kai Michaelis committed
3

4 5 6
Hagrid is a verifying OpenPGP key server.

You can find general instructions and an API documentation at the running
6543's avatar
6543 committed
7
instance at [https://keys.openpgp.org](https://keys.openpgp.org).
Kai Michaelis's avatar
Kai Michaelis committed
8

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
License
-------

Hagrid is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Hagrid is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
License for more details.

You should have received a copy of the GNU Affero General Public
License along with Hagrid.  If not, see
<https://www.gnu.org/licenses/>.

Kai Michaelis's avatar
Kai Michaelis committed
26 27 28
Quick Start
-----------

Kai Michaelis's avatar
Kai Michaelis committed
29
Building Hagrid requires a working nightly Rust toolchain. The
30
easiest way to get the toolchain is to download [rustup](https://rustup.rs).
31 32
After rustup is installed, get the nightly compiler and tools, copy the
config file, and simply compile and run:
33 34

```bash
Kai Michaelis's avatar
Kai Michaelis committed
35 36
cd hagrid
rustup override set nightly
37 38
cp Rocket.toml.dist Rocket.toml
cargo run
39 40
```

41
This will spawn a web server listening on port 8080.
42

43 44 45 46
For deployment, a release build should be used (`cargo build --release`). This
will be statically built, and can be copied anywhere. You will also need to
adjust `Rocket.toml` accordingly.  Hagrid uses `sendmail` for mailing, so you
also need a working local mailer setup.
Kai Michaelis's avatar
Kai Michaelis committed
47

Kai Michaelis's avatar
Kai Michaelis committed
48 49 50
Reverse Proxy
-------------

51
Hagrid is designed to defer lookups to reverse proxy server like Nginx
52 53 54 55
and Apache. Lookups via `/vks/v1/by-finingerprint`, `/vks/v1/by-keyid`, and
`/vks/v1/by-email` can be handled by a robust and performant HTTP server. A
sample configuration for nginx is part of the repository (`nginx.conf`,
`hagrid-routes.conf`).
Kai Michaelis's avatar
Kai Michaelis committed
56

Kai Michaelis's avatar
Kai Michaelis committed
57 58 59
Community
---------

60 61
We're in `#hagrid` on Freenode IRC, also reachable via Matrix as
`#hagrid:stratum0.org`.