If you want to remove vocals from a song, isolate drums, or export several instrument tracks, sending audio to a third-party API is not your only option. Stem Separator is an open-source, self-hosted web application that runs the separation pipeline on your own machine, homelab, or NAS.
This tutorial uses the project's stable v1.0.0 release and Docker Compose. You will start the CPU version, verify its health endpoint, upload a supported audio file through the browser, and understand when the NVIDIA GPU configuration is appropriate.
TL;DR
Clone the repository, start the default Compose service, open http://localhost:7860, and upload an MP3, WAV, FLAC, M4A, AAC, OGG, or OPUS file. The default mode separates vocals and music. Stem Separator stores model weights in a named Docker volume and writes job output to ./data/output.
The important boundary is that this is local processing, not an anonymous public service. The application does not include built-in authentication or rate limiting, so keep it on localhost or a trusted LAN unless you add an authenticated reverse proxy.
Prerequisites
You need:
- Docker Engine with the Compose plugin
- Git
- At least 4 GB of available RAM for the default MDX-Net and Demucs models
- An audio file in one of the documented input formats
The CPU deployment includes FFmpeg in the image. You do not need to install Python, PyTorch, or FFmpeg on the host for this path.
The repository is MIT licensed and the stable release used here is v1.0.0. The project README is the source for the commands and configuration discussed below: paladini/stem-separator.
Start the CPU deployment
Clone the repository and build the service:
git clone --branch v1.0.0 https://github.com/paladini/stem-separator.git cd stem-separator docker compose up -d --build The service listens on port 7860. Open http://localhost:7860 in a browser.
The first build can take time because the image installs dependencies. The first separation can also take longer while the selected model downloads.
Verify the service before uploading audio
Check the container and its health endpoint:
docker compose ps curl -fsS http://localhost:7860/health A healthy response reports the detected device, whether FFmpeg is available, and the active and queued job counts. If FFmpeg is unavailable, the endpoint reports a degraded state instead of pretending that a separation can succeed.
Inspect the application logs while the first model is loading:
docker compose logs -f Stop following the logs with Ctrl+C. The container keeps running.
Run your first separation
In the web interface, select an audio file and choose a separation goal. The default Vocals & Music mode uses the curated MDX-Net Inst HQ 3 model and produces vocals and music tracks. The interface only exposes tracks that the selected model can produce, which avoids requesting outputs that the model cannot generate.
Choose an output format supported by the application:
- WAV for lossless PCM output
- FLAC for lossless compressed output
- MP3 at 320 kbps for a smaller deliverable
Submit the job and wait for the stages shown in the interface: preparing audio, loading the model, separating tracks, and exporting files. When processing finishes, preview tracks in the browser or download individual files and the ZIP archive.
The default Compose file maps the host directory ./data/output to /data/output in the container. That directory holds job state and exported tracks, so the results remain available when the container restarts. Model weights use the named volume stem-separator-models, which prevents a model from being downloaded again after every container recreation.
Understand the resource limits
The default Compose configuration is intentionally conservative:
services: stem-separator: environment: - STEM_SEPARATOR_MAX_UPLOAD_MB=250 - STEM_SEPARATOR_MAX_DURATION_MINUTES=30 - STEM_SEPARATOR_MIN_FREE_DISK_MB=500 - STEM_SEPARATOR_MAX_CONCURRENT_JOBS=1 - STEM_SEPARATOR_MAX_QUEUE_SIZE=5 - STEM_SEPARATOR_JOB_RETENTION_HOURS=24 These settings cap upload size and duration, reject jobs when disk space is too low, limit concurrent processing to one job, and bound the waiting queue. Completed or failed job folders are retained for 24 hours by default.
The default model is a practical CPU starting point. The repository also documents a BS-Roformer model of about 610 MB, recommended for an NVIDIA GPU because CPU processing can be slow. Model file size is not the same as runtime memory, so treat the RAM and VRAM guidance as a baseline, not a guarantee.
Use an NVIDIA GPU when it is available
The project provides a separate Compose override for NVIDIA CUDA. The host needs an updated NVIDIA driver and the NVIDIA Container Toolkit installation. Verify that Docker can see the GPU before starting Stem Separator:
docker run --rm --gpus all nvidia/cuda:12.6.3-base-ubuntu22.04 nvidia-smi Then start the GPU image with both Compose files:
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d --build The override replaces the CPU image, requests all GPUs, and keeps the same port and mounts. Do not run both stacks in the same checkout because both publish port 7860.
The Docker configuration supports CPU and NVIDIA CUDA deployments. The README does not claim verified Docker acceleration for Apple Silicon MPS/CoreML, AMD ROCm, Intel graphics, or Windows DirectML. If you need those paths, evaluate the native Python setup separately instead of assuming the Docker image will pass through the host accelerator.
Why this works
Stem Separator places a small web application in front of python-audio-separator. Its catalog maps friendly goals such as Vocals & Music to a verified model and a set of output tracks. The job manager validates the input, creates an isolated job directory, runs the engine, and exposes status and download endpoints.
That separation is useful operationally. A malformed filename or unsupported extension can be rejected before inference, and a low-disk condition can stop a job before it consumes more storage. Engine failures can return as actionable application errors rather than unfiltered stack traces.
Common failure modes
The health check is degraded
Check the logs and verify that the container has its bundled FFmpeg available. For a native Python installation, install FFmpeg and confirm that both ffmpeg and ffprobe are on PATH. A degraded health response is a signal to fix the media dependency before submitting a job.
The first run appears stuck
The first use of a model downloads its weights. Watch docker compose logs -f, check available disk space, and remember that the model cache is mounted at /data/models. Deleting the named volume forces the downloads again.
The process runs out of memory
Start with the default Vocals & Music model, reduce concurrency if you changed it, or choose the Force CPU option exposed by the application. The larger studio model and multi-instrument modes need more memory. A GPU does not remove the need to size the host and its VRAM correctly.
The browser cannot reach the service
Run docker compose ps and inspect the port mapping. If another application owns port 7860, change the host side of the mapping in a local Compose override, then use the matching browser URL. Keep the container port at 7860 unless you also change the health check and application configuration consistently.
Security and privacy boundaries
The README documents local processing, filename sanitization, isolated UUID job directories, and path-containment checks for downloads. These safeguards are not a complete deployment security model.
There is no built-in authentication or per-IP rate limiting. Do not expose this service directly to the public internet. If remote access is necessary, put it behind a reverse proxy with HTTPS, authentication, request-size limits, and rate limits. Also review the licenses and usage rights for the audio files and model weights you process.
FAQ
Does Stem Separator upload my audio?
The project is designed to process audio locally. In the Docker workflow, input files, model inference, and exports stay in the host's container volumes unless you add another integration yourself.
Can it separate any instrument?
No. Available tracks depend on the selected model. The documented catalog includes vocals, music, drums, bass, guitar, piano, and other tracks across different modes. The six-instrument Demucs mode is explicitly described as more experimental for guitar and piano and may produce bleed.
Do I need a GPU?
No. The CPU Compose file is the default. A compatible NVIDIA GPU can accelerate supported workloads, but it adds host driver and toolkit requirements.
How do I stop it without deleting results?
Run docker compose down. The named model volume and the ./data/output bind mount remain unless you explicitly remove them.
Takeaway
Stem Separator turns local audio stem separation into a repeatable Docker workflow: one Compose command, a browser interface, persistent model storage, bounded jobs, and explicit CPU/GPU tradeoffs. Start with the CPU deployment, verify /health, and move to the NVIDIA override only when the host prerequisites and memory budget are clear.
What would make a self-hosted separator more useful for your workflow: batch-folder processing, an authenticated multi-user mode, or a more detailed quality comparison between models?
AI assistance disclosure: AI assistance was used to organize and edit this tutorial. The commands, project behavior, limits, and security notes were checked against the public repository, its
v1.0.0release, and the current project documentation.

