Portainer Templates logo

Portainer Templates

Lidify Lidify

Stack

Media

Self-hosted, on-demand audio streaming platform that brings the Spotify experience to your personal music library. Features music streaming, podcast subscriptions, audiobook integration, playlist generation, and Lidarr integration for music discovery.

Configuration

Type
Compose
Platform
linux
Source

Template by xneo1·Source

Services

lidify-backend

Configuration

Image
chevron7locked/lidify:latest
Ports
${BACKEND_PORT:-3006}:3006
Volumes
/music : ${MUSIC_PATH}/app/cache : /portainer/Files/AppData/Config/lidify/backend-cache/app/logs : /portainer/Files/AppData/Config/lidify/backend-logs
Env vars
DATABASE_URL=postgresql://${POSTGRES_USER:-lidifydb}:${POSTGRES_PASSWORD:-changeme}@lidify-postgres:5432/${POSTGRES_DB:-lidify}POSTGRES_USER=${POSTGRES_USER:-lidifydb}POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}POSTGRES_DB=${POSTGRES_DB:-lidify}REDIS_URL=redis://lidify-redis:6379PORT=3006NODE_ENV=${NODE_ENV:-production}SESSION_SECRET=${SESSION_SECRET:-changeme-generate-secure-key}SETTINGS_ENCRYPTION_KEY=${SETTINGS_ENCRYPTION_KEY:-}MUSIC_PATH=/musicTRANSCODE_CACHE_PATH=/app/cache/transcodesTRANSCODE_CACHE_MAX_GB=${TRANSCODE_CACHE_MAX_GB:-10}ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:3030}INTERNAL_API_SECRET=${INTERNAL_API_SECRET:-lidify-internal-secret-change-me}LIDIFY_CALLBACK_URL=${LIDIFY_CALLBACK_URL:-http://lidify-backend:3006}PODCAST_DEBUG=${PODCAST_DEBUG:-0}
Restart
unless-stopped

Image details

Pulls: 76.3k
User: chevron7locked
Created: Nov 30, 2025
Updated: 6 months ago
Status: active

lidify-frontend

Configuration

Image
chevron7locked/lidify-frontend:latest
Ports
${FRONTEND_PORT:-3030}:3030
Env vars
NODE_ENV=${NODE_ENV:-production}BACKEND_URL=${BACKEND_URL:-http://lidify-backend:3006}NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-}NEXT_PUBLIC_BUILD_TYPE=${NEXT_PUBLIC_BUILD_TYPE:-nightly}
Restart
unless-stopped

lidify-postgres

Configuration

Image
pgvector/pgvector:pg16
Volumes
/var/lib/postgresql/data : /portainer/Files/AppData/Config/lidify/postgres
Env vars
POSTGRES_USER=${POSTGRES_USER:-lidifydb}POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}POSTGRES_DB=${POSTGRES_DB:-lidify}
Restart
unless-stopped

Image details

Pulls: 148.5M
User: pgvector
Created: Jan 29, 2024
Updated: 2 days ago
Status: active

lidify-redis

Configuration

Image
redis:7-alpine
Volumes
/data : /portainer/Files/AppData/Config/lidify/redis
Restart
unless-stopped

Image details

Pulls: 11.1B
User: stackbrew
Created: Jun 05, 2014
Updated: 9 days ago
Status: active

lidify-audio-analyzer

Configuration

Image
chevron7locked/lidify-audio-analyzer:latest
Volumes
/music : ${MUSIC_PATH}
Env vars
REDIS_URL=redis://lidify-redis:6379DATABASE_URL=postgresql://${POSTGRES_USER:-lidifydb}:${POSTGRES_PASSWORD:-changeme}@lidify-postgres:5432/${POSTGRES_DB:-lidify}MUSIC_PATH=/musicBATCH_SIZE=${AUDIO_ANALYSIS_BATCH_SIZE:-10}SLEEP_INTERVAL=${AUDIO_ANALYSIS_INTERVAL:-5}BRPOP_TIMEOUT=${AUDIO_BRPOP_TIMEOUT:-30}MODEL_IDLE_TIMEOUT=${AUDIO_MODEL_IDLE_TIMEOUT:-300}NUM_WORKERS=${AUDIO_ANALYSIS_WORKERS:-2}THREADS_PER_WORKER=${AUDIO_ANALYSIS_THREADS_PER_WORKER:-1}
Restart
unless-stopped

lidify-audio-analyzer-clap

Configuration

Image
chevron7locked/lidify-audio-analyzer-clap:latest
Volumes
/music : ${MUSIC_PATH}
Env vars
REDIS_URL=redis://lidify-redis:6379DATABASE_URL=postgresql://${POSTGRES_USER:-lidifydb}:${POSTGRES_PASSWORD:-changeme}@lidify-postgres:5432/${POSTGRES_DB:-lidify}BACKEND_URL=http://lidify-backend:3006MUSIC_PATH=/musicSLEEP_INTERVAL=${CLAP_SLEEP_INTERVAL:-5}NUM_WORKERS=${CLAP_WORKERS:-2}THREADS_PER_WORKER=${CLAP_THREADS_PER_WORKER:-1}MODEL_IDLE_TIMEOUT=${CLAP_MODEL_IDLE_TIMEOUT:-300}INTERNAL_API_SECRET=${INTERNAL_API_SECRET:-lidify-internal-secret-change-me}
Restart
unless-stopped

Standalone Install

Select an install method, to see config/commands for deploying Lidify

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Lidify, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo
Original stackfile

The compose file this template deploys, straight from its repo:

version: '3.9'

services:
  lidify-backend:
    image: chevron7locked/lidify:latest
    container_name: lidify_backend
    restart: unless-stopped
    ports:
      - ${BACKEND_PORT:-3006}:3006
    environment:
      - DATABASE_URL=postgresql://${POSTGRES_USER:-lidifydb}:${POSTGRES_PASSWORD:-changeme}@lidify-postgres:5432/${POSTGRES_DB:-lidify}
      - POSTGRES_USER=${POSTGRES_USER:-lidifydb}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
      - POSTGRES_DB=${POSTGRES_DB:-lidify}
      - REDIS_URL=redis://lidify-redis:6379
      - PORT=3006
      - NODE_ENV=${NODE_ENV:-production}
      - SESSION_SECRET=${SESSION_SECRET:-changeme-generate-secure-key}
      - SETTINGS_ENCRYPTION_KEY=${SETTINGS_ENCRYPTION_KEY:-}
      - MUSIC_PATH=/music
      - TRANSCODE_CACHE_PATH=/app/cache/transcodes
      - TRANSCODE_CACHE_MAX_GB=${TRANSCODE_CACHE_MAX_GB:-10}
      - ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-http://localhost:3000,http://localhost:3030}
      - INTERNAL_API_SECRET=${INTERNAL_API_SECRET:-lidify-internal-secret-change-me}
      - LIDIFY_CALLBACK_URL=${LIDIFY_CALLBACK_URL:-http://lidify-backend:3006}
      - PODCAST_DEBUG=${PODCAST_DEBUG:-0}
    volumes:
      - ${MUSIC_PATH}:/music
      - /portainer/Files/AppData/Config/lidify/backend-cache:/app/cache
      - /portainer/Files/AppData/Config/lidify/backend-logs:/app/logs
    depends_on:
      lidify-postgres:
        condition: service_healthy
      lidify-redis:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "node", "healthcheck.js"]
      interval: 30s
      timeout: 10s
      retries: 3
    networks:
      - lidify-network

  lidify-frontend:
    image: chevron7locked/lidify-frontend:latest
    container_name: lidify_frontend
    restart: unless-stopped
    ports:
      - ${FRONTEND_PORT:-3030}:3030
    environment:
      - NODE_ENV=${NODE_ENV:-production}
      - BACKEND_URL=${BACKEND_URL:-http://lidify-backend:3006}
      - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-}
      - NEXT_PUBLIC_BUILD_TYPE=${NEXT_PUBLIC_BUILD_TYPE:-nightly}
    depends_on:
      - lidify-backend
    healthcheck:
      test: ["CMD", "node", "healthcheck.js"]
      interval: 30s
      timeout: 10s
      retries: 3
    networks:
      - lidify-network

  lidify-postgres:
    image: pgvector/pgvector:pg16
    container_name: lidify_db
    restart: unless-stopped
    environment:
      - POSTGRES_USER=${POSTGRES_USER:-lidifydb}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
      - POSTGRES_DB=${POSTGRES_DB:-lidify}
    volumes:
      - /portainer/Files/AppData/Config/lidify/postgres:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-lidifydb} -d ${POSTGRES_DB:-lidify}"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - lidify-network

  lidify-redis:
    image: redis:7-alpine
    container_name: lidify_redis
    restart: unless-stopped
    volumes:
      - /portainer/Files/AppData/Config/lidify/redis:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - lidify-network

  lidify-audio-analyzer:
    image: chevron7locked/lidify-audio-analyzer:latest
    container_name: lidify_audio_analyzer
    restart: unless-stopped
    environment:
      - REDIS_URL=redis://lidify-redis:6379
      - DATABASE_URL=postgresql://${POSTGRES_USER:-lidifydb}:${POSTGRES_PASSWORD:-changeme}@lidify-postgres:5432/${POSTGRES_DB:-lidify}
      - MUSIC_PATH=/music
      - BATCH_SIZE=${AUDIO_ANALYSIS_BATCH_SIZE:-10}
      - SLEEP_INTERVAL=${AUDIO_ANALYSIS_INTERVAL:-5}
      - BRPOP_TIMEOUT=${AUDIO_BRPOP_TIMEOUT:-30}
      - MODEL_IDLE_TIMEOUT=${AUDIO_MODEL_IDLE_TIMEOUT:-300}
      - NUM_WORKERS=${AUDIO_ANALYSIS_WORKERS:-2}
      - THREADS_PER_WORKER=${AUDIO_ANALYSIS_THREADS_PER_WORKER:-1}
    volumes:
      - ${MUSIC_PATH}:/music:ro
    depends_on:
      lidify-postgres:
        condition: service_healthy
      lidify-redis:
        condition: service_healthy
    deploy:
      resources:
        limits:
          memory: 6G
          cpus: '4'
        reservations:
          memory: 2G
    healthcheck:
      test: ["CMD", "pgrep", "-f", "python.*analyzer"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s
    networks:
      - lidify-network

  lidify-audio-analyzer-clap:
    image: chevron7locked/lidify-audio-analyzer-clap:latest
    container_name: lidify_audio_analyzer_clap
    restart: unless-stopped
    environment:
      - REDIS_URL=redis://lidify-redis:6379
      - DATABASE_URL=postgresql://${POSTGRES_USER:-lidifydb}:${POSTGRES_PASSWORD:-changeme}@lidify-postgres:5432/${POSTGRES_DB:-lidify}
      - BACKEND_URL=http://lidify-backend:3006
      - MUSIC_PATH=/music
      - SLEEP_INTERVAL=${CLAP_SLEEP_INTERVAL:-5}
      - NUM_WORKERS=${CLAP_WORKERS:-2}
      - THREADS_PER_WORKER=${CLAP_THREADS_PER_WORKER:-1}
      - MODEL_IDLE_TIMEOUT=${CLAP_MODEL_IDLE_TIMEOUT:-300}
      - INTERNAL_API_SECRET=${INTERNAL_API_SECRET:-lidify-internal-secret-change-me}
    volumes:
      - ${MUSIC_PATH}:/music:ro
    depends_on:
      lidify-postgres:
        condition: service_healthy
      lidify-redis:
        condition: service_healthy
      lidify-backend:
        condition: service_healthy
    deploy:
      resources:
        limits:
          memory: 3G
          cpus: '4'
        reservations:
          memory: 1G
    networks:
      - lidify-network

networks:
  lidify-network:
    driver: bridge

Or deploy it directly from the source:

git clone https://github.com/xneo1/portainer_templates
cd portainer_templates
docker compose -f Template/Stack/lidify.yml up -d

More install options in our documentation.

Container Documentation

lidify-postgres Documentation

Open-source vector similarity search for Postgres

lidify-redis Documentation

Redis is the world’s fastest data platform for caching, vector search, and NoSQL databases.

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs <container>
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /portainer/Files/AppData/Config/lidify/backend-cache (and the same for the other mapped folders)

Image won't pull

Test the pull directly on the host: docker pull chevron7locked/lidify:latest

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect <container> --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Stack won't deploy

Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.

  • YAML only accepts spaces for indentation, a single tab breaks the whole file.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A Compose stack

Lidify is a Compose stack, a set of containers (6 of them) defined in one file and brought up together by Portainer, then started and stopped as a single app.

The services

This stack is built from 6 containers that run side by side. Here's each one, with the image it runs and anything it waits for first:

  • lidify-backend runs chevron7locked/lidify:latest, starts after lidify-postgres, lidify-redis
  • lidify-frontend runs chevron7locked/lidify-frontend:latest, starts after lidify-backend
  • lidify-postgres runs pgvector/pgvector:pg16
  • lidify-redis runs redis:7-alpine
  • lidify-audio-analyzer runs chevron7locked/lidify-audio-analyzer:latest, starts after lidify-postgres, lidify-redis
  • lidify-audio-analyzer-clap runs chevron7locked/lidify-audio-analyzer-clap:latest, starts after lidify-postgres, lidify-redis, lidify-backend

Volumes

A volume is where Lidify keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /music kept in the ${MUSIC_PATH} volume Docker manages
  • /app/cache from /portainer/Files/AppData/Config/lidify/backend-cache on the host
  • /app/logs from /portainer/Files/AppData/Config/lidify/backend-logs on the host
  • /var/lib/postgresql/data from /portainer/Files/AppData/Config/lidify/postgres on the host
  • /data from /portainer/Files/AppData/Config/lidify/redis on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Lidify takes 25 of them, all with defaults you can leave alone or tweak:

  • DATABASE_URL, defaults to postgresql://lidifydb:changeme@lidify-postgres:5432/lidify
  • POSTGRES_USER, defaults to lidifydb
  • POSTGRES_PASSWORD, defaults to changeme
  • POSTGRES_DB, defaults to lidify
  • REDIS_URL, defaults to redis://lidify-redis:6379
  • PORT, defaults to 3006
  • NODE_ENV, defaults to production
  • SESSION_SECRET, defaults to changeme-generate-secure-key
  • SETTINGS_ENCRYPTION_KEY, pulled from your own environment
  • MUSIC_PATH, defaults to /music
  • TRANSCODE_CACHE_PATH, defaults to /app/cache/transcodes
  • TRANSCODE_CACHE_MAX_GB, defaults to 10
  • ALLOWED_ORIGINS, defaults to http://localhost:3000,http://localhost:3030
  • INTERNAL_API_SECRET, defaults to lidify-internal-secret-change-me
  • LIDIFY_CALLBACK_URL, defaults to http://lidify-backend:3006
  • PODCAST_DEBUG, defaults to 0
  • BACKEND_URL, defaults to http://lidify-backend:3006
  • NEXT_PUBLIC_API_URL, pulled from your own environment
  • NEXT_PUBLIC_BUILD_TYPE, defaults to nightly
  • BATCH_SIZE, defaults to 10
  • SLEEP_INTERVAL, defaults to 5
  • BRPOP_TIMEOUT, defaults to 30
  • MODEL_IDLE_TIMEOUT, defaults to 300
  • NUM_WORKERS, defaults to 2
  • THREADS_PER_WORKER, defaults to 1

Restart policy

The restart policy here is unless-stopped, so Docker restarts Lidify after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Networking

Portainer puts these services on one shared private network, so they can find each other by name (like lidify-backend) while only the ports above are open to you.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Lidify up. Add the template list to Portainer once, then deploying Lidify is a click rather than a wall of config.