Product DocumentationProduct Documentation
Home
My Media for Alexa
Home
My Media for Alexa
  • My Media for Alexa

    • My Media for Alexa
    • Getting Started

      • Installation
      • Install on Windows
      • Install on Linux
      • Install on Raspberry Pi
      • Install with Docker
      • Getting Started
    • Pairing with Alexa
    • Watch Folders
    • Your Music Library
    • Playlists
    • Voice Commands
    • Now Playing
    • Settings
    • Playing Music Outside Your Home Network
    • Dashboard
    • Overrides
    • Sharing
    • iTunes & Apple Music
    • Devices
    • Migrating My Media to a New Computer
    • Audio Normalization
    • How Does My Media Choose Audiobook vs Album?
    • Webhook Integration
    • Frequently Asked Questions
    • Support
  • Troubleshooting

    • Troubleshooting
    • Troubleshooting: Alexa Responds But No Music Plays
    • Troubleshooting: Track Repeats and Then Stops
    • Network Shares and Mapped Drives (Windows)
    • Migrating My Media to a New Computer

Install with Docker

Use this method if you prefer containerized deployment.

Important Docker Requirements

My Media in Docker needs explicit port and volume mappings:

  1. Map TCP 52050 to 52050.
  2. Map TCP 52051 to 52051.
  3. Map a persistent host folder to /datadir.
  4. 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:

  1. Go to Settings → Network.
  2. In the IP Address field, enter your host computer's actual network IP (the one your Alexa devices can reach).
  3. 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

  1. 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.
  2. Pair My Media with your Amazon account in the web console.
  3. Add one or more watch folders under /medialibrary.
  4. Confirm Alexa playback after indexing completes.
Last Updated: 5/20/26, 8:56 PM
Prev
Install on Raspberry Pi
Next
Getting Started