A self-hosted server for Moe Memos that provides Memos 0.21.0 OpenAPI support
  • Go 99.3%
  • Dockerfile 0.7%
Find a file
2026-07-27 22:23:13 +08:00
.github/workflows first commit 2025-02-24 22:29:38 +08:00
api feat: support creatorName in ListPublicMemos 2026-02-24 17:00:51 +08:00
server/memos chore: update to Memos 0.30.0 2026-07-27 22:23:13 +08:00
tools first commit 2025-02-24 22:29:38 +08:00
utils first commit 2025-02-24 22:29:38 +08:00
.gitignore chore: update to Memos 0.24.1 2025-03-14 22:23:57 +08:00
Dockerfile fix: #1 2025-07-17 22:18:40 +08:00
go.mod feat: support Memos 0.27.0 2026-04-20 00:23:22 +08:00
go.sum feat: support Memos 0.27.0 2026-04-20 00:23:22 +08:00
LICENSE first commit 2025-02-24 22:29:38 +08:00
main.go chore: update for Memos 0.26.0 2026-02-01 14:38:13 +08:00
README.md chore: update for Memos 0.25.3 2025-11-26 02:57:31 +08:00

Mortis - A Self-Hosted Server for Moe Memos

A self-hosted server that provides Memos 0.21.0 OpenAPI support for compatible apps like Moe Memos.

Currently, it is implemented to use the latest Memos server as a backend.

Usage

The server can be started with the following command:

mortis [flags]

Available flags:

  • -addr string: Listen address (default "0.0.0.0")
  • -port int: Listen port (default 5231)
  • -grpc-addr string: gRPC server address of Memos server (default "127.0.0.1:5230")

The -grpc-addr flag should point directly to your Memos instance. Reverse proxy is not currently supported since Mortis connects to Memos using the gRPC protocol, and gRPC-Web protocol is not yet implemented. However, Mortis itself can be placed behind a reverse proxy.

You can use the same domain for both Memos and Mortis by proxying paths with the /api/v1/ prefix to Mortis.

Nginx Configuration Example

Here is an example of an Nginx configuration to proxy requests to both Memos and Mortis:

server {
    listen 80;
    server_name yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:5230; # Memos server
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location /api/v1/ {
        proxy_pass http://127.0.0.1:5231; # Mortis server
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location /o/r/ {
        proxy_pass http://127.0.0.1:5231; # Mortis server
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Caddy Configuration Example

Or if you prefer using caddy, here is an example of a configuration to proxy requests to both Memos and Mortis:

yourdomain.com {
    reverse_proxy /api/v1/* mortis:5231
    reverse_proxy /o/r/* mortis:5231
    reverse_proxy memos:5230
}

Docker Compose Example

Here is an example docker-compose.yml file to run both Memos and Mortis:

services:
    memos:
        image: neosmemo/memos:0.25.3
        container_name: memos
        volumes:
            - ./data:/var/opt/memos
        ports:
            - "5230:5230"

    mortis:
        image: ghcr.io/mudkipme/mortis:0.25.3
        container_name: mortis
        ports:
            - "5231:5231"
        entrypoint: ["/app/mortis"]
        command: ["-grpc-addr=memos:5230"]
        depends_on:
            - memos

License

MIT