Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add docs for ACME setup #4547

Merged
merged 11 commits into from
Feb 1, 2019
Merged

Add docs for ACME setup #4547

merged 11 commits into from
Feb 1, 2019

Conversation

anoadragon453
Copy link
Member

Add documentation for ACME certificate provisioning in Synapse v0.99.0+.

@codecov-io
Copy link

codecov-io commented Feb 1, 2019

Codecov Report

Merging #4547 into release-v0.99.0 will decrease coverage by 0.01%.
The diff coverage is n/a.

@@                Coverage Diff                 @@
##           release-v0.99.0   #4547      +/-   ##
==================================================
- Coverage            74.91%   74.9%   -0.02%     
==================================================
  Files                  338     338              
  Lines                34495   34495              
  Branches              5619    5619              
==================================================
- Hits                 25843   25839       -4     
- Misses                7069    7074       +5     
+ Partials              1583    1582       -1

README.rst Outdated
automatically for you for free** through `Let's Encrypt
<https://letsencrypt.org/>`_ if you tell it to.

Note: Synapse does not currently hot-renew Let's Encrypt certificates for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meh, let's leave this out

README.rst Outdated

Synapse requires valid TLS certificates for communication between servers
(port ``8448`` by default) in addition to those that are client-facing (port
``443``). Synapse **will provision server-to-server certificates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should mention that they can be the same cert if the server_name is the same as the hostname that the client connects to.

README.rst Outdated
**Using a reverse proxy**

A reverse proxy such as Apache or Nginx allows a single process (the web
server) to listen on port 80 and redirect traffic to the appropriate program
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/redirect/proxy/

README.rst Outdated
not being used for any other purpose then all that is necessary is the
following:

Install ``authbind``::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Install ``authbind``::
Install ``authbind``. For example, on Debian/Ubuntu::

README.rst Outdated
# authbind syntax. don't start Synapse yet
authbind --deep <synapse start command>

If using the `Systemd`_ service file above, you can change the following line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no systemd file; need to change this to use synctl

README.rst Outdated
certificate, but please be aware that a valid certificate will be required in
Synapse v1.0.

If you would like to do initial testing with a client without having to setup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is limited to initial testing?

README.rst Outdated
the default 8448. However, if you are thinking of using a reverse-proxy on the
federation port, which is not recommended, be sure to read
`Reverse-proxying the federation port`_ first.)
the default 8448.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the default 8448.
the default 8448.)

README.rst Outdated
``Certificates[0].SHA256Fingerprint`` (the fingerprint of the certificate
presented by your reverse-proxy) matches ``Keys.tls_fingerprints[0].sha256``
(the fingerprint of the certificate Synapse is using).
Please see `ACME setup`_ for details on reverse-proxying the federation port.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the acme setup section doesn't say anything about reverse-proxying port 8448. Suggest removing this sentence.

@anoadragon453 anoadragon453 changed the base branch from develop to release-v0.99.0 February 1, 2019 15:03
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated

authbind --deep <synapse start command>

If you would like to use your own certificates, you can do so by
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we take this out of the acme>authbind section? maybe put it above 'ACME setup' ?

README.rst Outdated
If you would like to use your own certificates, you can do so by
changing ``tls_certificate_path`` and ``tls_private_key_path`` in
``homeserver.yaml``; alternatively, you can use a reverse-proxy, but be sure
to read `Using a reverse proxy with Synapse`_ when doing so. Apart from port
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's anything terribly relevant in the "Using a reverse proxy" section; I'd omit the link.

README.rst Outdated
changing ``tls_certificate_path`` and ``tls_private_key_path`` in
``homeserver.yaml``; alternatively, you can use a reverse-proxy, but be sure
to read `Using a reverse proxy with Synapse`_ when doing so. Apart from port
8448 using TLS, both ports are the same in the default configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which ports?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this is talking about. Tempted to just take out the line.

README.rst Outdated
8448 for server-server connections. All the Matrix endpoints begin ``/_matrix``,
so an example nginx configuration might look like::
The recommended setup is therefore to configure your reverse-proxy on port
443 to port 8008 of synapse for client connections, and port 8448 for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes no sense.

I think the recommendation (if you're going to use a reverse-proxy) should be:

  • set no_tls: True and remove the tls listeners from the synapse config
  • have reverse proxy listen on both 443 and 8448, and forward both to port 8008.

However, this is starting to all get out of scope. For now I suggest: you remove this paragraph and just say "An example nginx configuration for forwarding client connections to synapse is::"

@anoadragon453 anoadragon453 requested review from a team and removed request for a team February 1, 2019 16:53
richvdh and others added 4 commits February 1, 2019 16:54
Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com>
Co-Authored-By: anoadragon453 <1342360+anoadragon453@users.noreply.github.com>
@anoadragon453 anoadragon453 requested a review from a team February 1, 2019 16:59
@anoadragon453 anoadragon453 merged commit 142b2cd into release-v0.99.0 Feb 1, 2019
@anoadragon453 anoadragon453 deleted the anoa/acme_docs branch February 1, 2019 17:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants