You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.rst 4.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. Installation
  2. ============
  3. [TODO(kegan): I also needed libffi-dev, which I don't think is included in build-essential.]
  4. First, the dependencies need to be installed. Start by installing 'python-dev'
  5. and the various tools of the compiler toolchain:
  6. Installing prerequisites on ubuntu::
  7. $ sudo apt-get install build-essential python-dev
  8. Installing prerequisites on Mac OS X::
  9. $ xcode-select --install
  10. The homeserver has a number of external dependencies, that are easiest
  11. to install by making setup.py do so, in --user mode::
  12. $ python setup.py develop --user
  13. This will run a process of downloading and installing into your
  14. user's .local/lib directory all of the required dependencies that are
  15. missing.
  16. Once this is done, you may wish to run the homeserver's unit tests, to
  17. check that everything is installed as it should be::
  18. $ python setup.py test
  19. This should end with a 'PASSED' result::
  20. Ran 143 tests in 0.601s
  21. PASSED (successes=143)
  22. Running The Home Server
  23. =======================
  24. In order for other home servers to send messages to your server, they will need
  25. to know its host name. You have two choices here, which will influence the form
  26. of your user IDs:
  27. 1) Use the machine's own hostname as available on public DNS in the form of its
  28. A or AAAA records. This is easier to set up initially, perhaps for testing,
  29. but lacks the flexibility of SRV.
  30. 2) Set up a SRV record for your domain name. This requires you create a SRV
  31. record in DNS, but gives the flexibility to run the server on your own
  32. choice of TCP port, on a machine that might not be the same name as the
  33. domain name.
  34. For the first form, simply pass the required hostname (of the machine) as the
  35. --host parameter::
  36. $ python synapse/app/homeserver.py --host machine.my.domain.name
  37. For the second form, first create your SRV record and publish it in DNS. This
  38. needs to be named _matrix._tcp.YOURDOMAIN, and point at at least one hostname
  39. and port where the server is running. (At the current time we only support a
  40. single server, but we may at some future point support multiple servers, for
  41. backup failover or load-balancing purposes). The DNS record would then look
  42. something like::
  43. _matrix._tcp IN SRV 10 0 8448 machine.my.domain.name.
  44. At this point, you should then run the homeserver with the hostname of this
  45. SRV record, as that is the name other machines will expect it to have::
  46. $ python synapse/app/homeserver.py --host my.domain.name --port 8448
  47. You may additionally want to pass one or more "-v" options, in order to
  48. increase the verbosity of logging output; at least for initial testing.
  49. Running The Web Client
  50. ======================
  51. At the present time, the web client is not directly served by the homeserver's
  52. HTTP server. To serve this in a form the web browser can reach, arrange for the
  53. 'webclient' sub-directory to be made available by any sort of HTTP server that
  54. can serve static files. For example, python's SimpleHTTPServer will suffice::
  55. $ cd webclient
  56. $ python -m SimpleHTTPServer
  57. You can now point your browser at http://localhost:8000/ to find the client.
  58. If this is the first time you have used the client from that browser (it uses
  59. HTML5 local storage to remember its config), you will need to log in to your
  60. account. If you don't yet have an account, because you've just started the
  61. homeserver for the first time, then you'll need to register one.
  62. Registering A New Account
  63. -------------------------
  64. Your new user name will be formed partly from the hostname your server is
  65. running as, and partly from a localpart you specify when you create the
  66. account. Your name will take the form of::
  67. @localpart:my.domain.here
  68. (pronounced "at localpart on my dot domain dot here")
  69. Specify your desired localpart in the topmost box of the "Register for an
  70. account" form, and click the "Register" button.
  71. Logging In To An Existing Account
  72. ---------------------------------
  73. [[TODO(paul): It seems the current web client still requests an access_token -
  74. I suspect this part will need updating before we can point people at how to
  75. perform e.g. user+password or 3PID authenticated login]]
  76. Building Documentation
  77. ======================
  78. Before building documentation install spinx and sphinxcontrib-napoleon::
  79. $ pip install sphinx
  80. $ pip install sphinxcontrib-napoleon
  81. Building documentation::
  82. $ python setup.py build_sphinx