Install with Docker
Use this method if you prefer containerized deployment.
Important Docker Requirements
My Media in Docker needs explicit port and volume mappings:
- Map TCP
52050to52050. - Map TCP
52051to52051. - Map a persistent host folder to
/datadir. - Map your music library folder to
/medialibrary.
Port numbers should be preserved so Alexa devices can discover the service correctly.
1. Create a Data Directory
mkdir -p ~/.MyMediaForAlexa
2. Run the Container
Option A: Port Mapping (Bridge Networking)
This is the standard Docker approach and works on most systems:
docker run -d \
-p 52050:52050 \
-p 52051:52051 \
-v ~/Music:/medialibrary \
-v ~/.MyMediaForAlexa:/datadir \
--name mymedia \
bizmodeller/mymediaforalexa
Docker NAT and IP Configuration
Docker performs Network Address Translation (NAT) with bridge networking. The container sees its own internal IP (e.g., 172.17.0.2), but your Alexa devices need to reach the host's IP (e.g., 192.168.1.50).
After setup, configure the host IP in My Media:
- Go to Settings → Network.
- In the IP Address field, enter your host computer's actual network IP (the one your Alexa devices can reach).
- Click Save.
Without this step, Alexa will fail to discover My Media.
Option B: Host Networking (Simpler, No IP Configuration)
If your Docker host is not a NAS with restrictive networking, you can use host networking to avoid the IP configuration step:
docker run -d \
--network host \
-v ~/Music:/medialibrary \
-v ~/.MyMediaForAlexa:/datadir \
--name mymedia \
bizmodeller/mymediaforalexa
Host Network Benefits
With host networking, the container shares the host's network interface — no port mapping needed, and My Media automatically sees the correct IP. This is simpler but may not work on all NAS devices or systems with network policies.
3. Open the Web Console
From the Docker host or any device on your network:
http://<docker-host-ip>:52051
4. Manage the Container
docker ps
docker logs mymedia
docker stop mymedia
docker start mymedia
docker rm -f mymedia
Alternative: Docker Compose
If you prefer to manage the container with Docker Compose, create a docker-compose.yml file and run it instead of the command-line approach.
Create docker-compose.yml (Bridge Networking)
Create a file named docker-compose.yml with the following content:
version: '3.8'
services:
mymedia:
image: bizmodeller/mymediaforalexa
container_name: mymedia
restart: unless-stopped
ports:
- "52050:52050"
- "52051:52051"
volumes:
- ~/Music:/medialibrary
- ~/.MyMediaForAlexa:/datadir
Create docker-compose.yml (Host Networking)
If using host networking instead, use this version:
version: '3.8'
services:
mymedia:
image: bizmodeller/mymediaforalexa
container_name: mymedia
restart: unless-stopped
network_mode: host
volumes:
- ~/Music:/medialibrary
- ~/.MyMediaForAlexa:/datadir
Run with Docker Compose
# Start the container
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the container
docker-compose down
5. Complete Setup
- Configure the host IP (bridge networking only): If using Option A (port mapping), go to Settings → Network and set the IP Address to your host's network IP so Alexa can discover My Media correctly.
- Pair My Media with your Amazon account in the web console.
- Add one or more watch folders under
/medialibrary. - Confirm Alexa playback after indexing completes.
