matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

404 page not found, the dendrite server is however working, also I cannot find documentation on how to create an admin user. #1887

Closed Jieiku closed 3 years ago

Jieiku commented 3 years ago

Background information

Description

I have recently installed matrix synapse. I was curious see if there was a version of the server running in Rust. I found Conduit but it seems less feature complete compared to dendrite and I was also a bit concerned about upgrades with conduit breaking, additionally I am a huge fan of Postgresql so I decided to give dendrite a try.

Upon installing dendrite and trying to visit my page https://matrix.example.com I am presented with a 404 page not found, however the 404 page appears to be getting generated by dendrite because it does not look like the 404 page that I normally see when HAProxy is the one serving the content.

despite the 404 page when trying to hit the url in a web browser, the matrix server appears to be functioning properly with element.

Steps to reproduce

I have dendrite installed in a Proxmox LXC container (Ubuntu 20.04.2 LTS), I am using SSL offloading via HAProxy (which works perfectly with my older synapse install)

here is my complete install routine:

  # install postgresql
apt update && apt upgrade
apt install -y gnupg git
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee  /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt update && apt upgrade
apt install postgresql libpq-dev
reboot
psql --version

  # configure postgresql user and database for dendrite
sudo -u postgres psql
    # DROP DATABASE matrix;
    # DROP USER "matrix";
CREATE USER "matrix";
CREATE USER "matrix" WITH PASSWORD 'mysecretpassword';
CREATE DATABASE matrix OWNER "matrix" TEMPLATE template0 ENCODING 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE matrix TO "matrix";
EXIT;

  # install dendrite
git clone https://github.com/matrix-org/dendrite
cd dendrite
./build.sh

  # Generate a Matrix signing key for federation (required)
./bin/generate-keys --private-key matrix_key.pem

  # Haproxy handles SSL offloading of the certs (very similar to how nginx can)

  # Copy and modify the config file - you'll need to set a server name and paths to the keys at the very least, along with setting up the database connection strings.
cp dendrite-config.yaml dendrite.yaml

-------------------------------
nano dendrite.yaml

server_name: matrix.example.com

  #just search for "file:" and replace with:

postgresql://matrix:mysecretpassword@localhost/matrix
-------------------------------

  # Build and run the server:
./bin/dendrite-monolith-server --config dendrite.yaml
neilalexander commented 3 years ago

Upon installing dendrite and trying to visit my page https://matrix.example.com I am presented with a 404 page not found

This is correct. Dendrite implements Matrix endpoints under /_matrix. It does not bundle a Matrix client such as Element.

also I cannot find documentation on how to create an admin user

We don't have a concept of admin users right now. Dendrite also doesn't implement an admin API yet.

kegsay commented 3 years ago

Closing this. It would be nice to have a "Everything is OK!" HTML page at / but there's nothing actionable here at present.