Webscreen is a self-hosted screen streaming web application for Android and Linux devices, based on WebRTC. Might support more devices in the future!

It can run on:
- Android Termux
- Linux
- Windows
- MacOS
on both amd64 and arm64
Android supports (scrcpy):
- Video, Audio, Control
- UHID Devices (Mouse, Keyboard, Gamepad)
- Clipboard Sync
- Touch (Multi-finger, pressure)
- H.264/H.265
- Multi-Connection
- Maybe more...
Linux supports (Xvfb/Xorg/Sway):
- Video, Control
- Touch
- H.264/H.265
- GPU (Xorg/Sway)
For device side, please refer to scrcpy
For server side, you'd better have adb and xvfb, ffmpeg, xfce4, sway, wf-recorder (if need this feature, optional) in your PATH first.
# Build by yourself:
git clone https://github.com/huonwe/webscreen.git
cd webscreen
make
# Use pre-built binary:
apt install adb
# if you want to stream Linux display
apt install xvfb ffmpeg xfce4 sway wf-recorder
# then you can directly use pre-built binaryfor client side, you need a web browser that support WebRTC (H.264 High Profile, or H.265 Main Profile).
Download the latest release, execute the program. The default port is 8079, but you can specifiy it by -port 8080. 6-digit PIN is also needed (default to '123456'). An example command: ./webscreen -host 0.0.0.0 -port 8080 -pin 555555
Then open your favorite browser and visit <your ip>:<your port>
Or you can build by yourself. Normally, you can build simply by go build. But if you want to build by yourself on Termux, you need to run go build -ldflags "-checklinkname=0".
You can also use docker:
wget https://raw.githubusercontent.com/huonwe/webscreen/refs/heads/main/docker-compose.yml
docker compose up -dhost network mode is recommended because of UDP traffic and device connection.
You might need to pair Android device in wireless debug first. Pair device with pairing code is supported. Once you finished pairing, type Connect button and enter necessary information.
After you start streaming, you might need to manually make the scene a little changed, to get the screen. You can simply click volume button to make it.
- Xvfb wouldn't work in docker and termux
- Crash: MediaCodec 0x80001001 Exception on custom Android devices due to hardcoded H.264 High Profile (profile=8) #11
- set profile=1 to video_codec_options
Webscreen, streaming your device in Web browser.
Copyright (C) 2026 Hiroi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.