I think I may have found a typo in the instructions. Under the section for setting up the Matrix .well-known info, shouldn't the line:
cat '{ "m.server": "matrix.dangerousdemos.net:443" }' > server
be
echo '{ "m.server": "matrix.dangerousdemos.net:443" }' > server
instead?