{"id":320754,"date":"2021-04-02T15:01:28","date_gmt":"2021-04-02T15:01:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320754"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320754","title":{"rendered":"\u0421\u0432\u043e\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 Matrix-synapse \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Jitsi-meet. \u0427\u0430\u0441\u0442\u044c 3"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412\u0441\u0435\u043c \u041f\u0440\u0438\u0432\u0435\u0442\u044c. \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0430 \u0441\u0442\u0430\u043b\u0430 \u0432\u0442\u043e\u0440\u043e\u0439. \u042d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f Matrix \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0447\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Jitsi-meet. \u0411\u0435\u0437 \u043f\u0430\u043d\u0438\u043a\u0438, \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442. \u0410 \u043f\u043e\u043a\u0430 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f Matrix.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u043d\u0443\u0430\u043b \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0438\u043c. \u042d\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 <a href=\"https:\/\/matrix.org\/blog\/2020\/04\/06\/running-your-own-secure-communication-service-with-matrix-and-jitsi#jitsi\" rel=\"noopener noreferrer nofollow\">\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e<\/a> \u043c\u0430\u043d\u0443\u0430\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441 \u043c\u043e\u0438\u043c\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439. \u0418 \u0432\u043e\u0448\u0435\u043b \u043e\u043d \u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0435\u0440\u0438\u044e \u0441\u0442\u0430\u0442\u0435\u0439, \u0438\u0431\u043e \u0441\u0432\u044f\u0437\u0430\u043d \u0441 jitsi-meet (\u043d\u0443 \u0438\u043b\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435).<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043c\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 &#171;\u0442\u0430\u043d\u0446\u044b&#187; \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u0435\u043c\u0443 &#171;\u0430 \u0437\u0430\u0447\u0435\u043c \u0438 \u043a\u043e\u043c\u0443 \u044d\u0442\u043e \u043d\u0430\u0434\u043e&#187;&#8230;.<\/p>\n<h2>\u0410 \u0437\u0430\u0447\u0435\u043c \u0438 \u043a\u043e\u043c\u0443 \u044d\u0442\u043e \u043d\u0430\u0434\u043e&#8230;<\/h2>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e: \u043e\u0442 \u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043d\u043e\u0439\u0438 \u0434\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. Matrix-synapse &#8212; \u044d\u0442\u043e \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u043f\u0440\u043e\u0439\u0442\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0438 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c matrix, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u043c \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0435 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e, \u0430 \u0443 \u0432\u0430\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0415\u0441\u043b\u0438 \u0443\u0436 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0430\u043d\u043e\u0439\u0438\u0442\u044c, \u0442\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0445\u0443\u0442\u044c \u0432 VPN \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u0442\u0435\u0445, \u0443 \u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a VPN (\u0442\u0443\u0442 \u043c\u044b \u0442\u0430\u043a\u043e\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e matrix \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 jitsi). <\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/post\/512236\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0434\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: jitsi-meet &#8212; \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0439 \u0438 jibri &#8212; \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\/\u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0439. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043d\u0430\u0448\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041c\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u043e\u043c \u0438 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u0435\u0433\u043e \u043a \u043d\u0430\u0448\u0435\u043c\u0443 jitsi, \u0434\u0430\u0431\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0432\u044b\u0437\u043e\u0432\u044b \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b&nbsp;<a href=\"https:\/\/vdsina.ru\/?partner=q12vzdd5w7\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438 &#171;\u0442\u0430\u043d\u0446\u044b&#187;.<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042f \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u044e \u043d\u0430 debian 9, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0442 \u0432\u0430\u0448\u0438\u043c \u0440\u0435\u043b\u0438\u0433\u0438\u043e\u0437\u043d\u044b\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u0430\u043c, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434 \u0441\u0432\u043e\u044e \u041e\u0421. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c Matrix \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0433\u0434\u0435 \u0443 \u0432\u0430\u0441 \u043f\u043e\u0434\u043d\u044f\u0442 Jitsi-meet \u0438\u043b\u0438 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c: \u044d\u0442\u043e\u0442 \u043c\u0430\u043d\u0443\u0430\u043b \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u043c\u044b \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c DNS \u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0438\u0445 \u0442\u0440\u0438: dnsname.com, matrix.dnsname.com \u0438 riot.dnsname.com &#8212; \u043d\u0430 IP \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<h3>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 SSL<\/h3>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b nginx \u0434\u043b\u044f jitsi \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0442\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442 \u0441\u0432\u043e\u0435\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0438 \u0431\u0443\u0434\u0443 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438 \u0434\u043b\u044f matrix.<\/p>\n<p>\u0415\u0441\u043b\u0438 nginx \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0442\u043e:<\/p>\n<pre><code class=\"bash\"># apt update # apt install nginx -y<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 nginx \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e (\u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c default \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c):<\/p>\n<pre><code class=\"bash\"># cd \/etc\/nginx\/sites-avaliable<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"bash\"># vim dnsname.com<\/code><\/pre>\n<p>\u0418 \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b:<\/p>\n<pre><code class=\"bash\">server_name dnsname.com; ... root \/var\/www\/dnsname.com;<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c. <\/p>\n<p>\u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043b\u044f riot.dnsname.com:<\/p>\n<pre><code class=\"bash\"># vim riot.dnsname.com \tserver_name riot.dnsname.com;   ...   root \/var\/www\/riot.dnsname.com\/riot;<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e matrix.dnsname.com \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code class=\"bash\"># vim matrix.dnsname.com \tserver {     # \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a        server_name matrix.dnsname.eu;         root \/var\/www\/dnsname.eu;        index index.html;         location \/ {                proxy_pass http:\/\/localhost:8008;        } ....<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u0430 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b Let&#8217;s Encrypt. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\"># apt install -y python3-certbot-nginx # certbot --nginx -d dnsname.com -d riot.dnsname.com -d matrix.dnsname.com<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0439 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u043f\u0443\u0441\u0442\u044f \u0442\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c nginx:<\/p>\n<pre><code class=\"bash\"># ln -s dnsname.com \/etc\/nginx\/sites-enable\/ # ln -s matrix.dnsname.com \/etc\/nginx\/sites-enable\/ # ln -s riot.dnsname.com \/etc\/nginx\/sites-enable\/ # systemctl restart nginx<\/code><\/pre>\n<h3>Matrix-synapse \u0438 Postgresql<\/h3>\n<p>\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 Matrix \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 SQLite &#8212; \u043f\u0440\u0438 \u043c\u0430\u043b\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Postgresql (\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Postgresql). \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442 &#171;\u043f\u043e\u0449\u0443\u043f\u0430\u0442\u044c&#187; Matrix, \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043d\u0443 \u0430 \u043c\u044b, \u0432\u0441\u0435 \u0436\u0435, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c Postgresql, \u0438\u0431\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f c SQLite \u043d\u0430 Postgresql &#8212; \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0442\u0435\u043c\u0438 \u0435\u0449\u0435 &#171;\u0442\u0430\u043d\u0446\u0430\u043c\u0438&#187;. \u041f\u043e\u0435\u0445\u0430\u043b\u0438&#8230;<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 matrix.<\/p>\n<pre><code class=\"bash\"># apt install -y lsb-release wget apt-transport-https # wget -O \/usr\/share\/keyrings\/matrix-org-archive-keyring.gpg https:\/\/packages.matrix.org\/debian\/matrix-org-archive-keyring.gpg # echo \"deb [signed-by=\/usr\/share\/keyrings\/matrix-org-archive-keyring.gpg] https:\/\/packages.matrix.org\/debian\/ $(lsb_release -cs) main\" |     tee \/etc\/apt\/sources.list.d\/matrix-org.list # apt update # apt install matrix-synapse-py3 -y<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043e DNS \u0438\u043c\u044f &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c dnsname.com.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Postgresql, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0411\u0414 \u0434\u043b\u044f matrix-synapse:<\/p>\n<pre><code class=\"bash\"># apt install postgresql postgresql-contrib -y # su - postgres # psql postgres=# \\password postgres postgres=# \\q # createuser --pwprompt synapse_user # psql postgres=#CREATE DATABASE synapse postgres-# ENCODING 'UTF8' postgres-# LC_COLLATE='C' postgres-# LC_CTYPE='C' postgres-# template=template0 postgres-# OWNER synapse_user; postgres=# \\q # exit<\/code><\/pre>\n<pre><code class=\"bash\"># cp \/etc\/matrix-synapse\/homeserver.yaml \/etc\/matrix-synapse\/homeserver.yaml.back # cat \/dev\/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Matrix:<\/p>\n<pre><code class=\"bash\"># vim \/etc\/matrix-synapse\/homeserver.yaml<\/code><\/pre>\n<p><a class=\"anchor\" name=\"db\" id=\"db\"><\/a><\/p>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 #server<em>name: &#171;server<\/em>name&#187; \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 &#171;dnsname.com&#187;, \u0443\u0431\u0438\u0440\u0430\u0435\u043c &#171;#&#187;, \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0439 #registration_shared_secret: &#171;UIBfgsjkdfhj3568JHGIUIEBfy3764JH&#187; \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0449\u0435\u043c \u043e\u043f\u0446\u0438\u044e&nbsp;<code>#enable_registration: false, \u0443\u0431\u0438\u0440\u0430\u0435\u043c \"#\" \u0438 \u043c\u0435\u043d\u044f\u0435\u043c false \u043d\u0430 true<\/code><\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0431\u043b\u043e\u043a database \u0441\u043d\u0438\u043c\u0430\u0435\u043c &#171;#&#187;  \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">database:   name: psycopg2   args:     user: synapse-user     password: password     database: synapse     host: localhost     cp_min: 5     cp_max: 10<\/code><\/pre>\n<p>\u0410 \u0431\u043b\u043e\u043a database, \u0433\u0434\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 SQLite (\u043e\u043d\u0430 \u043d\u0438\u0436\u0435) &#8212; \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c (\u0441\u0442\u0430\u0432\u0438\u043c &#171;#&#187;).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u043c \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <code>host    synapse     synapse_user    ::1\/128     md5&nbsp; &nbsp;&nbsp;<\/code>\u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f:<\/p>\n<pre><code class=\"bash\"># vim \/etc\/postgresql\/9.6\/main\/pg_hba.conf ...    # \"local\" is for Unix domain socket connections only    local   all             all                                     peer    # IPv4 local connections:    host    all             all             127.0.0.1\/32            md5    host    synapse         synapse_user    ::1\/128                 md5    # IPv6 local connections:    host    all             all             ::1\/128                 md5 ...<\/code><\/pre>\n<p><code>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Matrix \u0438 Postgresql:<\/code><\/p>\n<pre><code class=\"bash\"># systemctl restart postgresql # systemctl enable postgresql # systemctl restart matrix-synapse # systemctl enable matrix-synapse<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># register_new_matrix_user -c \/etc\/matrix-synapse\/homeserver.yaml http:\/\/localhost:8008<\/code><\/pre>\n<p>\u0411\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435: \u043b\u043e\u0433\u0438\u043d, \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u043f\u0440\u0430\u0432\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Matrix \u0441 SQLite, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Postgresql. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e homeserver.yaml, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0435 \u043a\u043e\u043f\u0438\u0438 homeserver.db (\u043e\u0434\u043d\u0443 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0434\u043b\u044f &#171;\u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432&#187;, \u043d\u0443 \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u0442\u0443\u0434\u0430, \u0430 \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c). \u041f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433, \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u044b.<\/p>\n<pre><code class=\"bash\"># cp \/etc\/matrix-synapse\/homeserver.yaml \/etc\/matrix-synapse\/homeserver-postgresql.yaml # chown matrix-synapse:nogroup \/etc\/matrix-synapse\/homeserver-postgresql.yaml<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u0444\u0430\u0439\u043b\u043e\u043c homeserver-postgresql.yaml \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <a href=\"#db\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e<\/a>.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Matrix:<\/p>\n<pre><code class=\"bash\"># systemctl stop matrix-synapse<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0431\u0430\u0437\u044b \u0438 \u043c\u0438\u0433\u0440\u0438\u0440\u0443\u0435\u043c.<\/p>\n<pre><code class=\"bash\"># cp \/var\/lib\/matrix-synapse\/homeserver.db \/etc\/matrix-synapse\/homeserver.db.snapshot # chown matrix-synapse:nogroup \/etc\/matrix-synapse\/homeserver.db.snapshot # cp \/var\/lib\/matrix-synapse\/homeserver.db \/tmp\/ # cd \/etc\/matrix-synapse\/ # synapse_port_db --curses --sqlite-database homeserver.db.snapshot --postgres-config \/etc\/matrix-synapse\/homeserver-postgresql.yaml # mv homeserver.yaml homeserver-old-sqlite.yaml # mv homeserver-postgresql.yaml homeserver.yaml # systemctl restart postgresql # systemctl start matrix-synapse<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/matrix-org\/synapse\/blob\/develop\/docs\/postgres.md\" rel=\"noopener noreferrer nofollow\">\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c Matrix \u043e \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u043e \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0442\u0443\u0442 \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0430 \u0434\u0430\u043c <a href=\"https:\/\/matrix.org\/blog\/2020\/04\/06\/running-your-own-secure-communication-service-with-matrix-and-jitsi#jitsi\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a>, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 https:\/\/matrix.dnsname.com \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lj\/ur\/bg\/ljurbgivmmqjjn5dbi_i9kzkthu.jpeg\" width=\"1280\" height=\"632\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0438\u0440 &#171;\u0447\u0435\u0440\u0442, \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442&#8230;.&#187;.<\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 riot.dnsname.com \u0438 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/var\/www\/riot.dnsname.com\/riot;, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0435\u0449\u0435 \u043d\u0435\u0442. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0442\u0443\u0434\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Riot (Element) \u0438\u0437 <a href=\"https:\/\/github.com\/vector-im\/element-web\/releases\" rel=\"noopener noreferrer nofollow\">git<\/a>:<\/p>\n<pre><code class=\"bash\"># mkdir \/var\/www\/riot.dnsname.com # cd \/var\/www\/riot.dnsname.com # wget https:\/\/github.com\/vector-im\/element-web\/releases\/download\/v1.7.23\/element-v1.7.23.tar.gz # apt install -y gnupg # wget https:\/\/github.com\/vector-im\/element-web\/releases\/download\/v1.7.23\/element-v1.7.23.tar.gz.asc # gpg --keyserver keyserver.ubuntu.com --search-keys releases@riot.im # wget https:\/\/packages.riot.im\/riot-release-key.asc # gpg --import riot-release-key.asc # gpg --verify element-v1.7.23.tar.gz.asc # gpg --edit-key 74692659bda3d940 # tar -xzvf element-v1.7.23.tar.gz # ln -s element-v1.7.23 riot # chown www-data:www-data -R riot # cd riot # cp config.sample.json config.json<\/code><\/pre>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 config.json \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443 (\u043c\u0435\u043d\u044f\u0435\u043c &#171;base_url&#187;: &#171;<a href=\"https:\/\/matrix.profsupport.eu&quot;\" rel=\"noopener noreferrer nofollow\">https:\/\/matrix.dnsname.com&#187;<\/a>,             &#171;server_name&#187;: &#171;<a href=\"https:\/\/matrix.profsupport.eu&quot;\" rel=\"noopener noreferrer nofollow\">dnsname.com<\/a>&#171;, &#171;jitsi&#187;: {         &#171;preferredDomain&#187;: &#171;jitsi.dnsname.com&#187; &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0432\u044f\u0436\u0435\u0442 \u043d\u0430\u0448 matrix \u0438 jitsi):<\/p>\n<pre><code class=\"bash\"># vim \/var\/www\/riot.dnsname.com\/riot\/config.json \t\t{     \"default_server_config\": {         \"m.homeserver\": {             \"base_url\": \"https:\/\/matrix.dnsname.com\",             \"server_name\": \"dnsname.com\"         },         \"m.identity_server\": {             \"base_url\": \"https:\/\/vector.im\"         }     },     \"disable_custom_urls\": false,     \"disable_guests\": false,     \"disable_login_language_selector\": false,     \"disable_3pid_login\": false,     \"brand\": \"Element\",     \"integrations_ui_url\": \"https:\/\/scalar.vector.im\/\",     \"integrations_rest_url\": \"https:\/\/scalar.vector.im\/api\",     \"integrations_widgets_urls\": [         \"https:\/\/scalar.vector.im\/_matrix\/integrations\/v1\",         \"https:\/\/scalar.vector.im\/api\",         \"https:\/\/scalar-staging.vector.im\/_matrix\/integrations\/v1\",         \"https:\/\/scalar-staging.vector.im\/api\",         \"https:\/\/scalar-staging.riot.im\/scalar\/api\"     ],     \"bug_report_endpoint_url\": \"https:\/\/element.io\/bugreports\/submit\",     \"defaultCountryCode\": \"GB\",     \"showLabsSettings\": false,     \"features\": {         \"feature_new_spinner\": false     },     \"default_federate\": true,     \"default_theme\": \"light\",     \"roomDirectory\": {         \"servers\": [             \"matrix.org\"         ]     },     \"piwik\": {         \"url\": \"https:\/\/piwik.riot.im\/\",         \"whitelistedHSUrls\": [\"https:\/\/matrix.org\"],         \"whitelistedISUrls\": [\"https:\/\/vector.im\", \"https:\/\/matrix.org\"],         \"siteId\": 1     },     \"enable_presence_by_hs_url\": {         \"https:\/\/matrix.org\": false,         \"https:\/\/matrix-client.matrix.org\": false     },     \"settingDefaults\": {         \"breadcrumbs\": true     },     \"jitsi\": {         \"preferredDomain\": \"jitsi.dnsname.com\"     } } <\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b (\u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0446\u0435\u043b\u0438\u043a\u043e\u043c):<\/p>\n<pre><code class=\"bash\"># systemctl restart nginx # systemctl restart matrix-synapse<\/code><\/pre>\n<h3>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0447\u0430\u0442\u044b<\/h3>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u0430 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c &#171;\u0434\u0440\u0443\u0433\u0430 \u043f\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0435&#187;. \u041f\u043e\u0435\u0445\u0430\u043b\u0438:<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0430 https:\/\/riot.dnsname.com<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5a3\/c20\/fd6\/5a3c20fd62697566bf1d0aeb1b76a105.jpg\" alt=\" \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442. \" title=\" \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442. \" width=\"1257\" height=\"598\"><figcaption> \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442. <\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0b2\/7b7\/601\/0b27b760181eca4816ab528bddec47cb.jpg\" alt=\" \u041c\u0435\u043d\u044f\u0435\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u043c \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c riot. \" title=\" \u041c\u0435\u043d\u044f\u0435\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u043c \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c riot. \" width=\"1263\" height=\"608\"><figcaption> \u041c\u0435\u043d\u044f\u0435\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u043c \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c riot. <\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0bd\/f11\/b96\/0bdf11b963d38983c50079dd02bb5787.jpg\" alt=\"\" title=\"\" width=\"1273\" height=\"628\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c6\/70d\/3a2\/9c670d3a29689b17844e900a2966ed06.jpg\" alt=\" \u0418\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0434\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \" title=\" \u0418\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0434\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \" width=\"791\" height=\"593\"><figcaption> \u0418\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0434\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. <\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e03\/a05\/dea\/e03a05dea5773aaa5d41d43335b8350d.jpg\" width=\"794\" height=\"598\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2dd\/074\/88b\/2dd07488baad8947b3ee63bac38383fe.jpg\" width=\"789\" height=\"606\"><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Riot<\/h3>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 <a href=\"https:\/\/github.com\/vector-im\/element-web\/releases\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 Riot. \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0418\u0434\u0435\u043c \u043d\u0430 \u0413\u0438\u0442 (\u0441\u0441\u044b\u043b\u043a\u0430 \u0432\u044b\u0448\u0435) \u0438 \u0431\u0435\u0440\u0435\u043c \u0442\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0435\u043b\u0438\u0437\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b element-vx.x.xx.tar.gz \u0438 element-vx.x.xx.tar.gz.asc. \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># cd \/var\/www\/riot.dnsname.com\/ # wget https:\/\/github.com\/vector-im\/element-web\/releases\/download\/vx.x.xx\/element-vx.x.xx.tar.gz # wget https:\/\/github.com\/vector-im\/element-web\/releases\/download\/vx.x.xx\/element-vx.x.xx.tar.gz.asc # gpg --keyserver keyserver.ubuntu.com --search-keys releases@riot.im # wget https:\/\/packages.riot.im\/riot-release-key.asc # gpg --import riot-release-key.asc # gpg --verify element-vx.x.xx.tar.gz.asc # tar -xzvf element-vx.x.xx.tar.gz # rm riot # ln -s element-vx.x.xx riot # chown www-data:www-data -R riot # cd riot # cp config.sample.json config.json<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 <a href=\"#1\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/vector-im\/element-web\/releases\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a> \u0441 \u0440\u0435\u043b\u0438\u0437\u0430\u043c\u0438 Riot.<\/p>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/element.io\/get-started\" rel=\"noopener noreferrer nofollow\">element<\/a>.<\/p>\n<\/div>\n<\/details>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/540894\/\"> https:\/\/habr.com\/ru\/post\/540894\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412\u0441\u0435\u043c \u041f\u0440\u0438\u0432\u0435\u0442\u044c. \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0430 \u0441\u0442\u0430\u043b\u0430 \u0432\u0442\u043e\u0440\u043e\u0439. \u042d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f Matrix \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0447\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Jitsi-meet. \u0411\u0435\u0437 \u043f\u0430\u043d\u0438\u043a\u0438, \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442. \u0410 \u043f\u043e\u043a\u0430 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f Matrix.<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u043d\u0443\u0430\u043b \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0438\u043c. \u042d\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 <a href=\"https:\/\/matrix.org\/blog\/2020\/04\/06\/running-your-own-secure-communication-service-with-matrix-and-jitsi#jitsi\" rel=\"noopener noreferrer nofollow\">\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e<\/a> \u043c\u0430\u043d\u0443\u0430\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441 \u043c\u043e\u0438\u043c\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439. \u0418 \u0432\u043e\u0448\u0435\u043b \u043e\u043d \u0432 \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0435\u0440\u0438\u044e \u0441\u0442\u0430\u0442\u0435\u0439, \u0438\u0431\u043e \u0441\u0432\u044f\u0437\u0430\u043d \u0441 jitsi-meet (\u043d\u0443 \u0438\u043b\u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435).<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043c\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 &#171;\u0442\u0430\u043d\u0446\u044b&#187; \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430 \u0442\u0435\u043c\u0443 &#171;\u0430 \u0437\u0430\u0447\u0435\u043c \u0438 \u043a\u043e\u043c\u0443 \u044d\u0442\u043e \u043d\u0430\u0434\u043e&#187;&#8230;.<\/p>\n<h2>\u0410 \u0437\u0430\u0447\u0435\u043c \u0438 \u043a\u043e\u043c\u0443 \u044d\u0442\u043e \u043d\u0430\u0434\u043e&#8230;<\/h2>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e: \u043e\u0442 \u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043d\u043e\u0439\u0438 \u0434\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. Matrix-synapse &#8212; \u044d\u0442\u043e \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u043f\u0440\u043e\u0439\u0442\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0438 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c matrix, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u043c \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0435 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e, \u0430 \u0443 \u0432\u0430\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0415\u0441\u043b\u0438 \u0443\u0436 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0430\u043d\u043e\u0439\u0438\u0442\u044c, \u0442\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0445\u0443\u0442\u044c \u0432 VPN \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u0442\u0435\u0445, \u0443 \u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a VPN (\u0442\u0443\u0442 \u043c\u044b \u0442\u0430\u043a\u043e\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e matrix \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 jitsi). <\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/post\/512236\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0434\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: jitsi-meet &#8212; \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0439 \u0438 jibri &#8212; \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\/\u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0439. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043d\u0430\u0448\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041c\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u043e\u043c \u0438 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u0435\u0433\u043e \u043a \u043d\u0430\u0448\u0435\u043c\u0443 jitsi, \u0434\u0430\u0431\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u0432\u044b\u0437\u043e\u0432\u044b \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b&nbsp;<a href=\"https:\/\/vdsina.ru\/?partner=q12vzdd5w7\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438 &#171;\u0442\u0430\u043d\u0446\u044b&#187;.<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042f \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u044e \u043d\u0430 debian 9, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0442 \u0432\u0430\u0448\u0438\u043c \u0440\u0435\u043b\u0438\u0433\u0438\u043e\u0437\u043d\u044b\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u0430\u043c, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434 \u0441\u0432\u043e\u044e \u041e\u0421. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c Matrix \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0433\u0434\u0435 \u0443 \u0432\u0430\u0441 \u043f\u043e\u0434\u043d\u044f\u0442 Jitsi-meet \u0438\u043b\u0438 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c: \u044d\u0442\u043e\u0442 \u043c\u0430\u043d\u0443\u0430\u043b \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u043c\u044b \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c DNS \u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0438\u0445 \u0442\u0440\u0438: dnsname.com, matrix.dnsname.com \u0438 riot.dnsname.com &#8212; \u043d\u0430 IP \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<h3>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 SSL<\/h3>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b nginx \u0434\u043b\u044f jitsi \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0442\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442 \u0441\u0432\u043e\u0435\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0438 \u0431\u0443\u0434\u0443 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438 \u0434\u043b\u044f matrix.<\/p>\n<p>\u0415\u0441\u043b\u0438 nginx \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0442\u043e:<\/p>\n<pre><code class=\"bash\"># apt update # apt install nginx -y<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 nginx \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e (\u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c default \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c):<\/p>\n<pre><code class=\"bash\"># cd \/etc\/nginx\/sites-avaliable<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"bash\"># vim dnsname.com<\/code><\/pre>\n<p>\u0418 \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b:<\/p>\n<pre><code class=\"bash\">server_name dnsname.com; ... root \/var\/www\/dnsname.com;<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c. <\/p>\n<p>\u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043b\u044f riot.dnsname.com:<\/p>\n<pre><code class=\"bash\"># vim riot.dnsname.com \tserver_name riot.dnsname.com;   ...   root \/var\/www\/riot.dnsname.com\/riot;<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e matrix.dnsname.com \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code class=\"bash\"># vim matrix.dnsname.com \tserver {     # \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a        server_name matrix.dnsname.eu;         root \/var\/www\/dnsname.eu;        index index.html;         location \/ {                proxy_pass http:\/\/localhost:8008;        } ....<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u0430 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f SSL \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0442\u0440\u0435\u0445\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b Let&#8217;s Encrypt. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\"># apt install -y python3-certbot-nginx # certbot --nginx -d dnsname.com -d riot.dnsname.com -d matrix.dnsname.com<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0439 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u043f\u0443\u0441\u0442\u044f \u0442\u0440\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c nginx:<\/p>\n<pre><code class=\"bash\"># ln -s dnsname.com \/etc\/nginx\/sites-enable\/ # ln -s matrix.dnsname.com \/etc\/nginx\/sites-enable\/ # ln -s riot.dnsname.com \/etc\/nginx\/sites-enable\/ # systemctl restart nginx<\/code><\/pre>\n<h3>Matrix-synapse \u0438 Postgresql<\/h3>\n<p>\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 Matrix \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 SQLite &#8212; \u043f\u0440\u0438 \u043c\u0430\u043b\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Postgresql (\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Postgresql). \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0447\u0435\u0442 &#171;\u043f\u043e\u0449\u0443\u043f\u0430\u0442\u044c&#187; Matrix, \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043d\u0443 \u0430 \u043c\u044b, \u0432\u0441\u0435 \u0436\u0435, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c Postgresql, \u0438\u0431\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f c SQLite \u043d\u0430 Postgresql &#8212; \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0442\u0435\u043c\u0438 \u0435\u0449\u0435 &#171;\u0442\u0430\u043d\u0446\u0430\u043c\u0438&#187;. \u041f\u043e\u0435\u0445\u0430\u043b\u0438&#8230;<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 matrix.<\/p>\n<pre><code class=\"bash\"># apt install -y lsb-release wget apt-transport-https # wget -O \/usr\/share\/keyrings\/matrix-org-archive-keyring.gpg https:\/\/packages.matrix.org\/debian\/matrix-org-archive-keyring.gpg # echo \"deb [signed-by=\/usr\/share\/keyrings\/matrix-org-archive-keyring.gpg] https:\/\/packages.matrix.org\/debian\/ $(lsb_release -cs) main\" |     tee \/etc\/apt\/sources.list.d\/matrix-org.list # apt update # apt install matrix-synapse-py3 -y<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043e DNS \u0438\u043c\u044f &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c dnsname.com.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Postgresql, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0411\u0414 \u0434\u043b\u044f matrix-synapse:<\/p>\n<pre><code class=\"bash\"># apt install postgresql postgresql-contrib -y # su - postgres # psql postgres=# \\password postgres postgres=# \\q # createuser --pwprompt synapse_user # psql postgres=#CREATE DATABASE synapse postgres-# ENCODING 'UTF8' postgres-# LC_COLLATE='C' postgres-# LC_CTYPE='C' postgres-# template=template0 postgres-# OWNER synapse_user; postgres=# \\q # exit<\/code><\/pre>\n<pre><code class=\"bash\"># cp \/etc\/matrix-synapse\/homeserver.yaml \/etc\/matrix-synapse\/homeserver.yaml.back # cat \/dev\/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b Matrix:<\/p>\n<pre><code class=\"bash\"># vim \/etc\/matrix-synapse\/homeserver.yaml<\/code><\/pre>\n<p><a class=\"anchor\" name=\"db\" id=\"db\"><\/a><\/p>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 #server<em>name: &#171;server<\/em>name&#187; \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 &#171;dnsname.com&#187;, \u0443\u0431\u0438\u0440\u0430\u0435\u043c &#171;#&#187;, \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0439 #registration_shared_secret: &#171;UIBfgsjkdfhj3568JHGIUIEBfy3764JH&#187; \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0449\u0435\u043c \u043e\u043f\u0446\u0438\u044e&nbsp;<code>#enable_registration: false, \u0443\u0431\u0438\u0440\u0430\u0435\u043c \"#\" \u0438 \u043c\u0435\u043d\u044f\u0435\u043c false \u043d\u0430 true<\/code><\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0431\u043b\u043e\u043a database \u0441\u043d\u0438\u043c\u0430\u0435\u043c &#171;#&#187;  \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">database:   name: psycopg2   args:     user: synapse-user     password: password     database: synapse     host: localhost     cp_min: 5     cp_max: 10<\/code><\/pre>\n<p>\u0410 \u0431\u043b\u043e\u043a database, \u0433\u0434\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 SQLite (\u043e\u043d\u0430 \u043d\u0438\u0436\u0435) &#8212; \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c (\u0441\u0442\u0430\u0432\u0438\u043c &#171;#&#187;).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u043c \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <code>host    synapse     synapse_user    ::1\/128     md5&nbsp; &nbsp;&nbsp;<\/code>\u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f:<\/p>\n<pre><code class=\"bash\"># vim \/etc\/postgresql\/9.6\/main\/pg_hba.conf ...    # \"local\" is for Unix domain socket connections only    local   all             all                                     peer    # IPv4 local connections:    host    all             all             127.0.0.1\/32            md5    host    synapse         synapse_user    ::1\/128                 md5    # IPv6 local connections:    host    all             all             ::1\/128                 md5 ...<\/code><\/pre>\n<p><code>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Matrix \u0438 Postgresql:<\/code><\/p>\n<pre><code class=\"bash\"># systemctl restart postgresql # systemctl enable postgresql # systemctl restart matrix-synapse # systemctl enable matrix-synapse<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># register_new_matrix_user -c \/etc\/matrix-synapse\/homeserver.yaml http:\/\/localhost:8008<\/code><\/pre>\n<p>\u0411\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435: \u043b\u043e\u0433\u0438\u043d, \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u043f\u0440\u0430\u0432\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Matrix \u0441 SQLite, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Postgresql. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e homeserver.yaml, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0435 \u043a\u043e\u043f\u0438\u0438 homeserver.db (\u043e\u0434\u043d\u0443 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0434\u043b\u044f &#171;\u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432&#187;, \u043d\u0443 \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u0442\u0443\u0434\u0430, \u0430 \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c). \u041f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433, \u043c\u0438\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u044b.<\/p>\n<pre><code class=\"bash\"># cp \/etc\/matrix-synapse\/homeserver.yaml \/etc\/matrix-synapse\/homeserver-postgresql.yaml # chown matrix-synapse:nogroup \/etc\/matrix-synapse\/homeserver-postgresql.yaml<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u0444\u0430\u0439\u043b\u043e\u043c homeserver-postgresql.yaml \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <a href=\"#db\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e<\/a>.<\/p>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Matrix:<\/p>\n<pre><code class=\"bash\"># systemctl stop matrix-synapse<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0431\u0430\u0437\u044b \u0438 \u043c\u0438\u0433\u0440\u0438\u0440\u0443\u0435\u043c.<\/p>\n<pre><code class=\"bash\"># cp \/var\/lib\/matrix-synapse\/homeserver.db \/etc\/matrix-synapse\/homeserver.db.snapshot # chown matrix-synapse:nogroup \/etc\/matrix-synapse\/homeserver.db.snapshot # cp \/var\/lib\/matrix-synapse\/homeserver.db \/tmp\/ # cd \/etc\/matrix-synapse\/ # synapse_port_db --curses --sqlite-database homeserver.db.snapshot --postgres-config \/etc\/matrix-synapse\/homeserver-postgresql.yaml # mv homeserver.yaml homeserver-old-sqlite.yaml # mv homeserver-postgresql.yaml homeserver.yaml # systemctl restart postgresql # systemctl start matrix-synapse<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/matrix-org\/synapse\/blob\/develop\/docs\/postgres.md\" rel=\"noopener noreferrer nofollow\">\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c Matrix \u043e \u0441\u0432\u043e\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u043e \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0442\u0443\u0442 \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0430 \u0434\u0430\u043c <a href=\"https:\/\/matrix.org\/blog\/2020\/04\/06\/running-your-own-secure-communication-service-with-matrix-and-jitsi#jitsi\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a>, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 https:\/\/matrix.dnsname.com \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0438\u0440 &#171;\u0447\u0435\u0440\u0442, \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442&#8230;.&#187;.<\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 riot.dnsname.com \u0438 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/var\/www\/riot.dnsname.com\/riot;, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0435\u0449\u0435 \u043d\u0435\u0442. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0442\u0443\u0434\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Riot (Element) \u0438\u0437 <a href=\"https:\/\/github.com\/vector-im\/element-web\/releases\" rel=\"noopener noreferrer nofollow\">git<\/a>:<\/p>\n<pre><code class=\"bash\"># mkdir \/var\/www\/riot.dnsname.com # cd \/var\/www\/riot.dnsname.com # wget https:\/\/github.com\/vector-im\/element-web\/releases\/download\/v1.7.23\/element-v1.7.23.tar.gz # apt install -y gnupg # wget https:\/\/github.com\/vector-im\/element-web\/releases\/download\/v1.7.23\/element-v1.7.23.tar.gz.asc # gpg --keyserver keyserver.ubuntu.com --search-keys releases@riot.im # wget https:\/\/packages.riot.im\/riot-release-key.asc # gpg --import riot-release-key.asc # gpg --verify element-v1.7.23.tar.gz.asc # gpg --edit-key 74692659bda3d940 # tar -xzvf element-v1.7.23.tar.gz # ln -s element-v1.7.23 riot # chown www-data:www-data -R riot # cd riot # cp config.sample.json config.json<\/code><\/pre>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 config.json \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443 (\u043c\u0435\u043d\u044f\u0435\u043c &#171;base_url&#187;: &#171;<a href=\"https:\/\/matrix.profsupport.eu&quot;\" rel=\"noopener noreferrer nofollow\">https:\/\/matrix.dnsname.com&#187;<\/a>,             &#171;server_name&#187;: &#171;<a href=\"https:\/\/matrix.profsupport.eu&quot;\" rel=\"noopener noreferrer nofollow\">dnsname.com<\/a>&#171;, &#171;jitsi&#187;: {         &#171;preferredDomain&#187;: &#171;jitsi.dnsname.com&#187; &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0432\u044f\u0436\u0435\u0442 \u043d\u0430\u0448 matrix \u0438 jitsi):<\/p>\n<pre><code class=\"bash\"># vim \/var\/www\/riot.dnsname.com\/riot\/config.json \t\t{     \"default_server_config\": {         \"m.homeserver\": {             \"base_url\": \"https:\/\/matrix.dnsname.com\",             \"server_name\": \"dnsname.com\"         },         \"m.identity_server\": {             \"base_url\": \"https:\/\/vector.im\"         }     },     \"disable_custom_urls\": false,     \"disable_guests\": false,     \"disable_login_language_selector\": false,     \"disable_3pid_login\": false,     \"brand\": \"Element\",     \"integrations_ui_url\": \"https:\/\/scalar.vector.im\/\",     \"integrations_rest_url\":<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320754","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320754"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320754\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}