Stream Content to Discord Using Kasm and Docker

Adrian Chrysanthou10 min read
Kasm Discord Screenshare Demo

Streaming to Discord is typically tied to a local desktop environment. You install the Discord desktop client, share your screen, and your machine becomes the broadcast source.

That works fine for casual use, but it becomes limiting when you want to stream from a server, a headless system, or a fully containerized environment. Developers, homelab users, and streamers often run their workloads remotely, yet Discord screensharing has historically been a local-only workflow.

This post introduces kasm-discord-screenshare, an open-source project that enables Discord screensharing with audio from inside a Kasm Workspace using Docker. The stream originates from the container, not your personal computer.

Project repository:
https://github.com/f00d4tehg0dz/kasm-discord-screenshare

The Problem

Discord’s native screenshare assumes:

  • A locally installed Discord client
  • A graphical desktop session
  • Direct access to audio and display devices

Running Discord inside a container is already non-trivial. Getting system audio to pass through to screenshare adds another layer of complexity. As a result, most people default to running Discord on their main machine, even if the content being streamed lives somewhere else.

This creates friction when you want a clean, isolated, reproducible streaming environment.

The Idea

Instead of forcing Discord to live on your local system, run it inside a container that already has:

  • A lightweight desktop environment
  • PipeWire for audio routing
  • Discord Screen Audio support
  • A browser and basic utilities

Kasm Workspaces provides the missing piece: a browser-accessible, containerized desktop platform.

By combining Kasm with a purpose-built Discord container, you get a remote desktop where Discord behaves like a normal desktop app and can screenshare with audio.

What is kasm-discord-screenshare

kasm-discord-screenshare is a preconfigured Kasm-compatible Docker image that includes:

  • Discord Desktop
  • PipeWire audio stack
  • discord-screen-audio
  • Desktop environment configured for Kasm

Once launched inside Kasm, you open Discord, join a voice channel, and use screenshare normally. The broadcast is sent directly from the container.

High-Level Architecture

  1. User connects to Kasm through a browser
  2. Kasm launches the custom workspace image
  3. Discord runs inside the container
  4. User joins a Discord voice channel
  5. Screenshare and audio stream from the container

Your local computer is only acting as a viewer of the Kasm session.

Requirements

  • Docker is installed on the host
  • Kasm Workspaces installed
  • Basic familiarity with Docker and containers
docker pull f00d4tehg0dz/kasm-discord-screenshare:latest

Adding the Image to Kasm

In the Kasm admin interface:

  1. Go to Workspaces
  2. Click Add Workspace
  3. Choose Docker Image
  4. Enter:
  5. Save and enable the workspace
f00d4tehg0dz/kasm-discord-screenshare:latest

The workspace will now appear in the user dashboard.

Launching Discord

After starting the workspace, open a terminal inside the container:

discord

Alternatively, launch Discord from the desktop shortcut if present.

Log in normally with your Discord account.

Starting Screenshare With Audio

  1. Join a Discord voice channel
  2. Click Share Screen
  3. Choose the entire screen or a specific window
  4. Ensure Sound is enabled

Audio is routed through PipeWire and discord-screen-audio, allowing viewers to hear system audio along with video.

Example Use Cases

  • Remote movie streaming
  • Watch parties
  • Application demos
  • Development walkthroughs
  • Presentations
  • Cloud-hosted broadcast environments

Extending the Image

You can easily add additional software by extending the Docker image.

Example Dockerfile:

FROM f00d4tehg0dz/kasm-discord-screenshare:latest

RUN apt-get update && \
    apt-get install -y vlc obs-studio firefox && \
    apt-get clean

Build the image:

docker build -t my-kasm-discord .

Use my-kasm-discord as your workspace image in Kasm.

Persisting User Data

To preserve Discord logins and settings between sessions:

  • Map a persistent volume to /home/kasm-user
  • Enable persistent profiles in Kasm workspace settings

This prevents reconfiguration every time the workspace is launched.

Limitations

  • GPU acceleration depends on the host configuration
  • Audio routing can vary by system
  • Discord updates may occasionally affect screen audio

These are inherent challenges of containerized desktop environments.

Why This Matters

This approach shifts Discord screensharing from a local desktop concern to an infrastructure-level capability.

You gain:

  • Portable streaming environments
  • Reproducible setups
  • Cleaner separation between the personal machine and the broadcast system
  • Easier automation and scaling

For developers, streamers, and homelab builders, this opens new possibilities for remote-first content streaming.

Closing Thoughts

Containerized desktops are reaching a point where they can replace many traditional desktop workflows. Running Discord with full screenshare and audio inside Kasm demonstrates how far this model has come.

If you experiment with this project or extend it in interesting ways, consider sharing your results or contributing back.

Repository: https://github.com/f00d4tehg0dz/kasm-discord-screenshare