# Self-host mStream

> A lightweight personal music streaming server with a web player and mobile apps.

- Page: https://levelrail.com/templates/mstream/
- JSON: https://levelrail.com/templates/mstream.json
- Category: Media
- Licence: GPL-3.0-only (Copyleft license)
- Source: https://github.com/IrosTheBeggar/mStream
- Upstream docs: https://mstream.io/

## Requirements
- Memory: about 256 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 6.33.1

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| mstream | lscr.io/linuxserver/mstream | 6.33.1 | 3000 | config -> /config; music -> /music |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| mstream | PGID | preset |
| mstream | PUID | preset |
| mstream | TZ | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install mstream --name my-mstream
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain mstream=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/mstream/install \
  -d '{
    "name": "my-mstream"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Create the admin account on first visit, then upload music into the music volume.

## Questions

### Can I deploy mStream on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for mStream, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image lscr.io/linuxserver/mstream:6.33.1 is what you deploy there.

Self-host mStream, mStream docker compose file, deploy mStream on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
