Setup Jitsi for Secure Video Conferencing
How to Set Up Jitsi for Secure Video Conferencing
In today’s digital world, secure communication is essential. At MilesGuard, we value privacy, which is why we prefer Jitsi over mainstream platforms like Microsoft Teams. This guide will walk you through setting up Jitsi on a Virtual Private Server (VPS) using Docker and systemd services.
Why Choose Jitsi?
Jitsi is an open-source video conferencing solution that offers end-to-end encryption 🔒, ensuring your conversations remain private. Unlike proprietary platforms, Jitsi gives you full control over your data.
Prerequisites
Before starting, make sure you have:
- A server with Docker and Docker Compose installed 🐳
- A domain name pointing to your server’s IP address (e.g.,
meet.milesguard.com
) - Git installed to clone repositories
- A new Git repository created for your Jitsi setup
- Root or sudo access to the server
Step 1: Clone the Jitsi Docker Repository as a Submodule
Add the official Jitsi Docker repository as a submodule:
git submodule add https://github.com/jitsi/docker-jitsi-meet.git
Step 2: Update Submodules
Initialize and update the Git submodules:
git submodule update --init --recursive
Step 3: Configure Environment Variables
Copy the template .env file to create your environment configuration:
cp .env docker-jitsi-meet/.env
Customize the .env File
Edit the .env file and configure the following settings:
# Basic Configuration
XMPP_DOMAIN=meet.milesguard.com
XMPP_AUTH_DOMAIN=auth.meet.milesguard.com
XMPP_MUC_DOMAIN=muc.meet.milesguard.com
XMPP_INTERNAL_MUC_DOMAIN=internal.auth.meet.milesguard.com
# Enable Let's Encrypt
ENABLE_LETSENCRYPT=1
LETSENCRYPT_DOMAIN=meet.milesguard.com
LETSENCRYPT_EMAIL=[email protected]
# Timezone
TZ=Your/Timezone # e.g., Europe/Berlin
💡 Note: Replace [email protected] with your actual email address and set your correct timezone.
Step 4: Generate Passwords 🔐
Run the following script to generate necessary passwords:
./docker-jitsi-meet/gen-passwords.sh
This will populate your .env file with secure passwords.
Step 5: Systemd Service Setup 🛠️
Create a systemd service to manage your Jitsi Docker containers.
Create the jitsi.service File
Create a file named jitsi.service in ~/.config/systemd/user with the following content:
[Unit]
Description=Jitsi Docker Service
After=network.target docker.service
Requires=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/path/to/your/docker-jitsi-meet
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
[Install]
WantedBy=multi-user.target
💡 Note: Replace /path/to/your/docker-jitsi-meet with the actual path to your docker-jitsi-meet directory and (create the folder if it does not exists)
Enable and Start the Service
Enable the service to start on boot and start it immediately:
sudo systemctl enable jitsi.service
sudo systemctl start jitsi.service
Step 6: Create a User in Prosody 👤
If you’re using internal authentication, create a user in Prosody:
docker exec -it docker-jitsi-meet-prosody-1 prosodyctl --config /config/prosody.cfg.lua register username meet.milesguard.com password
Replace username and password with your desired credentials.
Step 7: Verify the Setup ✅
Open your web browser and navigate to https://meet.milesguard.com. You should see the Jitsi Meet interface.
Troubleshooting 🛠️
Restart the Service
If you encounter issues, restart the Jitsi service:
sudo systemctl restart jitsi.service
Check the Service Status
To check the status of the Jitsi service:
sudo systemctl status jitsi.service
Stop the Service
To stop the Jitsi service:
sudo systemctl stop jitsi.service
Conclusion 🎉
You’ve successfully set up Jitsi on your VPS using Docker and systemd services. This setup ensures secure video conferencing with full control over your data.
For any questions or assistance, feel free to contact us at MilesGuard.