* "gcc-6" should just be "gcc"
gcc-6 isn't a valid package name
* It was `adduser mastodon` for a reason
making it with `--system and --disabled-password` breaks the rest of the guide where `su - mastodon` is used.
I use this method as it makes maintaining the Mastodon instance easier.
* eval "$(rbenv init -)" should be in ~/.bashrc as well
otherwise the correct ruby version isn't used
* Use sudo su - instead
- Nginx duplication in packages installation
- Specify the user type for `mastodon` (--system and --disabled-password)
- Simplify services start-up
- Clearly write how to check services are running (or not) with `systemctl status`
* Complete re-write of Mastodon Production Guide
I re-wrote the Mastodon Production Guide so that it has a better structure.
Work on this re-write was done on my own repo:
https://github.com/staticsafe/mastodon-documentation
* Fix typo in a heading
* Change node.js Repository section to use curl|bash method.
For simplicity's sake
* Add an explanation of the dependencies
Added in the "Various Other Dependencies" section.
* Fix links to the Ruby project, was using the link to Rails previously.
* Add Let's Encrypt section with a short guide to certificate tool installation, certificate generation and automated renewal.
* Use systemctl instead of service in LE section
This is for consistency reasons.
`assets` are now at `packs`. Unfortunately this change will permanently cache `stats.json` and `report.html`, but these aren't super critical since they're just for debugging. I confirmed that `manifest.json` is not affected and no other non-fingerprinted assets are affected.
* Add a Debian 8 installation note
According to the conversation in f0a863feec, Debian 8 installs
an older version of nginx by default. This adds a note telling people
how to install a newer one.
* updating wording
* Avoid hard-coding ciphers into configuration
This change allows OpenSSL to choose the most appropriate available cipher(s) from the HIGH cipher suite. This is sufficient to get an A on the SSLLabs.com tests suite. If MEDIUM is allowed as well, the grade drops to a B which is still more than adequate for most deployments.
This type of configuration would prevent problems such as the current inability of Tusky on Android 7 devices to connect to some Mastodon instances.
The main benefit though, is this delegates the decisions about which ciphers are "good" and which ciphers are "bad" to the experts; the distribution security teams and the OpenSSL developers. If a weakness is found in a particular cipher it will get moved from HIGH to one of the lower classes (or removed entirely) and this will get deployed just like any other security update. Similarly, if new stronger ciphers are standardized (such as Curve 25519) - these will immediately become available without needing to change the configuration.
Hope this helps!
Note: I have not been able to test this change with Mastodon myself. I am using these settings in production elsewhere though, and they work quite well. Alternately, if people don't want to trust the OpenSSL definitions, please consider taking a look at https://wiki.mozilla.org/Security/Server_Side_TLS and implementing the recommendations from there.
* Also avoid SHA1
As requested during review. :)
* Fix a typo in the ssl_ciphers line
I wrote !SHA1, should have written just !SHA. Very sorry about the noise.
* Avoid hard-coding ciphers into configuration
This change allows OpenSSL to choose the most appropriate available cipher(s) from the HIGH cipher suite. This is sufficient to get an A on the SSLLabs.com tests suite. If MEDIUM is allowed as well, the grade drops to a B which is still more than adequate for most deployments.
This type of configuration would prevent problems such as the current inability of Tusky on Android 7 devices to connect to some Mastodon instances.
The main benefit though, is this delegates the decisions about which ciphers are "good" and which ciphers are "bad" to the experts; the distribution security teams and the OpenSSL developers. If a weakness is found in a particular cipher it will get moved from HIGH to one of the lower classes (or removed entirely) and this will get deployed just like any other security update. Similarly, if new stronger ciphers are standardized (such as Curve 25519) - these will immediately become available without needing to change the configuration.
Hope this helps!
Note: I have not been able to test this change with Mastodon myself. I am using these settings in production elsewhere though, and they work quite well. Alternately, if people don't want to trust the OpenSSL definitions, please consider taking a look at https://wiki.mozilla.org/Security/Server_Side_TLS and implementing the recommendations from there.
* Also avoid SHA1
As requested during review. :)
To further increase security add a strong Diffie-Hellman group, which is standard practice when setting up ssl certs. Anyone who can setup letsencrypt can also setup a DH group.