Skip to content

Ampache, Caddy Proxy and SubsonicAPI-based App don't work #128

@chilcano

Description

@chilcano

Hi there.
I've deployed ampache and caddy using docker compose successfully.
Ampache works from its Web UI, however It doesn't work when trying to play/stream through any Subsonic API-based Android App. I only can browse songs, albums, etc.

My config is:

  1. Ampache Docker Compose: I've used the same docker-compose.yml available in this repo.
  2. Caddyfile
{
  http_port 8080
  https_port 8443

  log {
    output file /logs/caddy.log
  }
}

*.my-fqdn:8443 {
  log
  tls {
    dns duckdns {env.DNS_PROVIDER_TOKEN}
  }

  @ampache host ampache.my-fqdn
  handle @ampache {
    reverse_proxy ampache:80
  }
}
  1. SubsonicAPI app tested:
  • Substream - I can browse songs but I can not play/stream. Not error.
  • Ultrasonic - I can browse songs but I can not play/stream because when clicking in play, It stands in "buffering" and doesn't stop.

ultrasonic-buffering

I've tried next changes without success:

  1. Update the Caddyfile:
{
  http_port 8080
  https_port 8443

  log {
    output file /logs/caddy.log
  }
}

*.my-fqdn:8443 {
  log
  tls {
    dns duckdns {env.DNS_PROVIDER_TOKEN}
  }

  @ampache host ampache.my-fqdn
  handle @ampache {
    # Rewrite rules for Subsonic backend
    @rest path_regexp rest ^/rest/(.*).view$
    rewrite @rest /rest/index.php?action={re.rest.1}
    @rest-fake path_regexp rest-fake ^/rest/fake/(.+)$
    rewrite @rest-fake /play/{re.rest-fake.1}
    # Rewrite rule for Channels
    @channel path_regexp channel ^/channel/([0-9]+)/(.*)$
    rewrite @channel /channel/index.php?channel={re.channel.1}&target={re.channel.2}
    reverse_proxy ampache:80
  }
}
  1. Change the Ampache configuration using Ampache Web UI:
  • Preferences > Options > Subsonic > Force Subsonic streams to download from Off to On.
  • Preferences > Streaming > Enable URL Rewriting from Off to On.
  • Preferences > Streaming > Use an alternative playback action for streaming if you have issues with playing music from Off to On.

Also I've added my existing Navidrome proxied by the same Caddy Proxy to Ultrasonic app, I've disabled Jukebox by Default in Ultrasonic configuration and Ultrasonic app has worked smoothly.

I don't know what else to try. I appreciate your support and ideas on this.

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions