百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

lrclib

> 数据库
开源

LRCLIB 服务器使用 Rust 编写,搭载 Axum 和 SQLite3 数据库

1.9K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

LRCLIB 服务器使用 Rust 编写,搭载 Axum 和 SQLite3 数据库

LRCLIB

Introduction

LRCLIB server written in Rust with Axum and SQLite3 database.

This is the source code of lrclib.net rewritten in Rust from scratch. LRCLIB is a completely free service for finding and contributing synchronized lyrics, with an easy-to-use and machine-friendly APIs.

Setup

Build the project:

cargo build --release

Run the server:

LRCLIB_LOG=info cargo run --release -- serve --database db.sqlite3

Server will be available at http://0.0.0.0:3300

Database configuration

You have three environment variables available to tweak the database connection:

  • LRCLIB_MMAP_SIZE (default 30000000000 - 30GB): set SQLite's mmap_size parameter. This should be less than 75% of the available RAM. Using an excessive value might cause memory swapping, decreasing performance.
  • LRCLIB_CACHE_SIZE (default -1000000 - 1GB): set SQLite's cache_size parameter. Negative values are kilobytes.
  • LRCLIB_POOL_MAX_SIZE (default 16): set the maximum number of SQLite connections managed by the r2d2 pool. The value must be a positive integer.

Use these variables to optimize memory usage in low traffic and/or low memory situations. The default values are generously sized to be used on a production system.

Setup with Podman/Docker

Basic

Build the image:

podman build -t lrclib-rs:latest -f Dockerfile .

Run the container:

podman run --rm -it -d -v lrclib-data:/data -p 3300:3300 -e LRCLIB_LOG=info --name lrclib-rs lrclib-rs:latest

Server will be available at http://0.0.0.0:3300

Access the SQLite database

Run the following command to directly interact with the database in command line:

podman run --rm -it -v lrclib-data:/data lrclib-rs:latest sqlite3 /data/db.sqlite3

Quadlet

You can use Quadlet to run the Podman container in the background. It also handles auto-start the container after machine restart for you.

Create a file named lrclib.container at ~/.config/containers/systemd/:

mkdir -p $HOME/.config/containers/systemd/
vi $HOME/.config/containers/systemd/lrclib.container

The example content of lrclib.container:

[Container]
Image=lrclib-rs:latest
PublishPort=3300:3300
Volume=lrclib-data:/data
ContainerName=lrclib-rs
Environment=LRCLIB_LOG=info

[Service]
Restart=always

[Install]
WantedBy=multi-user.target default.target

Reload the daemon:

systemctl --user daemon-reload

Start the service:

systemctl --user start lrclib.service

Check the status to see if lrclib.service is actually running:

systemctl --user status lrclib.service

Restart when the container image is updated:

systemctl --user restart lrclib.service

Donation

Toss a coin to your developer?

GitHub Sponsors (Recommended - 100% of your support goes to the developer):

https://github.com/sponsors/tranxuanthang

Buy Me a Coffee:

https://www.buymeacoffee.com/thangtran

Paypal:

https://paypal.me/tranxuanthang98

Monero (XMR):

43ZN5qDdGQhPGthFnngD8rjCHYLsEFBcyJjDC1GPZzVxWSfT8R48QCLNGyy6Z9LvatF5j8kSgv23DgJpixJg8bnmMnKm3b7

Litecoin (LTC):

ltc1q7texq5qsp59gclqlwf6asrqmhm98gruvz94a48

Contact

If you prefer to contact by email:

[email protected]

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustaxumlyricsmusicrust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库