A Matrix bridge for LINE Messenger using mautrix-go.
Based on the mautrix-twilio bridge
Warning
When updating from a version released before February 14, 2026,
please make sure to reset your configuration and log in again.
This is due to a change in the login flow that requires users to log
in again to fetch the necessary keys for E2EE decryption.
Note
Messages sent to the LINE Bot using Beeper Desktop may appear as
indefinitely sending.
Use Beeper Mobile to send commands to the LINE Bot account after
creating the chat with Beeper Desktop.
Warning
The bridge identifies itself as a LINE Chrome Extension client. LINE only allows one active Chrome Extension session at a time, so you cannot use the LINE Chrome Extension and the bridge simultaneously. Logging into the LINE Chrome Extension will invalidate the bridge's session (and vice versa). If this happens, you will need to re-authenticate the bridge. If you want to use LINE Chrome, you will need to log out of the bridge first as the bridge will try to automatically log back in and invalidate the LINE Chrome session again.
- Messages
- Text
- Images
- Videos
- Files
- Voice notes
- Audio files
- GIFs
- Location sharing (receive only)
- Contact sharing (receive only)
- LINE friend (name only)
- Device contact (vCard)
- Mentions
- Read receipts
- Reaction support (Receive ONLY)
- Replies
- Prefetch missed chats upon starting the bridge
- Group chats
- Sticker retrieval support
- Link previews
- Message unsending/deletion
- Call notifications (voice and video, with duration)
- Leaving chats
git clone https://github.com/highesttt/matrix-line-messenger.git
cd matrix-line-messenger
mkdir data- Docker and Docker Compose
- bbctl (compile from source if you don't have it):
git clone https://github.com/beeper/bridge-manager.git
cd bridge-manager
./build.shbbctl c --type bridgev2 sh-line > data/config.yamlThe Docker container will automatically generate a matching
registration.yaml from the Beeper-issued tokens in your config on
first startup.
docker compose up --build -d- Docker and Docker Compose
- A Matrix homeserver (Synapse, Dendrite, Conduit, etc.)
Start the container once to generate the example config:
docker compose up --buildThe container will create data/config.yaml and exit. Edit it and set:
homeserver.address— your Matrix server URL (e.g.http://localhost:8008)homeserver.domain— your Matrix server domain (e.g.your.domain.com)database.uri— your database URI (e.g.postgres://user:pass@host/db)bridge.permissions— who can use the bridge
Start the container again to generate the registration file:
docker compose up --buildIt will create data/registration.yaml and exit. Register the
appservice with your homeserver by adding the registration file path to
your homeserver config. For Synapse, add it to
app_service_config_files in homeserver.yaml, then restart the
homeserver.
docker compose up --build -dTo run without rebuilding on subsequent starts:
docker compose up -d- MSYS2 with mingw-w64 toolchain:
winget install MSYS2.MSYS2
# Open MSYS2 MinGW 64-bit terminal and install packages:
pacman -Syu mingw-w64-x86_64-gcc cmakegit clone https://gitlab.matrix.org/matrix-org/olm.git
cd olm
cmake -Bbuild -G "Unix Makefiles" \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DCMAKE_INSTALL_PREFIX=/mingw64
cmake --build build
cmake --install build
cd ..- If using Beeper, compile bbctl from source:
git clone https://github.com/beeper/bridge-manager.git
cd bridge-manager
# Windows only: In cmd/bbctl/run.go, remove the following lines
# because MSYS2 is still seen as Linux, but Windows doesn't support Setpgid:
#
# if runtime.GOOS == "linux" {
# cmd.SysProcAttr = &syscall.SysProcAttr{
# Setpgid: true,
# }
# }
./build.shCopy the olm .dll and .dll.a files to the project root, then:
./build-windows.shBeeper users:
bbctl c --type bridgev2 sh-line > data/config.yaml
bbctl r sh-line > data/registration.yamlSelf-hosted Matrix server:
./matrix-line.exe -e -c data/config.yaml
# Edit data/config.yaml and set:
# homeserver.address: http://localhost:8008 (your Matrix server URL)
# homeserver.domain: your.domain.com (your Matrix server domain)
# database.uri: sqlite:///data/matrix-line.db (or a postgres URI)
# bridge.permissions: (who can use the bridge)
./matrix-line.exe -g -c data/config.yaml -r data/registration.yaml
# Register the appservice with your homeservercd data
../matrix-line.exe- Go and build tools (
gcc,make) - olm library (install via your package manager or build from source)
- If using Beeper, compile bbctl from source
./build.shBeeper users:
bbctl c --type bridgev2 sh-line > data/config.yaml
bbctl r sh-line > data/registration.yamlSelf-hosted Matrix server:
./matrix-line -e -c data/config.yaml
# Edit data/config.yaml and set:
# homeserver.address: http://localhost:8008 (your Matrix server URL)
# homeserver.domain: your.domain.com (your Matrix server domain)
# database.uri: sqlite:///data/matrix-line.db (or a postgres URI)
# bridge.permissions: (who can use the bridge)
./matrix-line -g -c data/config.yaml -r data/registration.yaml
# Register the appservice with your homeservercd data
../matrix-line- Open Beeper Desktop Settings
- Navigate to
Bridges - Click the three dots next to your LINE Bridge and select
Experimental: Add an account - Follow the instructions to log in to your LINE account.
- Open your Matrix client and start a chat with
@sh-linebot:your.matrix.homeserver.domain.
For Beeper, use@sh-linebot:beeper.local. - Send the command
loginand follow the instructions.
There are two common reasons login can fail:
This bridge uses the email from your account information. If your account is older, you signed in using a phone number, or you signed in with Google, you may not have an email set for your LINE account.
How to set an email for your LINE account:
- Open the LINE app on your mobile device.
- Go to
Settings>Account. - Tap on
Email addressand set your email address.
The bridge supports both Letter Sealing ON and OFF accounts. Messages
to peers or groups without Letter Sealing are sent as plain text
automatically.
For details on how the bridge handles different Letter Sealing combinations, see readme/LETTER_SEALING.md.