| 1 | # NAME |
| 2 | |
| 3 | klutshnikd.cfg - configuration for for klutshnik KMS server `klutshnikd` |
| 4 | |
| 5 | # DESCRIPTION |
| 6 | |
| 7 | `klutshnikd.cfg` holds the configuration for the klutshnik KMS |
| 8 | **server**. |
| 9 | |
| 10 | The server looks for the configuration in the following files and order: |
| 11 | |
| 12 | - /etc/klutshnikd/config |
| 13 | - ~/.config/klutshnikd/config |
| 14 | - ~/.klutshnikdrc |
| 15 | - ./klutshnikd.cfg |
| 16 | |
| 17 | The configuration file format is TOML, see https://toml.io/ . |
| 18 | |
| 19 | ## `[server]` SECTION |
| 20 | |
| 21 | This section contains all the settings for the server. |
| 22 | |
| 23 | ### ADDRESS |
| 24 | |
| 25 | This can be either an IPv4 or IPv6 address to listen on. Default: 127.0.0.1 |
| 26 | |
| 27 | ### PORT |
| 28 | |
| 29 | The port the server listens on. |
| 30 | |
| 31 | If you run a server that is publicly available on the internet, it is |
| 32 | recommended to run it on port 443, which - if you ever go to a restricted |
| 33 | network environment - has the biggest chances that a firewall will allow to |
| 34 | access this. Default: 443 |
| 35 | |
| 36 | ### `SSL_KEY` & `SSL_SERVER` |
| 37 | |
| 38 | These two settings point at files containing the PEM encoded SSL certificate |
| 39 | and key of the server. |
| 40 | |
| 41 | In the times of Let's Encrypt this should not be a big challenge. You do need a |
| 42 | domain name you control for this though, but that is a requirement for public |
| 43 | servers anyway. If you have a domain name, you can run on that host something |
| 44 | like this: |
| 45 | |
| 46 | ```sh |
| 47 | sudo certbot certonly --standalone --preferred-challenges http -d example.com |
| 48 | ``` |
| 49 | |
| 50 | If you cannot get a proper CA signed certificate the client also |
| 51 | supports using self-signed certificates, but that should only be used |
| 52 | in development, isolated or VPN environments. |
| 53 | |
| 54 | ### TIMEOUT |
| 55 | |
| 56 | This configures the timeouts for the server. In order to minimize resource |
| 57 | exhaustion attack this should be kept as small as possible, but also big enough |
| 58 | for clients to answer in time. Since all the messages are very small, something |
| 59 | in the low one-digit seconds ballpark should be ample. Default 3s. |
| 60 | |
| 61 | ### DATADIR |
| 62 | |
| 63 | This variable contains the path to the directory where all the |
| 64 | key-related data is stored. Default: `/var/lib/klutshnikd` |
| 65 | |
| 66 | ### `MAX_KIDS` |
| 67 | |
| 68 | This setting configures the maximum of how many handlers (sessions) to run in |
| 69 | parallel. Default: 5 |
| 70 | |
| 71 | ### VERBOSE |
| 72 | |
| 73 | This setting increases the messages the server prints out during operation. |
| 74 | |
| 75 | ### `RECORD_SALT` |
| 76 | |
| 77 | This is a value that internally hashes the record Ids provided by clients. It |
| 78 | should be changed upon installation to a fresh unique value. |
| 79 | |
| 80 | ### `TS_EPSILON` |
| 81 | |
| 82 | This setting defines how long a message is considered fresh during a DKG |
| 83 | protocol, any messages that have timestamps that are older than this many |
| 84 | seconds will abort the DKG protocol. Increase this value if you have/expect |
| 85 | laggy links. Default: 600s |
| 86 | |
| 87 | ### LTSIGKEY |
| 88 | |
| 89 | This setting points at a file containing the long-term signing key of |
| 90 | the server. The key can be generated by running the `klutshnikd(1)` |
| 91 | client with the `init` parameter: |
| 92 | |
| 93 | ```sh |
| 94 | $ klutshnikd init |
| 95 | ``` |
| 96 | |
| 97 | You need to publish this so that users can use your server. |
| 98 | |
| 99 | ### NOISEKEY |
| 100 | |
| 101 | This setting points at a file containing the long-term Noise key of |
| 102 | the server. The key can be generated by running the `klutshnikd(1)` |
| 103 | client with the `init` parameter: |
| 104 | |
| 105 | ```sh |
| 106 | $ klutshnikd init |
| 107 | ``` |
| 108 | |
| 109 | You need to publish this so that users can use your server. |
| 110 | |
| 111 | ### AUTHORIZED_KEYS |
| 112 | |
| 113 | This variable points at a file, containing a list of long-term signing |
| 114 | public keys for other KMS servers. This is checked on create and |
| 115 | key-rotation operations, when the servers are establishing contact |
| 116 | with each other. |
| 117 | |
| 118 | # FILES |
| 119 | |
| 120 | - /etc/klutshnikd/config |
| 121 | - ~/.config/klutshnikd/config |
| 122 | - ~/.klutshnikdrc |
| 123 | - ./klutshnikd.cfg |
| 124 | |
| 125 | # SECURITY CONSIDERATIONS |
| 126 | |
| 127 | You **should** back up securely your ltsigkey, noisekey, your SSL cert |
| 128 | and key, and the value of your `RECORD_SALT` setting. |
| 129 | |
| 130 | # REPORTING BUGS |
| 131 | |
| 132 | https://github.com/stef/klutshnik/issues/ |
| 133 | |
| 134 | # AUTHOR |
| 135 | |
| 136 | Written by Stefan Marsiske. |
| 137 | |
| 138 | # COPYRIGHT |
| 139 | |
| 140 | Copyright © 2024 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. |
| 141 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. |
| 142 | |
| 143 | # SEE ALSO |
| 144 | |
| 145 | `klutshnikd(1)`, `klutshnik(1)`, `klutshnik.cfg(5)` |