Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This is a SvelteKit app that I use to edit posts on It uses matrix-blog to communicate with my Matrix homeserver.

Warning: Please don't expose this app online! There's no authorization, so anyone could do things on the Matrix server on your behalf. Also, the code is very alpha quality. You probably don't want to use this in production.

Screenshot of matrix-blog-admin running on a desktop browser


In order to successfully use this to write blog posts, you need:

  • node.js and npm, OR docker. I tested this with node.js 14.

  • A pre-existing Matrix space. Create one in Element.

  • An access token to your Matrix homeserver. You can obtain one by sending an API request to your homeserver (replace, USERNAME and PASSWORD with your homeserver address and your credentials).

    curl -XPOST \
        -H "Content-type: application/json" \
        -d '{"type":"m.login.password","identifier":{"type":"","user":"USERNAME"},"password":"PASSWORD"}' \

    The response will look similar to this:

        "user_id": "",
        "access_token": "THATS_YOUR_ACCESS_TOKEN",
        "home_server": "",
        "device_id": "blog",
        "well_known": {
            "m.homeserver": { "base_url": "" },
            "m.identity_server": { "base_url": "" }

Setting up for development

  1. Clone this repo: git clone

  2. Make a copy of .env.sample and call it .env.

    Note: You can also create .env files per environment. Consult the Vite docs how to do it.

  3. Fill in the .env file with necessary information:

    • VITE_MATRIX_SERVER_NAME — Name of your Matrix server. If your Matrix username is, the server name is
    • VITE_MATRIX_HOMESERVER_URL — The actual HTTPS URL of your Matrix server. If your server uses delegation, you can find the hostname under https://SERVER_NAME/.well-known/matrix/client.
    • VITE_MATRIX_BLOG_ROOM_ID — The room ID of the Matrix space you want to use for the blog. Looks like !randomtext:SERVER_NAME. Find it in Element Web under Space Settings (the cog button) > View dev tools > Room ID.
    • VITE_MATRIX_ACCESS_TOKEN — The access token to use to authenticate requests to Matrix.
  4. Install dependencies: npm install

  5. Run the devserver: npm run dev

The server will run at http://localhost:3000/.

Building a standalone node.js app

  1. Make sure your .env file is populated with correct values.
  2. Run npm run build

At this point you have a build/ directory that contains a plain node.js app. You can verify that it works by running npm run preview.

Deploying to production

  1. Build the app using the instructions above.
  2. Copy package.json, package-lock.json and the build/ directory to the production machine.
  3. On the production machine, cd to the directory with the above files.
  4. Run npm install --production to install dependencies.
  5. Run node build to start the server. The app will be accessible on port 3000 by default.
    • You can change the bind host and port by setting the HOST and PORT environment variables, e.g. HOST= PORT=8080 node build.

Running inside a docker container

  1. Make sure your .env file is populated with correct values.
  2. Run docker build -t matrix-blog-admin .

You can now start the container with docker run -p 3000:3000 matrix-blog-admin and access it at http://localhost:3000/.


Written by Rafał Hirsz. This package is licensed under the terms of the MIT license.


Basic administration panel for blogs hosted on Matrix







No releases published


No packages published