{"id":477428,"date":"2026-04-26T07:15:52","date_gmt":"2026-04-26T07:15:52","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=477428"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=477428","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Matrix \u0441\u0435\u0440\u0432\u0435\u0440"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h4>\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e Matrix-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 Google-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0430\u043c\u0438, Telegram \u0438 WhatsApp \u043c\u043e\u0441\u0442\u0430\u043c\u0438.<\/h4>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6bf\/3d7\/f4b\/6bf3d7f4bcce09073116aaf714f5193c.png\" width=\"1024\" height=\"1024\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6bf\/3d7\/f4b\/6bf3d7f4bcce09073116aaf714f5193c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6bf\/3d7\/f4b\/6bf3d7f4bcce09073116aaf714f5193c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<blockquote>\n<p>     \ud83d\udca1 Matrix \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440, \u0430\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u042d\u0442\u043e \u0432\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u00ab\u0414\u043e\u043c\u00bb, \u0433\u0434\u0435 \u0432\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u043d\u0435 Google \u0438\u043b\u0438 Meta. \u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u044f \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0432\u043e\u0439 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0447\u0430\u0442-\u0441\u0435\u0440\u0432\u0435\u0440: \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 Google, \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0430\u043c\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0434\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u043c\u043e\u0441\u0442\u0430\u043c\u0438 \u0432 Telegram \u0438 WhatsApp, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438 \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c<\/p>\n<\/blockquote>\n<p>\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c, \u043d\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0432\u0448\u0438\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Matrix \u0441 Google-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0430\u043c\u0438 \u043c\u043e\u0441\u0442\u043e\u043c Telegram \u0438 WhatsApp \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043e\u043d\u0438 \u043b\u0438\u0431\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442, \u043b\u0438\u0431\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u043d\u044e\u0430\u043d\u0441\u044b Google-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435 \u0432\u0441\u0435 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u0438\u0435 \u0441\u0430\u0439\u0442\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b), \u0447\u0430\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0434\u0430\u0436\u0435 \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435 \u0432\u0435\u0440\u043d\u043e. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0438\u0448\u0438\u0442\u0435, \u0447\u0435\u043c \u0441\u043c\u043e\u0433\u0443 \u043f\u043e\u043c\u043e\u0433\u0443.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043e\u0442\u0432\u0435\u0447\u0443 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e. \u041d\u0435 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430 telegram \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0410 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043c\u043e\u0441\u0442\u043e\u043c \u0432 telegram \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0434\u0430\u0436\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0435\u043b\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0433\u043e\u0440\u043e\u0434\u0430).<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u043c\u044b \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 <strong>\u043f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Matrix-\u0441\u0435\u0440\u0432\u0435\u0440<\/strong> \u0434\u043b\u044f \u0441\u0435\u043c\u044c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\ud83d\udd10 <strong>\u0412\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 Google<\/strong> (\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432\/\u043f\u0430\u0440\u043e\u043b\u0435\u0439);<\/p>\n<\/li>\n<li>\n<p>\ud83c\udfa5 <strong>\u0412\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438<\/strong> \u043d\u0430 \u0431\u0430\u0437\u0435 LiveKit (\u044f \u0438\u0445 \u0435\u0449\u0451 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442);<\/p>\n<\/li>\n<li>\n<p>\ud83d\udd04 <strong>\u0414\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u043c\u043e\u0441\u0442\u044b<\/strong> \u0432 Telegram \u0438 WhatsApp (\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0439\u0442\u0435 \u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e \u0438\u0437 Matrix);<\/p>\n<\/li>\n<li>\n<p>\ud83d\udda5 <strong>\u041a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0432\u0435\u0431-\u043a\u043b\u0438\u0435\u043d\u0442<\/strong> Element Web \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0434\u043e\u043c\u0435\u043d\u0435;<\/p>\n<\/li>\n<li>\n<p>\u2699\ufe0f <strong>\u0423\u0434\u043e\u0431\u043d\u0443\u044e \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c<\/strong> Ketesa \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u043a\u043e\u043c\u043d\u0430\u0442\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u0438\u0441\u0430\u043b\u0430\u0441\u044c \u0434\u043b\u044f <strong>Debian 13<\/strong>, \u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 Linux \u0441 Docker.<\/p>\n<hr\/>\n<h3>\ud83d\udccb \u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<ol>\n<li>\n<p><a href=\"#requirements\" rel=\"noopener noreferrer nofollow\">\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#env\" rel=\"noopener noreferrer nofollow\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#synapse\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Synapse + PostgreSQL + Element Web<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#mas\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Matrix Authentication Service (MAS) \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 Google<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#livekit\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438 \u0441 LiveKit<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#bridges\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u043e\u0441\u0442\u044b \u0432 Telegram \u0438 WhatsApp<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#ketesa\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u0438 Ketesa<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#nginx\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nginx \u0438 SSL<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#startup\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043f\u0443\u0441\u043a, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#troubleshooting\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"requirements\" id=\"requirements\"><\/a><\/p>\n<h3>1. \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p><strong>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"142\" width=\"142\">\n<p align=\"left\">\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\"><strong>\u041e\u0421<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">Debian 13<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\"><strong>CPU<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">2\u20134 \u044f\u0434\u0440\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\"><strong>RAM<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">4\u20138 \u0413\u0411 (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f 6+)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\"><strong>\u0414\u0438\u0441\u043a<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">30\u201340 \u0413\u0411 (\u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043b\u0443\u0447\u0448\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 100 \u0413\u0411)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\"><strong>\u0414\u043e\u043c\u0435\u043d 1<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"http:\/\/matrix.%D0%B2%D0%B0%D1%88-%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD.ru\" rel=\"noopener noreferrer nofollow\"><code>matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru<\/code><\/a> \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u043e\u043c\u0435\u043d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"142\" width=\"142\">\n<p align=\"left\"><strong>\u0414\u043e\u043c\u0435\u043d 2<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><a href=\"http:\/\/livekit.%D0%B2%D0%B0%D1%88-%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD.ru\" rel=\"noopener noreferrer nofollow\"><code>livekit.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru<\/code><\/a> \u2014 \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>1.1 \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h4>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">sudo apt update &amp;&amp; sudo apt upgrade -ysudo apt install -y curl wget git ufw pwgen<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>1.2 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker \u0438 Docker Compose<\/h4>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Docker \u043f\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0443 (\u044d\u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e):<\/p>\n<pre><code class=\"bash\">curl -fsSL https:\/\/get.docker.com -o get-docker.shsudo sh get-docker.shsudo usermod -aG docker $USERnewgrp docker<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d Docker Compose V2:<\/p>\n<pre><code class=\"bash\">sudo apt install -y docker-compose-plugin<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>1.3 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430 (UFW)<\/h4>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u0440\u0442\u044b (\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0437\u0436\u0435):<\/p>\n<pre><code class=\"bash\">sudo ufw allow 22\/tcpsudo ufw allow 80\/tcpsudo ufw allow 443\/tcpsudo ufw allow 3478\/tcpsudo ufw allow 3478\/udpsudo ufw allow 5349\/tcpsudo ufw allow 5349\/udpsudo ufw allow 7880\/tcpsudo ufw allow 7881\/tcpsudo ufw allow 50000:50200\/udpsudo ufw enable<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>1.4 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0430\u043f\u043e\u043a<\/h4>\n<p>\u0412\u0441\u0435 \u043d\u0430\u0448\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 <code>\/opt\/matrix-synapse<\/code>:<\/p>\n<pre><code>sudo mkdir -p \/opt\/matrix-synapse\/{data,element-web,mautrix-telegram,mautrix-whatsapp,livekit,mas-config}sudo chown -R $USER:$USER \/opt\/matrix-synapsecd \/opt\/matrix-synapse<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"env\" id=\"env\"><\/a><\/p>\n<h3>2. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u00ab\u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>.env<\/code>. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>pwgen -s 32 1<\/code>.<\/p>\n<pre><code class=\"bash\">nano .env<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"bash\"># \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b SynapseSYNAPSE_POSTGRES_PASSWORD=YOUR_POSTGRES_PASSWORD_HERE1SYNAPSE_REGISTRATION_SHARED_SECRET=YOUR_REGISTRATION_SHARED_SECRET_HERE2SYNAPSE_MACAROON_SECRET_KEY=YOUR_MACAROON_SECRET_HERE3SYNAPSE_FORM_SECRET=YOUR_FORM_SECRET_HERE4SYNAPSE_TURN_SHARED_SECRET=YOUR_TURN_SHARED_SECRET_HERE5# MASMAS_POSTGRES_PASSWORD=YOUR_MAS_POSTGRES_PASSWORD_HERE6MAS_SHARED_SECRET=YOUR_MAS_SHARED_SECRET_HERE7# LiveKitLIVEKIT_API_KEY=YOUR_LIVEKIT_API_KEY_HERE8LIVEKIT_API_SECRET=YOUR_LIVEKIT_API_SECRET_HERE9# Telegram BridgeTELEGRAM_POSTGRES_PASSWORD=YOUR_TELEGRAM_POSTGRES_PASSWORD_HERE10# WhatsApp BridgeWHATSAPP_POSTGRES_PASSWORD=YOUR_WHATSAPP_POSTGRES_PASSWORD_HERE11<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"synapse\" id=\"synapse\"><\/a><\/p>\n<h3>3. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Synapse + PostgreSQL + Element Web<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 <code>docker-compose.yml<\/code>:<\/p>\n<pre><code class=\"bash\">nano docker-compose.yml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<details class=\"spoiler\">\n<summary>\ud83d\udcc4 \u041f\u043e\u043b\u043d\u044b\u0439 docker-compose.yml (\u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">services:  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 SYNAPSE ====================  postgres:    image: postgres:15-alpine    container_name: matrix_postgres    restart: unless-stopped    volumes:      - .\/data\/postgres:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: synapse      POSTGRES_USER: synapse      POSTGRES_PASSWORD: ${SYNAPSE_POSTGRES_PASSWORD}    networks:      - matrix_network    healthcheck:      test: [\"CMD-SHELL\", \"pg_isready -U synapse\"]      interval: 10s      timeout: 5s      retries: 5  # ==================== SYNAPSE ====================  synapse:    image: matrixdotorg\/synapse:v1.151.0rc1    container_name: matrix_synapse    restart: unless-stopped    volumes:      - .\/data:\/data      - .\/logs:\/var\/log\/synapse    ports:      - \"8008:8008\"      - \"9000:9000\"    environment:      SYNAPSE_SERVER_NAME: matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru      SYNAPSE_REPORT_STATS: \"no\"    networks:      - matrix_network    depends_on:      - postgres    healthcheck:      test: [\"CMD\", \"curl\", \"-f\", \"http:\/\/localhost:8008\/health\"]      interval: 30s      timeout: 10s      retries: 3  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 MAS ====================  matrix-auth-db:    image: postgres:15-alpine    container_name: matrix_auth_db    restart: unless-stopped    volumes:      - .\/matrix-auth-db:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: matrix_auth      POSTGRES_USER: matrix_auth      POSTGRES_PASSWORD: ${MAS_POSTGRES_PASSWORD}    networks:      - matrix_network    healthcheck:      test: [\"CMD-SHELL\", \"pg_isready -U matrix_auth\"]      interval: 10s      timeout: 5s      retries: 5  # ==================== MATRIX AUTHENTICATION SERVICE (MAS) ====================  matrix-auth:    image: ghcr.io\/element-hq\/matrix-authentication-service:latest    container_name: matrix_authentication_service    restart: unless-stopped    depends_on:      matrix-auth-db:        condition: service_healthy      synapse:        condition: service_started    volumes:      - .\/mas-config:\/config:ro    environment:      - MAS_CONFIG=\/config\/config.yaml    networks:      - matrix_network    ports:      - \"127.0.0.1:8081:8080\"  # ==================== ELEMENT WEB ====================  element-web:    image: vectorim\/element-web:latest    container_name: element_web    restart: unless-stopped    volumes:      - .\/element-web\/config.json:\/app\/config.json:ro    ports:      - \"127.0.0.1:8765:80\"    networks:      - matrix_network    depends_on:      - synapse  # ==================== KETESA (\u0410\u0414\u041c\u0418\u041d-\u041f\u0410\u041d\u0415\u041b\u042c) ====================  ketesa:    container_name: ketesa    hostname: ketesa    build:      context: https:\/\/github.com\/etkecc\/ketesa.git      dockerfile: docker\/Dockerfile.build    ports:      - \"8181:8080\"    restart: unless-stopped    networks:      - matrix_network  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 TELEGRAM ====================  telegram-db:    image: postgres:15-alpine    container_name: telegram_db    restart: unless-stopped    volumes:      - .\/telegram-db:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: telegram      POSTGRES_USER: telegram      POSTGRES_PASSWORD: ${TELEGRAM_POSTGRES_PASSWORD}    networks:      - matrix_network    healthcheck:      test: [\"CMD-SHELL\", \"pg_isready -U telegram\"]      interval: 10s      timeout: 5s      retries: 5  # ==================== TELEGRAM BRIDGE ====================  telegram-bridge:    image: dock.mau.dev\/mautrix\/telegram:latest    container_name: telegram_bridge    restart: unless-stopped    volumes:      - .\/mautrix-telegram:\/data    environment:      - UID=991      - GID=991    networks:      - matrix_network    ports:      - \"127.0.0.1:29317:29317\"    depends_on:      telegram-db:        condition: service_healthy      synapse:        condition: service_started  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 WHATSAPP ====================  whatsapp-db:    image: postgres:15-alpine    container_name: whatsapp_db    restart: unless-stopped    volumes:      - .\/whatsapp-db:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: whatsapp      POSTGRES_USER: whatsapp      POSTGRES_PASSWORD: ${WHATSAPP_POSTGRES_PASSWORD}    networks:      - matrix_network    healthcheck:      test: [\"CMD-SHELL\", \"pg_isready -U whatsapp\"]      interval: 10s      timeout: 5s      retries: 5  # ==================== WHATSAPP BRIDGE ====================  whatsapp-bridge:    image: dock.mau.dev\/mautrix\/whatsapp:latest    container_name: mautrix-whatsapp    restart: unless-stopped    volumes:      - .\/mautrix-whatsapp:\/data    environment:      - UID=1337      - GID=1337    networks:      - matrix_network    depends_on:      - synapse  # ==================== LIVEKIT JWT SERVICE ====================  livekit-jwt:    image: ghcr.io\/element-hq\/lk-jwt-service:latest    container_name: livekit-jwt    restart: unless-stopped    environment:      - LIVEKIT_URL=wss:\/\/livekit.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru      - LIVEKIT_KEY=${LIVEKIT_API_KEY}      - LIVEKIT_SECRET=${LIVEKIT_API_SECRET}      - LIVEKIT_JWT_BIND=:8080    ports:      - \"127.0.0.1:8088:8080\"    networks:      - matrix_network  # ==================== LIVEKIT SERVER ====================  livekit:    image: livekit\/livekit-server:latest    container_name: livekit    command: --config \/etc\/livekit.yaml    restart: unless-stopped    volumes:      - .\/livekit\/livekit.yaml:\/etc\/livekit.yaml:ro    network_mode: hostnetworks:  matrix_network:    driver: bridge<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<h4>3.1 \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 Synapse (homeserver.yaml)<\/h4>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<pre><code class=\"bash\">docker run -it --rm \\  -v \/opt\/matrix-synapse\/data:\/data \\  -e SYNAPSE_SERVER_NAME=matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru \\  -e SYNAPSE_REPORT_STATS=no \\  matrixdotorg\/synapse:v1.151.0rc1 generate<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c <code>\/opt\/matrix-synapse\/data\/homeserver.yaml<\/code>:<\/p>\n<pre><code class=\"bash\">nano \/opt\/matrix-synapse\/data\/homeserver.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<details class=\"spoiler\">\n<summary>\ud83d\udcc4 \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 homeserver.yaml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c PostgreSQL \u0432\u043c\u0435\u0441\u0442\u043e SQLite)database:  name: psycopg2  args:    user: synapse    password: YOUR_SYNAPSE_POSTGRES_PASSWORD    database: synapse    host: postgres    port: 5432# \u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0442\u0430\u0440\u0443\u044e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e (\u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 MAS)enable_registration: false# \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Matrix Authentication Service (MAS)matrix_authentication_service:  enabled: true  endpoint: http:\/\/matrix-auth:8080  secret: \"YOUR_MAS_SHARED_SECRET\"  allow_appservice_registration: true# \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 TURN\/STUN (\u0434\u043b\u044f \u0437\u0432\u043e\u043d\u043a\u043e\u0432)turn_uris:  - \"turn:matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru:3478?transport=udp\"  - \"turns:matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru:5349?transport=tcp\"turn_shared_secret: \"YOUR_TURN_SHARED_SECRET\"# \u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0438\u0447\u0438 \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u043e\u0432 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e!)experimental_features:  msc3266_enabled: true  msc4222_enabled: true  msc4140_enabled: true  msc4143_enabled: true# \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 LiveKitlivekit_jwt_sso:  enabled: true  livekit_jwt_sso_url: \"https:\/\/matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\/livekit\/jwt\/token\"  livekit_key: \"YOUR_LIVEKIT_API_KEY\"  livekit_secret: \"YOUR_LIVEKIT_API_SECRET\"# \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0441\u0442\u043e\u0432 (appservices)app_service_config_files:  - \"\/data\/telegram-registration.yaml\"  - \"\/data\/whatsapp-registration.yaml\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<h4>3.2 \u041a\u043e\u043d\u0444\u0438\u0433 \u0432\u0435\u0431-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 Element Web<\/h4>\n<pre><code class=\"bash\">nano element-web\/config.json<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"yaml\">{    \"default_server_config\": {        \"m.homeserver\": {            \"base_url\": \"https:\/\/matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\",            \"server_name\": \"matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\"        }    },    \"disable_custom_urls\": false,    \"disable_guests\": true,    \"brand\": \"\u0427\u0430\u0442 \u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\",    \"default_theme\": \"dark\",    \"room_directory\": {        \"servers\": [\"matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\"]    },    \"livekit_service_url\": \"wss:\/\/matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\/rtc\"}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"mas\" id=\"mas\"><\/a><\/p>\n<h3>4. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Matrix Authentication Service (MAS) \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 Google<\/h3>\n<p>MAS \u2014 \u044d\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0442 Element, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0451\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0447\u0435\u0440\u0435\u0437 Google OAuth 2.0).<\/p>\n<h4>4.1 \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f MAS<\/h4>\n<pre><code class=\"bash\">nano mas-config\/config.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"yaml\">http:  public_base: \"https:\/\/matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\"  issuer: \"https:\/\/matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\"  listeners:    - name: web      resources:        - name: discovery        - name: human        - name: oauth        - name: compat        - name: graphql        - name: assets      binds:        - address: '0.0.0.0'          port: 8080    - name: internal      resources:        - name: health      binds:        - host: localhost          port: 8081database:  uri: \"postgresql:\/\/matrix_auth:YOUR_MAS_POSTGRES_PASSWORD@matrix-auth-db\/matrix_auth\"secrets:  encryption: \"YOUR_ENCRYPTION_KEY\"  # openssl rand -hex 32matrix:  kind: synapse  homeserver: matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru  secret: \"YOUR_MAS_SHARED_SECRET\"  endpoint: \"http:\/\/synapse:8008\"upstream_oauth2:  providers:    - id: 01HFS6S2SVAR7Y7QYMZJ53ZAGZ  # \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ULID      human_name: Google      brand_name: \"google\"      issuer: \"https:\/\/accounts.google.com\"      token_endpoint_auth_method: \"client_secret_post\"      client_id: \"YOUR_GOOGLE_CLIENT_ID\"      client_secret: \"YOUR_GOOGLE_CLIENT_SECRET\"      scope: \"openid profile email\"      claims_imports:        localpart:          action: ignore        displayname:          action: suggest          template: \"{{ user.name }}\"        email:          action: suggest          template: \"{{ user.email }}\"registration:  enabled: true<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>4.2 \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 Google OAuth 2.0<\/h4>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/console.cloud.google.com\/\" rel=\"noopener noreferrer nofollow\">Google Cloud Console<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 <strong>People API<\/strong>.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\u00bb \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 <strong>OAuth Client ID<\/strong> \u0442\u0438\u043f\u0430 \u00ab\u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u00bb.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043f\u043e\u043b\u0435 \u00abAuthorized redirect URIs\u00bb \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435:     <a href=\"https:\/\/matrix.%D0%B2%D0%B0%D1%88-%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD.ru\/upstream\/callback\/01HFS6S2SVAR7Y7QYMZJ53ZAGZ\" rel=\"noopener noreferrer nofollow\"><code>https:\/\/matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\/upstream\/callback\/01HFS6S2SVAR7Y7QYMZJ53ZAGZ<\/code><\/a><\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 <code>Client ID<\/code> \u0438 <code>Client Secret<\/code> \u0432 \u043a\u043e\u043d\u0444\u0438\u0433 \u0432\u044b\u0448\u0435.<\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"livekit\" id=\"livekit\"><\/a><\/p>\n<h3>5. \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438 \u0441 LiveKit<\/h3>\n<p>LiveKit \u2014 \u044d\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 Selective Forwarding Unit (SFU), \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438.<\/p>\n<h4>5.1 \u041a\u043e\u043d\u0444\u0438\u0433 LiveKit<\/h4>\n<pre><code class=\"bash\">nano livekit\/livekit.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"yaml\">port: 7880bind_addresses:  - '0.0.0.0'rtc:  tcp_port: 7881  port_range_start: 50000  port_range_end: 50200  use_external_ip: trueroom:  auto_create: trueturn:  enabled: true  domain: livekit.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru  udp_port: 3478  tls_port: 5349  external_tls: truekeys:  \"YOUR_LIVEKIT_API_KEY\": \"YOUR_LIVEKIT_API_SECRET\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>5.2 JWT-\u0441\u0435\u0440\u0432\u0438\u0441 \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 docker-compose.yml<\/h4>\n<p>\u041e\u043d \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043c\u043d\u0430\u0442\u0430\u043c \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u043e\u0432.<\/p>\n<p><a class=\"anchor\" name=\"bridges\" id=\"bridges\"><\/a><\/p>\n<h3>6. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u043e\u0441\u0442\u044b \u0432 Telegram \u0438 WhatsApp<\/h3>\n<p>\u041c\u043e\u0441\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 Matrix \u0432 Telegram \u0438 WhatsApp.<\/p>\n<h4>6.1 Telegram Bridge<\/h4>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 API-\u043a\u043b\u044e\u0447\u0438 \u043d\u0430 <a href=\"https:\/\/my.telegram.org\/apps\" rel=\"noopener noreferrer nofollow\">my.telegram.org\/apps<\/a>. (\u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0439, \u043f\u0438\u0448\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e &#171;\u041e\u0448\u0438\u0431\u043a\u0430&#187;, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u0438 \u0433\u0443\u0433\u043b\u0438\u0442\u0441\u044f, \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u043e \u0432\u0445\u043e\u0434 \u0441 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430)<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0431\u043e\u0442\u0430 \u0432 Telegram \u0447\u0435\u0440\u0435\u0437 <code>@BotFather<\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 <code>bot_token<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<pre><code class=\"bash\">nano mautrix-telegram\/config.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"yaml\">network:    api_id: YOUR_TELEGRAM_API_ID    api_hash: \"YOUR_TELEGRAM_API_HASH\"    device_info:        lang_code: ru        system_lang_code: ruhomeserver:    address: http:\/\/synapse:8008    domain: matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ruappservice:    address: http:\/\/telegram-bridge:29317    hostname: 0.0.0.0    port: 29317    database: postgres:\/\/telegram:YOUR_TELEGRAM_POSTGRES_PASSWORD@telegram-db\/telegram?sslmode=disable    bot:        username: telegram_bot        displayname: Telegram Bridge Botbridge:    permissions:        \"matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\": user        \"@YOUR_USERNAME:matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\": adminencryption:    allow: true    default: true    msc4190: true    self_sign: true<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<pre><code class=\"bash\">docker run --rm -v \/opt\/matrix-synapse\/mautrix-telegram:\/data dock.mau.dev\/mautrix\/telegram:latestcp \/opt\/matrix-synapse\/mautrix-telegram\/registration.yaml \/opt\/matrix-synapse\/data\/telegram-registration.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>6.2 WhatsApp Bridge<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<pre><code class=\"bash\">nano mautrix-whatsapp\/config.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"yaml\">homeserver:    address: http:\/\/synapse:8008    domain: matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ruappservice:    address: http:\/\/whatsapp-bridge:29318    hostname: 0.0.0.0    port: 29318    database: postgres:\/\/whatsapp:YOUR_WHATSAPP_POSTGRES_PASSWORD@whatsapp-db\/whatsapp?sslmode=disable    bot:        username: whatsappbot        displayname: WhatsApp Bridge Botbridge:    permissions:        \"matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\": user        \"@YOUR_USERNAME:matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru\": adminencryption:    allow: true    default: true    msc4190: true    self_sign: true<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438:<\/strong><\/p>\n<pre><code class=\"bash\">docker run --rm -v \/opt\/matrix-synapse\/mautrix-whatsapp:\/data dock.mau.dev\/mautrix\/whatsapp:latestcp \/opt\/matrix-synapse\/mautrix-whatsapp\/registration.yaml \/opt\/matrix-synapse\/data\/whatsapp-registration.yaml<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"ketesa\" id=\"ketesa\"><\/a><\/p>\n<h3>7. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u0438 Ketesa<\/h3>\n<p>Ketesa \u2014 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c \u0434\u043b\u044f Matrix. \u0412 <code>docker-compose.yml<\/code> \u043e\u043d\u0430 \u0443\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 Nginx \u0431\u0443\u0434\u0435\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435.<\/p>\n<p><a class=\"anchor\" name=\"nginx\" id=\"nginx\"><\/a><\/p>\n<h3>8. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nginx \u0438 SSL<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Nginx \u0438 Certbot:<\/p>\n<pre><code class=\"bash\">sudo apt install -y nginx certbot python3-certbot-nginx<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b:<\/p>\n<pre><code class=\"bash\">sudo certbot certonly --nginx -d matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru -d livekit.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043d\u0444\u0438\u0433 Nginx:<\/p>\n<pre><code class=\"bash\">sudo nano \/etc\/nginx\/sites-available\/matrix<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<details class=\"spoiler\">\n<summary>\ud83d\udcc4 \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 Nginx (\u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"nginx\"># \u0420\u0435\u0434\u0438\u0440\u0435\u043a\u0442 HTTP -&gt; HTTPSserver {    listen 80;    listen [::]:80;    server_name matrix.YOUR_DOMAIN.ru;    location ^~ \/.well-known\/acme-challenge\/ {        root \/var\/www\/html;    }    location \/ {        return 301 https:\/\/$host$request_uri;    }}# \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440server {    listen 443 ssl http2;    listen [::]:443 ssl http2;    server_name matrix.YOUR_DOMAIN.ru;    ssl_certificate     \/etc\/letsencrypt\/live\/matrix.YOUR_DOMAIN.ru\/fullchain.pem;    ssl_certificate_key \/etc\/letsencrypt\/live\/matrix.YOUR_DOMAIN.ru\/privkey.pem;    client_max_body_size 50M;    proxy_read_timeout 600s;    # Element Web    location \/ {        proxy_pass http:\/\/127.0.0.1:8765\/;        proxy_set_header Host $host;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Forwarded-Proto $scheme;        add_header X-Frame-Options SAMEORIGIN;    }    # Well-known \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432    location = \/.well-known\/matrix\/client {        default_type application\/json;        add_header Access-Control-Allow-Origin * always;        return 200 '{            \"m.homeserver\": {\"base_url\": \"https:\/\/matrix.YOUR_DOMAIN.ru\"},            \"org.matrix.msc4143.rtc_foci\": [{\"type\": \"livekit\", \"livekit_service_url\": \"https:\/\/matrix.YOUR_DOMAIN.ru\/livekit\/jwt\"}]        }';    }    # \u041f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f MAS (\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f, OAuth2)    location ~ ^\/(oauth2|authorize|login|callback|account|graphql|upstream) {        proxy_pass http:\/\/127.0.0.1:8081;        proxy_set_header Host $host;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Forwarded-Proto $scheme;    }    # \u041f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f LiveKit JWT    location \/livekit\/jwt\/ {        proxy_pass http:\/\/127.0.0.1:8088\/;        proxy_set_header Host $host;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Forwarded-Proto $scheme;    }    # API Synapse    location ~ ^(\/_matrix|\/_synapse\/client|\/_synapse\/admin|\/_synapse\/mas) {        proxy_pass http:\/\/127.0.0.1:8008;        proxy_set_header Host $host;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Forwarded-Proto $scheme;    }}# \u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f LiveKitserver {    listen 443 ssl http2;    listen [::]:443 ssl http2;    server_name livekit.YOUR_DOMAIN.ru;    ssl_certificate     \/etc\/letsencrypt\/live\/livekit.YOUR_DOMAIN.ru\/fullchain.pem;    ssl_certificate_key \/etc\/letsencrypt\/live\/livekit.YOUR_DOMAIN.ru\/privkey.pem;    location \/ {        proxy_pass http:\/\/localhost:7880;        proxy_http_version 1.1;        proxy_set_header Upgrade $http_upgrade;        proxy_set_header Connection \"upgrade\";        proxy_set_header Host $host;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Forwarded-Proto $scheme;    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c Nginx:<\/p>\n<pre><code class=\"bash\">sudo ln -s \/etc\/nginx\/sites-available\/matrix \/etc\/nginx\/sites-enabled\/sudo nginx -t &amp;&amp; sudo systemctl reload nginx<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"startup\" id=\"startup\"><\/a><\/p>\n<h3>9. \u0417\u0430\u043f\u0443\u0441\u043a, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<pre><code class=\"bash\">cd \/opt\/matrix-synapsedocker compose up -d<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f-\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"bash\">docker exec -it matrix_synapse register_new_matrix_user -c \/data\/homeserver.yaml -u admin -p YOUR_PASSWORD --admin<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 <a href=\"https:\/\/matrix.%D0%B2%D0%B0%D1%88-%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD.ru\" rel=\"noopener noreferrer nofollow\"><code>https:\/\/matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru<\/code><\/a>. \u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430 Element Web. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0439\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0427\u0435\u0440\u0435\u0437 Google (\u043a\u043d\u043e\u043f\u043a\u0430 \u00abContinue with Google\u00bb);<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u043c <code>admin<\/code> \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0437\u0430\u0434\u0430\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>9.1. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Telegram Bridge<\/h4>\n<ol>\n<li>\n<p>\u0412 Element \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0431\u043e\u0442\u0430\u00a0<code>@telegram_bot:matrix.YOUR_<\/code><a href=\"http:\/\/DOMAIN.ru\" rel=\"noopener noreferrer nofollow\"><code>DOMAIN.ru<\/code><\/a><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0<code>login phone (\u0432\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 QR \u043a\u043e\u0434 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b)<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0441\u043b\u0430\u043d\u043d\u044b\u0439 \u0432 Telegram<\/p>\n<\/li>\n<\/ol>\n<h4>9.2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 WhatsApp Bridge<\/h4>\n<ol>\n<li>\n<p>\u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u0431\u043e\u0442\u0430\u00a0<code>@whatsappbot:matrix.YOUR_<\/code><a href=\"http:\/\/DOMAIN.ru\" rel=\"noopener noreferrer nofollow\"><code>DOMAIN.ru<\/code><\/a><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00a0<code>login<\/code><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0439\u0442\u0435 QR-\u043a\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 WhatsApp \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435<\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"troubleshooting\" id=\"troubleshooting\"><\/a><\/p>\n<h3>10. \u0427\u0430\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h3>\n<p><strong>\u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0430 <\/strong><code><strong>The as_token was not accepted<\/strong><\/code><strong> (\u043c\u043e\u0441\u0442 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f)<\/strong>     <\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041f\u0435\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 <code>registration.yaml<\/code> \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043e\u0441\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 Synapse (<code>docker compose restart synapse<\/code>). \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 <code>app_service_config_files<\/code> \u0432 <code>homeserver.yaml<\/code>. <\/p>\n<p><strong>\u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0430 <\/strong><code><strong>M_FORBIDDEN: Application service cannot masquerade as this user<\/strong><\/code>     <\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u043e\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>@telegram_bot:...<\/code>) \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d \u0432 Synapse. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 <code>register_new_matrix_user<\/code> \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 SQL. <\/p>\n<p><strong>\u26a0\ufe0f \u041e\u0448\u0438\u0431\u043a\u0430 <\/strong><code><strong>429 Too Many Requests<\/strong><\/code>     <\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435 30\u201360 \u0441\u0435\u043a\u0443\u043d\u0434 \u2014 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043d\u0438\u043c\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e, \u0443\u0432\u0435\u043b\u0438\u0447\u044c\u0442\u0435 \u043b\u0438\u043c\u0438\u0442\u044b \u0432 <code>homeserver.yaml<\/code> (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <code>rc_message<\/code>, <code>rc_joins<\/code>). <\/p>\n<p><strong>\u26a0\ufe0f \u0412\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0438\u043b\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043e\u0432\u0441\u0435\u043c<\/strong>     <\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong>  <br \/>1. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u043e\u0440\u0442 <code>7880<\/code> \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <code>50000-50200\/udp<\/code> \u043e\u0442\u043a\u0440\u044b\u0442\u044b \u0432 UFW.     <br \/>2. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0432 <code>livekit.yaml<\/code> \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d <code>external_ip<\/code> (\u0432\u0430\u0448 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0441\u0435\u0440\u0432\u0435\u0440\u0430).     <br \/>3. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 (Element) \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a <code>wss:\/\/<\/code><a href=\"http:\/\/livekit.%D0%B2%D0%B0%D1%88-%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD.ru\" rel=\"noopener noreferrer nofollow\"><code>livekit.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru<\/code><\/a> (\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430). <\/p>\n<p><strong>\u26a0\ufe0f \u041c\u043e\u0441\u0442 Telegram \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/strong>     <\/p>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/strong> \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043b\u043e\u0433\u0438 \u043c\u043e\u0441\u0442\u0430: <code>docker compose logs telegram-bridge<\/code>. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0435\u0440\u043d\u044b\u0435 <code>api_id<\/code>, <code>api_hash<\/code> \u0438 <code>bot_token<\/code>. \u0411\u043e\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u0432 Telegram \u0438 \u043d\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d. <\/p>\n<hr\/>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e! \u0412\u044b \u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u043f\u0440\u0430\u0432\u043d\u044b\u043c \u0445\u043e\u0437\u044f\u0438\u043d\u043e\u043c \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0412\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438, \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 Google \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0430\u043c\u0438. \u0412\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u044b \u0432 Docker, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/matrix.org\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 Matrix<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/element-hq\/synapse\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Synapse<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/element-hq.github.io\/matrix-authentication-service\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f MAS<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.livekit.io\/\" rel=\"noopener noreferrer nofollow\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f LiveKit<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/mautrix\/telegram\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0441\u0442 \u0434\u043b\u044f Telegram<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/mautrix\/whatsapp\" rel=\"noopener noreferrer nofollow\">\u041c\u043e\u0441\u0442 \u0434\u043b\u044f WhatsApp<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/etkecc\/ketesa\" rel=\"noopener noreferrer nofollow\">\u0410\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c Ketesa<\/a><\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p>\u0423\u0434\u0430\u0447\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435! \ud83d\ude80<\/p>\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\/articles\/1028012\/\">https:\/\/habr.com\/ru\/articles\/1028012\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e Matrix-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 Google-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0430\u043c\u0438, Telegram \u0438 WhatsApp \u043c\u043e\u0441\u0442\u0430\u043c\u0438.     \ud83d\udca1 Matrix \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440, \u0430\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u042d\u0442\u043e \u0432\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u00ab\u0414\u043e\u043c\u00bb, \u0433\u0434\u0435 \u0432\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u043d\u0435 Google \u0438\u043b\u0438 Meta. \u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u044f \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0432\u043e\u0439 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0447\u0430\u0442-\u0441\u0435\u0440\u0432\u0435\u0440: \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 Google, \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0430\u043c\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0434\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u043c\u043e\u0441\u0442\u0430\u043c\u0438 \u0432 Telegram \u0438 WhatsApp, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. \u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438 \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c, \u043d\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0432\u0448\u0438\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Matrix \u0441 Google-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0430\u043c\u0438 \u043c\u043e\u0441\u0442\u043e\u043c Telegram \u0438 WhatsApp \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043e\u043d\u0438 \u043b\u0438\u0431\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442, \u043b\u0438\u0431\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u043d\u044e\u0430\u043d\u0441\u044b Google-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435 \u0432\u0441\u0435 \u0430\u0434\u043c\u0438\u043d\u0441\u043a\u0438\u0435 \u0441\u0430\u0439\u0442\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b), \u0447\u0430\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0434\u0430\u0436\u0435 \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435 \u0432\u0435\u0440\u043d\u043e. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0438\u0448\u0438\u0442\u0435, \u0447\u0435\u043c \u0441\u043c\u043e\u0433\u0443 \u043f\u043e\u043c\u043e\u0433\u0443.\u0422\u0430\u043a \u0436\u0435 \u043e\u0442\u0432\u0435\u0447\u0443 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e. \u041d\u0435 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430 telegram \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. \u0410 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043c\u043e\u0441\u0442\u043e\u043c \u0432 telegram \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0434\u0430\u0436\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0435\u043b\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 (\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0433\u043e\u0440\u043e\u0434\u0430).\u0412 \u044d\u0442\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u043c\u044b \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Matrix-\u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0441\u0435\u043c\u044c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:\ud83d\udd10 \u0412\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 Google (\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u043d\u043e\u0432\/\u043f\u0430\u0440\u043e\u043b\u0435\u0439);\ud83c\udfa5 \u0412\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 LiveKit (\u044f \u0438\u0445 \u0435\u0449\u0451 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442);\ud83d\udd04 \u0414\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u043c\u043e\u0441\u0442\u044b \u0432 Telegram \u0438 WhatsApp (\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0439\u0442\u0435 \u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e \u0438\u0437 Matrix);\ud83d\udda5 \u041a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0432\u0435\u0431-\u043a\u043b\u0438\u0435\u043d\u0442 Element Web \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0434\u043e\u043c\u0435\u043d\u0435;\u2699\ufe0f \u0423\u0434\u043e\u0431\u043d\u0443\u044e \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c Ketesa \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u043a\u043e\u043c\u043d\u0430\u0442\u0430\u043c\u0438.\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u0438\u0441\u0430\u043b\u0430\u0441\u044c \u0434\u043b\u044f Debian 13, \u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 Linux \u0441 Docker.\ud83d\udccb \u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Synapse + PostgreSQL + Element Web\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Matrix Authentication Service (MAS) \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 Google\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u0438 \u0441 LiveKit\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u043e\u0441\u0442\u044b \u0432 Telegram \u0438 WhatsApp\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u0438 Ketesa\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nginx \u0438 SSL\u0417\u0430\u043f\u0443\u0441\u043a, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f\u0427\u0430\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f1. \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u041e\u0421Debian 13CPU2\u20134 \u044f\u0434\u0440\u0430RAM4\u20138 \u0413\u0411 (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f 6+)\u0414\u0438\u0441\u043a30\u201340 \u0413\u0411 (\u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043b\u0443\u0447\u0448\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 100 \u0413\u0411)\u0414\u043e\u043c\u0435\u043d 1matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u043e\u043c\u0435\u043d\u0414\u043e\u043c\u0435\u043d 2livekit.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru \u2014 \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e\u0437\u0432\u043e\u043d\u043a\u043e\u04321.1 \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:sudo apt update &amp;&amp; sudo apt upgrade -ysudo apt install -y curl wget git ufw pwgen1.2 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Docker \u0438 Docker Compose\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Docker \u043f\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0443 (\u044d\u0442\u043e \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e):curl -fsSL https:\/\/get.docker.com -o get-docker.shsudo sh get-docker.shsudo usermod -aG docker $USERnewgrp docker\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0433\u0438\u043d Docker Compose V2:sudo apt install -y docker-compose-plugin1.3 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430 (UFW)\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u0440\u0442\u044b (\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0437\u0436\u0435):sudo ufw allow 22\/tcpsudo ufw allow 80\/tcpsudo ufw allow 443\/tcpsudo ufw allow 3478\/tcpsudo ufw allow 3478\/udpsudo ufw allow 5349\/tcpsudo ufw allow 5349\/udpsudo ufw allow 7880\/tcpsudo ufw allow 7881\/tcpsudo ufw allow 50000:50200\/udpsudo ufw enable1.4 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0430\u043f\u043e\u043a\u0412\u0441\u0435 \u043d\u0430\u0448\u0438 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \/opt\/matrix-synapse:sudo mkdir -p \/opt\/matrix-synapse\/{data,element-web,mautrix-telegram,mautrix-whatsapp,livekit,mas-config}sudo chown -R $USER:$USER \/opt\/matrix-synapsecd \/opt\/matrix-synapse2. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u00ab\u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c\u00bb \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u043f\u0430\u0440\u043e\u043b\u044f\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b .env. \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 pwgen -s 32 1.nano .env# \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b SynapseSYNAPSE_POSTGRES_PASSWORD=YOUR_POSTGRES_PASSWORD_HERE1SYNAPSE_REGISTRATION_SHARED_SECRET=YOUR_REGISTRATION_SHARED_SECRET_HERE2SYNAPSE_MACAROON_SECRET_KEY=YOUR_MACAROON_SECRET_HERE3SYNAPSE_FORM_SECRET=YOUR_FORM_SECRET_HERE4SYNAPSE_TURN_SHARED_SECRET=YOUR_TURN_SHARED_SECRET_HERE5# MASMAS_POSTGRES_PASSWORD=YOUR_MAS_POSTGRES_PASSWORD_HERE6MAS_SHARED_SECRET=YOUR_MAS_SHARED_SECRET_HERE7# LiveKitLIVEKIT_API_KEY=YOUR_LIVEKIT_API_KEY_HERE8LIVEKIT_API_SECRET=YOUR_LIVEKIT_API_SECRET_HERE9# Telegram BridgeTELEGRAM_POSTGRES_PASSWORD=YOUR_TELEGRAM_POSTGRES_PASSWORD_HERE10# WhatsApp BridgeWHATSAPP_POSTGRES_PASSWORD=YOUR_WHATSAPP_POSTGRES_PASSWORD_HERE113. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Synapse + PostgreSQL + Element Web\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 docker-compose.yml:nano docker-compose.yml\ud83d\udcc4 \u041f\u043e\u043b\u043d\u044b\u0439 docker-compose.yml (\u043d\u0430\u0436\u043c\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c)services:  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 SYNAPSE ====================  postgres:    image: postgres:15-alpine    container_name: matrix_postgres    restart: unless-stopped    volumes:      &#8212; .\/data\/postgres:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: synapse      POSTGRES_USER: synapse      POSTGRES_PASSWORD: ${SYNAPSE_POSTGRES_PASSWORD}    networks:      &#8212; matrix_network    healthcheck:      test: [&#171;CMD-SHELL&#187;, &#171;pg_isready -U synapse&#187;]      interval: 10s      timeout: 5s      retries: 5  # ==================== SYNAPSE ====================  synapse:    image: matrixdotorg\/synapse:v1.151.0rc1    container_name: matrix_synapse    restart: unless-stopped    volumes:      &#8212; .\/data:\/data      &#8212; .\/logs:\/var\/log\/synapse    ports:      &#8212; &#171;8008:8008&#187;      &#8212; &#171;9000:9000&#187;    environment:      SYNAPSE_SERVER_NAME: matrix.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru      SYNAPSE_REPORT_STATS: &#171;no&#187;    networks:      &#8212; matrix_network    depends_on:      &#8212; postgres    healthcheck:      test: [&#171;CMD&#187;, &#171;curl&#187;, &#171;-f&#187;, &#171;http:\/\/localhost:8008\/health&#187;]      interval: 30s      timeout: 10s      retries: 3  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 MAS ====================  matrix-auth-db:    image: postgres:15-alpine    container_name: matrix_auth_db    restart: unless-stopped    volumes:      &#8212; .\/matrix-auth-db:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: matrix_auth      POSTGRES_USER: matrix_auth      POSTGRES_PASSWORD: ${MAS_POSTGRES_PASSWORD}    networks:      &#8212; matrix_network    healthcheck:      test: [&#171;CMD-SHELL&#187;, &#171;pg_isready -U matrix_auth&#187;]      interval: 10s      timeout: 5s      retries: 5  # ==================== MATRIX AUTHENTICATION SERVICE (MAS) ====================  matrix-auth:    image: ghcr.io\/element-hq\/matrix-authentication-service:latest    container_name: matrix_authentication_service    restart: unless-stopped    depends_on:      matrix-auth-db:        condition: service_healthy      synapse:        condition: service_started    volumes:      &#8212; .\/mas-config:\/config:ro    environment:      &#8212; MAS_CONFIG=\/config\/config.yaml    networks:      &#8212; matrix_network    ports:      &#8212; &#171;127.0.0.1:8081:8080&#187;  # ==================== ELEMENT WEB ====================  element-web:    image: vectorim\/element-web:latest    container_name: element_web    restart: unless-stopped    volumes:      &#8212; .\/element-web\/config.json:\/app\/config.json:ro    ports:      &#8212; &#171;127.0.0.1:8765:80&#187;    networks:      &#8212; matrix_network    depends_on:      &#8212; synapse  # ==================== KETESA (\u0410\u0414\u041c\u0418\u041d-\u041f\u0410\u041d\u0415\u041b\u042c) ====================  ketesa:    container_name: ketesa    hostname: ketesa    build:      context: https:\/\/github.com\/etkecc\/ketesa.git      dockerfile: docker\/Dockerfile.build    ports:      &#8212; &#171;8181:8080&#187;    restart: unless-stopped    networks:      &#8212; matrix_network  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 TELEGRAM ====================  telegram-db:    image: postgres:15-alpine    container_name: telegram_db    restart: unless-stopped    volumes:      &#8212; .\/telegram-db:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: telegram      POSTGRES_USER: telegram      POSTGRES_PASSWORD: ${TELEGRAM_POSTGRES_PASSWORD}    networks:      &#8212; matrix_network    healthcheck:      test: [&#171;CMD-SHELL&#187;, &#171;pg_isready -U telegram&#187;]      interval: 10s      timeout: 5s      retries: 5  # ==================== TELEGRAM BRIDGE ====================  telegram-bridge:    image: dock.mau.dev\/mautrix\/telegram:latest    container_name: telegram_bridge    restart: unless-stopped    volumes:      &#8212; .\/mautrix-telegram:\/data    environment:      &#8212; UID=991      &#8212; GID=991    networks:      &#8212; matrix_network    ports:      &#8212; &#171;127.0.0.1:29317:29317&#187;    depends_on:      telegram-db:        condition: service_healthy      synapse:        condition: service_started  # ==================== \u0411\u0410\u0417\u0410 \u0414\u0410\u041d\u041d\u042b\u0425 WHATSAPP ====================  whatsapp-db:    image: postgres:15-alpine    container_name: whatsapp_db    restart: unless-stopped    volumes:      &#8212; .\/whatsapp-db:\/var\/lib\/postgresql\/data    environment:      POSTGRES_DB: whatsapp      POSTGRES_USER: whatsapp      POSTGRES_PASSWORD: ${WHATSAPP_POSTGRES_PASSWORD}    networks:      &#8212; matrix_network    healthcheck:      test: [&#171;CMD-SHELL&#187;, &#171;pg_isready -U whatsapp&#187;]      interval: 10s      timeout: 5s      retries: 5  # ==================== WHATSAPP BRIDGE ====================  whatsapp-bridge:    image: dock.mau.dev\/mautrix\/whatsapp:latest    container_name: mautrix-whatsapp    restart: unless-stopped    volumes:      &#8212; .\/mautrix-whatsapp:\/data    environment:      &#8212; UID=1337      &#8212; GID=1337    networks:      &#8212; matrix_network    depends_on:      &#8212; synapse  # ==================== LIVEKIT JWT SERVICE ====================  livekit-jwt:    image: ghcr.io\/element-hq\/lk-jwt-service:latest    container_name: livekit-jwt    restart: unless-stopped    environment:      &#8212; LIVEKIT_URL=wss:\/\/livekit.\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d.ru      &#8212; LIVEKIT_KEY=${LIVEKIT_API_KEY}      &#8212; LIVEKIT_SECRET=${LIVEKIT_API_SECRET}      &#8212; LIVEKIT_JWT_BIND=:8080    ports:      &#8212; &#171;127.0.0.1:8088:8080&#187;    networks:      &#8212; matrix_network  # ==================== LIVEKIT SERVER ====================  livekit:    image: livekit\/livekit-server:latest    container_name: livekit    command: &#8212;config \/etc\/livekit.yaml    restart: unless-stopped&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-477428","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/477428","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=477428"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/477428\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=477428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=477428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=477428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}