Intercom lets you turn any computer with a microphone, speakers, and webcam into a remote intercom.
You can talk, listen, and watch whatβs happening β all through your browser using WebRTC.
- π Two-way audio communication
- π₯ Live video streaming via WebRTC
- π Password-protected single-user login
- βοΈ Built with Python, Quart, and aiortc
- π§© Uses Coturn for TURN/STUN relay support
- π₯οΈ Designed for simple deployment on Linux (Ubuntu/Debian)
π§βπ» Currently supports 1 user login and 1 viewer at a time.
- Linux system (Ubuntu/Debian recommended)
- Microphone, speakers, and webcam connected
- Python 3.11+
- ALSA sound drivers
- OpenSSL
- Coturn (TURN server)
Follow these steps to install and run Intercom on your Linux system.
sudo apt updatesudo apt install python3 python3-pip python3-venvsudo apt install coturnMake sure ALSA sound drivers, git, PortAudio, and OpenSSL are installed:
sudo apt install -y alsa-utils alsa-tools alsa-plugins git openssl libportaudio2 libportaudiocpp0 portaudio19-devgit clone https://github.com/zemendaniel/intercom.git
cd intercompython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtFind your playback (speaker) and recording (microphone) devices:
aplay -l # list playback devices
arecord -l # list recording devicesYouβll see something like:
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
List connected webcams:
ls /dev/video*Usually /dev/video0 is your main camera.
Youβll need HTTPS for WebRTC to work. Run:
openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 36500Just press Enter for all questions. This creates
cert.pemandkey.pem.
Open the TURN server config:
sudo nano /etc/turnserver.confPaste this, replacing <your lan ip> with your actual LAN IP address:
# TURN server listening IP (your LAN IP)
listening-ip=<your lan ip>
# Relay IP usually same as listening IP
relay-ip=<your lan ip>
# Listening port (default 3478)
listening-port=3478
# Enable verbose logging to syslog
verbose
# Enable fingerprint attribute
fingerprint
# User authentication: username and password
# Replace with your own secure credentials
user=turnuser:turnpassword
# Enable long-term credentials mechanism (recommended)
lt-cred-mechRestart Coturn and check that itβs running:
sudo systemctl restart coturn
sudo systemctl status coturnRun the setup script to generate your .env file:
python3 setup-env.pyFollow the prompts and fill in your camera, mic, playback device, and TURN credentials.
You can adjust sound levels using:
alsamixerCreate a new service file:
sudo nano /etc/systemd/system/intercom.servicePaste this configuration (adjust paths if needed):
[Unit]
Description=Intercom Webapp Service
After=network.target
[Service]
User=root
WorkingDirectory=/root/intercom
ExecStart=/root/intercom/venv/bin/python -m hypercorn app:app --bind 0.0.0.0:8080 --certfile cert.pem --keyfile key.pem --workers 1
Restart=always
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.targetReload systemd, start the service, and enable it on boot:
sudo systemctl daemon-reload
sudo systemctl start intercom
sudo systemctl enable intercom
sudo systemctl status intercomOpen your browser and navigate to:
https://<your-ip>:8080
Log in with your configured password.
Then:
- Click Start to begin the video/audio stream.
- Click Stop to end it.
- Ensure your browser has permission to use the microphone.
Thatβs it β your Intercom is now live!
If you find a bug or want to suggest improvements:
- πͺ² Open an issue
- β Star the repo to support the project!
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).