rebrand: riot is now element
This commit is contained in:
parent
dbc1db7e36
commit
aa948fea73
1
howto/matrix-element/.gitignore
vendored
Normal file
1
howto/matrix-element/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
send_message.env
|
|
@ -10,7 +10,7 @@
|
|||
- [Accessibility to the server](#accessibility-to-the-server)
|
||||
- [reverse proxy server with nginx](#reverse-proxy-server-with-nginx)
|
||||
- [web static client](#web-static-client)
|
||||
- [script to upgrade static riot](#script-to-upgrade-static-riot)
|
||||
- [script to upgrade static element](#script-to-upgrade-static-element)
|
||||
- [Data](#data)
|
||||
- [Test federation](#test-federation)
|
||||
- [other installation guides](#other-installation-guides)
|
||||
|
@ -33,21 +33,21 @@
|
|||
|
||||
- Clients:
|
||||
- [There are a lot](https://matrix.org/docs/projects/try-matrix-now.html)
|
||||
- Recommended: riot.im/app HTML5 App, Desktop (Electron), AppStore, Google Play, F-Droid
|
||||
- Custom server config (login-riot-guifi.png)
|
||||
- Recommended: element.io/app HTML5 App, Desktop (Electron), AppStore, Google Play, F-Droid
|
||||
- Custom server config (login-element-guifi.png)
|
||||
- Room directory (public channels)
|
||||
- Start chat
|
||||
- Bridge with other networks. [Thought](https://xkcd.com/1810/), [response from Matrix](https://twitter.com/matrixdotorg/status/841424770025545730)
|
||||
- Riot Integrations: IRC networks (TODO: upload integrations-irc.png), jitsi (TODO: upload jitsi.png), [more](https://medium.com/@RiotChat/riot-im-web-0-12-7c4ea84b180a)
|
||||
- element Integrations: IRC networks (TODO: upload integrations-irc.png), jitsi (TODO: upload jitsi.png), [more](https://medium.com/@RiotChat/riot-im-web-0-12-7c4ea84b180a)
|
||||
- Locations: Spanish 79%, Catalan 0%
|
||||
|
||||
# Install on Debian 9 stretch 2017-10-06
|
||||
|
||||
This guide helps you to install a matrix server using authentication of a particular LDAP (guifi.net) with a postgresql database. Hope it helps you to be inspired on your particular needs.
|
||||
|
||||
matrix-riot homeservers up & running that used this howto:
|
||||
matrix-element homeservers up & running that used this howto:
|
||||
|
||||
- https://riot.guifi.net
|
||||
- https://element.guifi.net
|
||||
- https://riot.musaik.net
|
||||
|
||||
## First steps
|
||||
|
@ -267,7 +267,7 @@ This DNS configuration is required to see federation working in your matrix serv
|
|||
[More info setting up federation](https://github.com/matrix-org/synapse#setting-up-federation)
|
||||
|
||||
matrix.example.com IN A <IP>
|
||||
riot.example.com IN A <IP>
|
||||
element.example.com IN A <IP>
|
||||
_matrix._tcp.example.com. 3600 IN SRV 10 0 8448 matrix.example.com.
|
||||
|
||||
## Accessibility to the server
|
||||
|
@ -325,13 +325,13 @@ service nginx reload
|
|||
### web static client
|
||||
|
||||
```
|
||||
riot_domain="riot.example.com"
|
||||
riot_email="info@example.com"
|
||||
cat <<EOF > /etc/nginx/sites-available/${riot_domain}.conf
|
||||
element_domain="element.example.com"
|
||||
element_email="info@example.com"
|
||||
cat <<EOF > /etc/nginx/sites-available/${element_domain}.conf
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name ${riot_domain};
|
||||
server_name ${element_domain};
|
||||
|
||||
location /.well-known {
|
||||
default_type "text/plain";
|
||||
|
@ -345,31 +345,31 @@ server {
|
|||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name ${riot_domain};
|
||||
server_name ${element_domain};
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/${riot_domain}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/${riot_domain}/privkey.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/${element_domain}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/${element_domain}/privkey.pem;
|
||||
|
||||
root /var/www/html/riot-web;
|
||||
root /var/www/html/element-web;
|
||||
}
|
||||
EOF
|
||||
|
||||
ln -s /etc/nginx/sites-available/${riot_domain}.conf /etc/nginx/sites-enabled/${riot_domain}.conf
|
||||
ln -s /etc/nginx/sites-available/${element_domain}.conf /etc/nginx/sites-enabled/${element_domain}.conf
|
||||
|
||||
certbot certonly -n --keep --agree-tos --email ${riot_email} --webroot -w /var/www/html/ -d ${riot_domain}
|
||||
certbot certonly -n --keep --agree-tos --email ${element_email} --webroot -w /var/www/html/ -d ${element_domain}
|
||||
|
||||
service nginx reload
|
||||
```
|
||||
|
||||
#### script to upgrade static riot
|
||||
#### script to upgrade static element
|
||||
|
||||
Requirements:
|
||||
|
||||
apt-get install jq
|
||||
|
||||
take file [riot-update.sh](riot-update.sh) and put it in `/var/www/html/riot-web`
|
||||
take file [element-update.sh](element-update.sh) and put it in `/var/www/html/element-web`
|
||||
|
||||
add a config file for your site like `config.riot.example.com.json` inside riot-web directory `/var/www/html/riot-web`
|
||||
add a config file for your site like `config.element.example.com.json` inside element-web directory `/var/www/html/element-web`
|
||||
|
||||
```
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ add a config file for your site like `config.riot.example.com.json` inside riot-
|
|||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
|
||||
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
|
||||
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
|
||||
"defaultCountryCode": "ES",
|
||||
"showLabsSettings": false,
|
||||
"features": {
|
||||
|
@ -421,15 +421,15 @@ add a config file for your site like `config.riot.example.com.json` inside riot-
|
|||
}
|
||||
```
|
||||
|
||||
edit file `vi /etc/cron.d/updateriot`, add following content:
|
||||
edit file `vi /etc/cron.d/updateelement`, add following content:
|
||||
|
||||
```
|
||||
SHELL=/bin/bash
|
||||
|
||||
40 6 * * * root /var/www/html/riot-web/bin/riot-update.sh
|
||||
40 6 * * * root /var/www/html/element-web/bin/element-update.sh
|
||||
```
|
||||
|
||||
new riot releases fill directory `/var/www/html/riot-web/bundles/`. Check it out from time to time
|
||||
new element releases fill directory `/var/www/html/element-web/bundles/`. Check it out from time to time
|
||||
|
||||
## Data
|
||||
|
|
@ -4,51 +4,51 @@
|
|||
# forked from https://github.com/grigruss/Riot-web-server-update/commit/59e8fcc7d25bc7ac25ba0a943ac50ba6a488f7bb
|
||||
|
||||
# Specify the path to the web server directory
|
||||
RIOT_WEB_DIR="/var/www/html/riot-web"
|
||||
# go to directory
|
||||
cd "$RIOT_WEB_DIR"
|
||||
ELEMENT_WEB_DIR="/var/www/html/element-web"
|
||||
# go to directory
|
||||
cd "$ELEMENT_WEB_DIR"
|
||||
|
||||
# Get the content to determine the latest version.
|
||||
content=$(curl -s https://api.github.com/repos/vector-im/riot-web/releases/latest)
|
||||
content=$(curl -s https://api.github.com/repos/vector-im/element-web/releases/latest)
|
||||
package_id=$(jq -r '.id' <<<"$content")
|
||||
|
||||
# If it is started for the first time, it creates a file in which the latest version number will be saved.
|
||||
[ -f ./riot_version-id ] || touch riot_version-id
|
||||
[ -f ./element_version-id ] || touch element_version-id
|
||||
|
||||
# Ensure existens of the RIOT_WEB_DIR directory
|
||||
if [ ! -d $RIOT_WEB_DIR ]
|
||||
# Ensure existens of the ELEMENT_WEB_DIR directory
|
||||
if [ ! -d $ELEMENT_WEB_DIR ]
|
||||
then
|
||||
mkdir $RIOT_WEB_DIR
|
||||
mkdir $ELEMENT_WEB_DIR
|
||||
fi
|
||||
|
||||
# If the versions are different, we begin the update
|
||||
if [ "$package_id" != "$(cat ./riot_version-id)" ]
|
||||
if [ "$package_id" != "$(cat ./element_version-id)" ]
|
||||
then
|
||||
download_url=$(jq -r '.assets[] | select((.content_type == "application/x-gzip") or (.content_type == "application/octet-stream")) | .browser_download_url | select(contains("asc") | not)' <<<"$content")
|
||||
if [ "$download_url" != "" ]
|
||||
then
|
||||
# If there is no Riot-web directory, it will be created.
|
||||
if [ ! -d ./Riot-web ]
|
||||
# If there is no Element-web directory, it will be created.
|
||||
if [ ! -d ./Element-web ]
|
||||
then
|
||||
mkdir Riot-web
|
||||
mkdir Element-web
|
||||
fi
|
||||
|
||||
echo "New Version found starting download"
|
||||
curl -Ls "$download_url" | tar xz --strip-components=1 -C ./Riot-web/
|
||||
echo "$package_id" > ./riot_version-id
|
||||
curl -Ls "$download_url" | tar xz --strip-components=1 -C ./Element-web/
|
||||
echo "$package_id" > ./element_version-id
|
||||
echo "The new version is downloaded. Copying to the web server directory begins."
|
||||
|
||||
# Uncomment for save your logos
|
||||
# rm -rf ./Riot-web/img/logos
|
||||
# rm -rf ./Element-web/img/logos
|
||||
|
||||
# Copy the new version of Riot to the web server directory
|
||||
cp -r ./Riot-web/* $RIOT_WEB_DIR
|
||||
# Delete the new version from the Riot-web buffer directory
|
||||
rm -rf ./Riot-web
|
||||
# Copy the new version of Element to the web server directory
|
||||
cp -r ./Element-web/* $ELEMENT_WEB_DIR
|
||||
# Delete the new version from the Element-web buffer directory
|
||||
rm -rf ./Element-web
|
||||
echo "Copying to the web server directory finished. Exiting..."
|
||||
exit 0
|
||||
else
|
||||
echo "New version doesn't conatin needed archive. Aborting..."
|
||||
echo "New version doesn't contain needed archive. Aborting..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
Reference in a new issue