selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Misaka Danmu Server logo

Self-host Misaka Danmu Server

v2.8.9

Danmaku scraper & API hub for your media library

ReleaseOpen SourceAGPL-3.0
Updatedlast week
LanguagePython
Setup difficultyModerate
Stars
1 306
RAM
512MB-1GB (小内存 MySQL 方案适用场景)
Port
7768 (Web UI and danmaku API)
Docker
l429609201/misaka_danmu_server
Install with Docker Compose
Main dashboard of the Misaka danmaku web UIWebhook management page in settingsSession management screen showing active logins

What is Misaka Danmu Server?

Should you self-host Misaka Danmu Server?

Misaka Danmu Server scores 55/100 on selfhost.directory (how scoring works) and ranks #42 of 142 in Media Management. It has 1 306 GitHub stars.

It shipped 10 stable releases in the past year. The latest, v2.8.9, came out on 22 August 2026. New versions land roughly every 4 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Sonarr (81/100, 17 472 stars). It scores higher overall, so compare the two before you pick. See Misaka Danmu Server vs Sonarr side by side.

Features

  • AI-assisted matching
  • Brute-force login lockout
  • dandanplay-compatible danmaku API
  • Filename & metadata matching
  • IPv4/IPv6 dual-stack listening
  • IP whitelist access control
  • MCP Server
  • Media server webhooks
  • Metadata source integration
  • One-click container updateRequires mapping /var/run/docker.sock into the container.
  • Passkey login
  • Pluggable danmaku sources
  • REST API with Swagger docs
  • Two-factor authentication
  • Web admin UI

Misaka Danmu Server README

How to install Misaka Danmu Server

Install Misaka Danmu Server with Docker Compose

bash

mkdir -p ~/danmuku
cd ~/danmuku
mkdir -p db-data config
touch docker-compose.yaml

Recommended one-click deployment: prepare docker-compose.yaml with a database (MySQL recommended, PostgreSQL 18 optional) and the app container.

How to configure Misaka Danmu Server

  • ai_cache_enabled开启是否缓存重复的 AI 请求结果

    是否缓存重复的 AI 请求结果

    values: 开启 / 关闭

  • ai_cache_ttl3600 秒AI 响应缓存的有效期

    AI 响应缓存的有效期

  • ai_call_timeout60 秒单次 AI 请求的超时时间

    单次 AI 请求的超时时间

  • ai_log_raw_response将 AI 原始响应写入专用日志

    将 AI 原始响应写入专用日志

    values: 开启 / 关闭

  • ai_thinking_enabledDeepSeek 思考模式开关

    DeepSeek 思考模式开关

    values: 开启 / 关闭

  • DANMUAPI_ADMIN__INITIAL_USERadmin初始管理员用户名

    初始管理员用户名

  • DANMUAPI_CACHE__BACKENDhybrid缓存后端;默认 hybrid(内存 L1 + 数据库 L2),无需额外服务

    缓存后端;默认 hybrid(内存 L1 + 数据库 L2),无需额外服务

    values: memory / redis / database / hybrid

  • DANMUAPI_CACHE__MEMORY_DEFAULT_TTL内存缓存默认过期时间(秒)

    内存缓存默认过期时间(秒)

  • DANMUAPI_CACHE__MEMORY_MAXSIZE内存缓存最大条目数

    内存缓存最大条目数

  • DANMUAPI_CACHE__REDIS_MAX_MEMORYRedis 最大内存限制

    Redis 最大内存限制

  • DANMUAPI_CACHE__REDIS_SOCKET_CONNECT_TIMEOUTRedis 连接超时(秒)

    Redis 连接超时(秒)

  • DANMUAPI_CACHE__REDIS_SOCKET_TIMEOUTRedis 套接字超时(秒)

    Redis 套接字超时(秒)

  • DANMUAPI_CACHE__REDIS_URLRedis 连接地址(缓存后端为 redis 时)

    Redis 连接地址(缓存后端为 redis 时)

  • DANMUAPI_DATABASE__HOST数据库主机地址

    数据库主机地址

  • DANMUAPI_DATABASE__NAME数据库名称

    数据库名称

  • DANMUAPI_DATABASE__PASSWORD数据库密码

    数据库密码

  • DANMUAPI_DATABASE__PORT3306 / 5432数据库端口

    数据库端口

  • DANMUAPI_DATABASE__TYPE数据库类型(mysql 或 postgresql)

    数据库类型(mysql 或 postgresql)

    values: mysql / postgresql

  • DANMUAPI_DATABASE__USER数据库用户名

    数据库用户名

  • DANMUAPI_JWT__SECRET_KEYJWT 签名密钥(建议在 .env 中设置强密钥)

    JWT 签名密钥(建议在 .env 中设置强密钥)

  • DANMUAPI_LOG__LEVEL日志级别

    日志级别

    values: DEBUG, INFO, WARNING, ERROR

  • DANMUAPI_SERVER__HOST服务监听地址(compose 示例中为 0.0.0.0)

    服务监听地址(compose 示例中为 0.0.0.0)

  • DANMUAPI_SERVER__PORT7768服务监听端口

    服务监听端口

  • loginLockoutMinutes60登录锁定时长,单位分钟

    登录锁定时长,单位分钟

  • loginMaxFailCount3登录失败次数上限,同一 IP 达到后临时锁定;设为 0 可禁用暴力破解防护

    登录失败次数上限,同一 IP 达到后临时锁定;设为 0 可禁用暴力破解防护

  • PGID1000运行容器的组 ID

    运行容器的组 ID

  • PUID1000运行容器的用户 ID

    运行容器的用户 ID

  • TZAsia/Shanghai时区

    时区

  • UMASK0022文件创建掩码,供 entrypoint.sh 使用

    文件创建掩码,供 entrypoint.sh 使用

Misaka Danmu Server releases & version history

FAQ

如何限制Token的调用次数?

Set 每日调用限制 when creating a token: -1 means unlimited, a positive integer caps calls per day, after which the token is unusable for the rest of the day.

Token过期后怎么办?

Open 弹幕 → Token管理 to see the token's status and create a new one, then update the danmaku API address in the player.

可以同时使用多个 AI 提供商吗?

Not at the same time — only one AI provider can be configured in the system.

AI 功能必须配置吗?

AI features are an optional enhancement; the danmaku service works normally without configuring any AI provider.

可以使用代理访问元数据源吗?

Yes, configure a global proxy under 设置 → 网络 and metadata requests go through it.

TMDB API Key 有调用次数限制吗?

Yes, a free key works well for personal use, and the built-in cache reduces API calls.

我必须配置所有元数据源吗?

Only TMDB is really needed; the other metadata sources can be enabled selectively depending on what your library contains.

如何自定义弹幕文件存储路径?

Either set custom paths and a filename template under 设置 → 弹幕文件路径, or bind-mount your own directory over /app/config/danmaku and point the UI at it.

如何启用播放器自动搜索并下载弹幕功能?

In 弹幕 → 高级设置 enable 匹配后备 (auto search and import when a player matches a file) and/or 后备搜索 (fallback search from the player), optionally with 顺延机制 and 预下载 for smoother playback.

AI 功能无法使用怎么办?

Check the provider and API key in the AI settings, verify the connection with the built-in test button, make sure the network (or configured proxy) can reach the provider, and inspect the task/container logs for errors.

数据库文件越来越大怎么办?

Task history and API records are purged by the built-in database-maintenance job (3 days by default) and it also tries to trim MySQL binlogs; a binlog cleanup warning is normal, and PostgreSQL manages WAL automatically.

弹幕库搜索不到内容怎么办?

Either no danmaku source is installed (add one from the resource repository or upload an offline package), or your overseas VPS IP is region-blocked by sources such as bilibili, iQiyi and Tencent Video; route those requests through a mainland IP.

忘记密码怎么办?

SSH into the server, change to the directory holding your docker-compose.yml, run the bundled reset_password module for the target user inside the container, then log in with the printed random password and change it in the UI.

More in Media

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…