Shivaram Lingamneni 4 лет назад
Родитель
Сommit
98ac900ac3
1 измененных файлов: 11 добавлений и 29 удалений
  1. 11
    29
      docs/MANUAL.md

+ 11
- 29
docs/MANUAL.md Просмотреть файл

@@ -124,7 +124,7 @@ If you're using Arch Linux, you can also install the [`oragono` package](https:/
124 124
 For further information and a sample docker-compose file see the separate [Docker documentation](https://github.com/oragono/oragono/blob/master/distrib/docker/README.md).
125 125
 
126 126
 
127
-## Productionizing on Linux
127
+## Productionizing
128 128
 
129 129
 The recommended way to operate oragono as a service on Linux is via systemd. This provides a standard interface for starting, stopping, and rehashing (via `systemctl reload`) the service. It also captures oragono's loglines (sent to stderr in the default configuration) and writes them to the system journal.
130 130
 
@@ -134,11 +134,14 @@ The only major distribution that currently packages Oragono is Arch Linux; the a
134 134
 1. Copy the executable binary `oragono`, the config file `ircd.yaml`, the database `ircd.db`, and the self-signed TLS certificate (`tls.crt` and `tls.key`) to `/home/oragono`. Ensure that they are all owned by the new oragono role user: `sudo chown oragono:oragono /home/oragono/*`. Ensure that the configuration file logs to stderr.
135 135
 1. Install our example [oragono.service](https://github.com/oragono/oragono/blob/master/distrib/systemd/oragono.service) file to `/etc/systemd/system/oragono.service`.
136 136
 1. Enable and start the new service with the following commands:
137
-  1. `systemctl daemon-reload`
138
-  1. `systemctl enable oragono.service`
139
-  1. `systemctl start oragono.service`
140
-  1. Confirm that the service started correctly with `systemctl status oragono.service`
141
-1. Now, if you haven't already, obtain valid TLS certificates for your domain. The simplest way to do this is to get them from [Let's Encrypt](https://letsencrypt.org/) with [Certbot](https://certbot.eff.org/). The correct way to do this will depend on whether you are already running a web server on port 80. If you are, follow the guides on the Certbot website; if you aren't, you can use `certbot certonly --standalone --preferred-challenges http -d example.com` (replace `example.com` with your domain).
137
+    1. `systemctl daemon-reload`
138
+    1. `systemctl enable oragono.service`
139
+    1. `systemctl start oragono.service`
140
+    1. Confirm that the service started correctly with `systemctl status oragono.service`
141
+
142
+The other major hurdle for productionizing (but one well worth the effort) is obtaining valid TLS certificates for your domain, if you haven't already done so:
143
+
144
+1. The simplest way to get valid TLS certificates is from [Let's Encrypt](https://letsencrypt.org/) with [Certbot](https://certbot.eff.org/). The correct procedure will depend on whether you are already running a web server on port 80. If you are, follow the guides on the Certbot website; if you aren't, you can use `certbot certonly --standalone --preferred-challenges http -d example.com` (replace `example.com` with your domain).
142 145
 1. At this point, you should have certificates available at `/etc/letsencrypt/live/example.com` (replacing `example.com` with your domain). You should serve `fullchain.pem` as the certificate and `privkey.pem` as its private key. However, these files are owned by root and the private key is not readable by the oragono role user, so you won't be able to use them directly in their current locations. You can write a post-renewal hook for certbot to make copies of these certificates accessible to the oragono role user. For example, install the following script as `/etc/letsencrypt/renewal-hooks/post/install-oragono-certificates`, again replacing `example.com` with your domain name, and chmod it 0755:
143 146
 
144 147
 ````bash
@@ -393,30 +396,9 @@ Similarly, for a public channel (one without `+i`), users can ban nick/account n
393 396
 
394 397
 # IRC over TLS
395 398
 
396
-IRC has traditionally been available over both plaintext (on port 6667) and SSL/TLS (on port 6697). We recommend that you make your server available exclusively via TLS, since exposing plaintext access allows for unauthorized interception or modification of user data or passwords. While the default config file exposes a plaintext public port, it also contains instructions on how to disable it or replace it with a 'dummy' plaintext listener that simply directs users to reconnect using TLS.
397
-
398
-
399
-## How do I use Let's Encrypt certificates?
400
-
401
-[Let's Encrypt](https://letsencrypt.org) is a widely recognized certificate authority that provides free certificates. Here's a quick-start guide for using those certificates with Oragono:
402
-
403
-1. Follow this [guidance](https://letsencrypt.org/getting-started/) from Let's Encrypt to create your certificates.
404
-2. You should now have a set of `pem` files, Mainly, we're interested in your `live/` Let's Encrypt directory (e.g. `/etc/letsencrypt/live/<site>/`).
405
-3. Here are how the config file keys map to LE files:
406
-    - `cert: tls.crt` is `live/<site>/fullchain.pem`
407
-    - ` key: tls.key` is `live/<site>/privkey.pem`
408
-4. You may need to copy the `pem` files to another directory so Oragono can read them, or similarly use a script like [this one](https://github.com/darwin-network/slash/blob/master/etc/bin/install-lecerts) to automagically do something similar.
409
-5. By default, `certbot` will automatically renew your certificates. Oragono will only reread certificates when it is restarted, or during a rehash (e.g., on receiving the `/rehash` command or the `SIGHUP` signal). You can add an executable script to `/etc/letsencrypt/renewal-hooks/post` that can perform the rehash. Here's one example of such a script:
410
-
411
-```bash
412
-#!/bin/bash
413
-pkill -HUP oragono
414
-```
415
-
416
-The main issues you'll run into are going to be permissions issues. This is because by default, certbot will generate certificates that non-root users can't (and probably shouldn't) read. If you run into trouble, look over the script in step **4** and/or make sure you're copying the files to somewhere else, as well as giving them correct permissions with `chown`, `chgrp` and `chmod`.
417
-
418
-On other platforms or with alternative ACME tools, you may need to use other steps or the specific files may be named differently.
399
+IRC has traditionally been available over both plaintext (on port 6667) and SSL/TLS (on port 6697). We recommend that you make your server available exclusively via TLS, since exposing plaintext access allows for unauthorized interception or modification of user data or passwords. The default config file no longer exposes a plaintext port, so if you haven't modified your `listeners` section, you're good to go.
419 400
 
401
+For a quickstart guide to obtaining valid TLS certificates from Let's Encrypt, see the "productionizing" section of the manual above.
420 402
 
421 403
 ## How can I "redirect" users from plaintext to TLS?
422 404
 

Загрузка…
Отмена
Сохранить