A static golang generated preview of public world readable Matrix rooms.
  • Go 96.9%
  • CSS 2.4%
  • Dockerfile 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Telatynski aa867a8b26
Update README.md
2023-05-30 09:16:53 +01:00
.github/workflows Apply suggestions from code review 2022-05-26 15:12:35 +01:00
assets Add basic search & go to room by alias/id support 2021-06-08 21:16:39 +01:00
cmd Merge branch 'develop' into gha 2022-05-26 15:15:10 +01:00
mxclient Merge branch 'develop' into roomid-alt 2022-05-26 15:16:13 +01:00
sanitizer Switch from gb to go mod 2019-12-22 20:09:57 +00:00
templates Remove room ids from alt attributes 2022-05-15 14:53:54 +02:00
utils Switch from gb to go mod 2019-12-22 20:09:57 +00:00
workers Add tests 2020-02-15 14:03:03 +00:00
.dockerignore iterate on cache tweaks. Improve Docker 2020-01-25 14:28:39 +00:00
.gitignore make qtc a pre-build rather than pre-commit thing 2017-08-04 16:24:36 +01:00
config.sample.json add config.sample.json 2017-08-01 12:29:14 +01:00
Dockerfile Fix Dockerfile not exposing port 8000 2021-06-08 21:01:31 +01:00
go.mod fix tests run 2020-02-15 14:14:36 +00:00
go.sum fix tests run 2020-02-15 14:14:36 +00:00
LICENSE Initial commit 2017-06-13 14:34:20 +01:00
Procfile s/riot-static/matrix-static/g 2017-08-03 22:02:45 +01:00
README.md Update README.md 2023-05-30 09:16:53 +01:00

Matrix Static

No longer maintained

In favour of https://github.com/matrix-org/matrix-public-archive

Installation

git clone or download this repository as an archive and extract then follow below instructions.

go get github.com/valyala/quicktemplate/qtc
qtc
mkdir bin && go build -o bin/ ./cmd/...

Docker

docker build -t matrix-static .
docker run -v $(pwd)/config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static

or for windows:

docker run -v %cd%/config.json:/opt/matrix-static/config.json -p 8000:8000 -it matrix-static

and pass any command line arguments to the end of the command.

Usage

First you must create a config, there is a sample json file provided or you can use the helper binary register-guest to register a guest on a given homeserver and write an appropriate config file.

register-guest takes the following options:

--config-file= to specify the config file, defaulting to ./config.json.

--homeserver-url= to specify the Homeserver URL to use, defaulting to https://matrix.org.

The main binary, matrix-static exhibits the following controls:

Accepts PORT= env variable to determine what port to use, defaulting to port 8000 if one is not specified. Will panic if port is in use.

Accepts the following command line arguments:

--config-file= to specify the config file, defaulting to ./config.json.

--enable-pprof if set, enables the /debug/pprof endpoints for debugging.

--enable-prometheus-metrics if set, enables the /metrics endpoint for metrics.

--num-workers= to specify the number of worker goroutines to start, defaults to 32.

--public-serve-prefix= to specify the router prefix to use for the user-facing html-serving routes, defaults to /.

--logger-directory to specify where the output logs should go.

--cache-ttl to specify how long since last access to keep a room in memory and up to date for, defaults to 30 minutes.

--cache-min-rooms to specify the minimum number of rooms to always keep in memory, defaults to 10.

Support

Currently hosted at https://view.matrix.org

Discussion Matrix Room is #matrix-static:matrix.org