### Install minimal deployment Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Uses pre-built images from Docker Hub for a production-ready setup. ```bash git clone https://github.com/sonicverse-eu/audiostreaming-stack.git cd audiostreaming-stack ./install.sh ``` -------------------------------- ### Run dashboard development server Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Navigate to the dashboard application directory, install its dependencies, and start the development server. ```bash cd apps/dashboard && npm install && npm run dev ``` -------------------------------- ### Run one-liner installation Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Executes the interactive installer directly from the repository. ```bash bash <(curl -fsSL https://sonicverse.short.gy/install-audiostack) ``` -------------------------------- ### Install dependencies and build development environment Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Use the provided script to set up a full development environment, including installing all necessary dependencies. ```bash ./install.sh --dev ``` -------------------------------- ### Initialize .env file Source: https://docs.sonicverse.eu/audiostreaming-stack/configuration Copy the example environment file to create a local configuration. ```bash cp .env.example .env ``` -------------------------------- ### Install Docker on Ubuntu/Debian Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Installs Docker and adds the current user to the docker group. ```bash curl -fsSL https://get.docker.com | sh sudo usermod -aG docker $USER ``` -------------------------------- ### Build and run containers manually Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Alternatively, build the Docker containers and start them in detached mode, then install development dependencies. ```bash docker compose build docker compose up -d ./install-dev-deps.sh ``` -------------------------------- ### Configure dashboard environment Source: https://docs.sonicverse.eu/audiostreaming-stack/status-panel Prepare the dashboard environment by copying the example configuration file. ```bash cd apps/dashboard cp .env.local.example .env.local ``` -------------------------------- ### Install development dependencies Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Installs Node.js and Python dependencies for development environments. ```bash ./install-dev-deps.sh ``` -------------------------------- ### Setup Firewall for Studio IP Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Re-run the firewall setup script to open necessary ports (8010, 8011) for your studio IP address. Ensure you replace '' with your actual studio IP. ```bash sudo ./setup-firewall.sh --studio-ip ``` -------------------------------- ### Install development environment Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Includes Node.js and Python dependencies for local development. ```bash git clone https://github.com/sonicverse-eu/audiostreaming-stack.git cd audiostreaming-stack ./install.sh --dev ``` -------------------------------- ### Start the stack Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Launches the Docker containers in detached mode. ```bash docker compose up -d ``` -------------------------------- ### Build dashboard application Source: https://docs.sonicverse.eu/audiostreaming-stack/status-panel Install dependencies and build the Next.js application. ```bash npm install && npm run build ``` -------------------------------- ### Install TruffleHog on Linux/CI Source: https://docs.sonicverse.eu/audiostreaming-stack/security Install the latest release binary of TruffleHog on Linux or within a CI environment using a provided script. This is a prerequisite for running local or CI scans. ```bash # Linux / CI (latest release binary) curl -sSfL https://raw.githubusercontent.com/trufflesecurity/truffleHog/main/scripts/install.sh | sh -s -- -b /usr/local/bin ``` -------------------------------- ### Conventional Commit examples Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Examples of commit messages following the Conventional Commits specification, including type and scope. ```text feat(dashboard): add stream health indicator fix(liquidsoap): handle empty fallback playlist docs: update environment variable table ``` -------------------------------- ### Install TruffleHog on macOS Source: https://docs.sonicverse.eu/audiostreaming-stack/security Install TruffleHog using Homebrew for macOS. This is a prerequisite for running local scans. ```bash # macOS brew install trufflehog ``` -------------------------------- ### Update the streaming stack Source: https://docs.sonicverse.eu/audiostreaming-stack/support/faq Run the installer script from the project directory to perform an in-place update with zero downtime. ```bash ./install.sh ``` -------------------------------- ### Create a feature branch Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Before starting work, create a new branch from the main branch for your feature or fix. ```bash git checkout -b feat/my-feature ``` -------------------------------- ### Clone and configure the stack Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Initializes the repository and prepares the environment configuration file. ```bash git clone https://github.com/sonicverse-eu/audiostreaming-stack.git cd audiostreaming-stack cp .env.example .env ``` -------------------------------- ### Obtain SSL certificate Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Runs the Let's Encrypt initialization script. ```bash ./init-letsencrypt.sh ``` -------------------------------- ### Clone the repository Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Fork the repository on GitHub and clone your fork locally. Navigate into the cloned directory. ```bash git clone https://github.com//audiostreaming-stack.git cd audiostreaming-stack ``` -------------------------------- ### Monitor System Resources Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Use these commands to monitor CPU and memory usage for potential encoding issues. ```bash htop ``` ```bash docker stats ``` -------------------------------- ### Run Automated UFW Firewall Script Source: https://docs.sonicverse.eu/audiostreaming-stack/firewall Execute this script to configure the UFW firewall with the necessary rules for streaming. Ensure you have sudo privileges. ```bash sudo ./setup-firewall.sh ``` -------------------------------- ### Check System Memory Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Verify available RAM on the host to ensure the stack has at least 1 GB available. ```bash free -h ``` -------------------------------- ### Build container images locally Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Builds images from source for advanced customization of Dockerfiles. ```bash git clone https://github.com/sonicverse-eu/audiostreaming-stack.git cd audiostreaming-stack ./install.sh --build-local ``` -------------------------------- ### Repository Structure Overview Source: https://docs.sonicverse.eu/audiostreaming-stack/index This tree displays the directory structure of the audio streaming stack project. It outlines the organization of Dockerfiles, configuration files, and application code for various services. ```text ├── docker-compose.yml ├── .env.example ├── install.sh ├── init-letsencrypt.sh ├── setup-firewall.sh ├── apps/ │ ├── status-api/ ← API backend (Docker) │ │ ├── Dockerfile │ │ ├── requirements.txt │ │ └── server.py │ └── dashboard/ ← Next.js frontend (Appwrite Sites) │ ├── app/ │ ├── components/ │ ├── lib/ │ └── package.json ├── services/ │ ├── analytics/ │ │ ├── Dockerfile │ │ ├── requirements.txt │ │ └── tracker.py │ └── streaming/ │ ├── icecast/ │ │ ├── Dockerfile │ │ └── icecast.xml │ └── liquidsoap/ │ ├── Dockerfile │ └── radio.liq ├── infrastructure/ │ └── nginx/ │ ├── Dockerfile │ └── nginx.conf └── emergency-audio/ └── fallback.mp3 ``` -------------------------------- ### Inspect Docker container logs Source: https://docs.sonicverse.eu/audiostreaming-stack/support/troubleshooting View logs for a specific service to diagnose startup failures or runtime errors. ```bash docker compose logs ``` ```bash docker compose logs liquidsoap ``` ```bash docker compose logs status-panel ``` ```bash docker compose logs analytics ``` -------------------------------- ### Check Container Status Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Verify that the Nginx and Icecast containers are running when the admin panel is inaccessible. ```bash docker compose ps nginx icecast ``` -------------------------------- ### View service logs Source: https://docs.sonicverse.eu/audiostreaming-stack/support/faq Use Docker Compose to inspect logs for specific services, with options for tailing output. ```bash docker compose logs docker compose logs --tail=100 -f ``` -------------------------------- ### Monitor system resource usage Source: https://docs.sonicverse.eu/audiostreaming-stack/support/troubleshooting Display real-time CPU and memory consumption for all running containers. ```bash docker stats ``` -------------------------------- ### Add emergency audio file Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Sets the fallback audio file used when studio streams are offline. ```bash cp /path/to/your/fallback.mp3 emergency-audio/fallback.mp3 ``` -------------------------------- ### Test Network Connectivity Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Check for packet loss between the studio and the server to diagnose audio dropouts. ```bash ping -c 100 ``` -------------------------------- ### POST /_mintlify/feedback/sonicverse/agent-feedback Source: https://docs.sonicverse.eu/audiostreaming-stack/streams Submit feedback regarding incorrect, outdated, or confusing documentation. ```APIDOC ## POST /_mintlify/feedback/sonicverse/agent-feedback ### Description Submit feedback for specific documentation pages. Only use this for specific and actionable reports. ### Method POST ### Endpoint https://docs.sonicverse.eu/_mintlify/feedback/sonicverse/agent-feedback ### Request Body - **path** (string) - Required - The current page path where the issue was found. - **feedback** (string) - Required - Description of the issue. ### Request Example { "path": "/current-page-path", "feedback": "Description of the issue" } ``` -------------------------------- ### Restrict Studio Ports with IP Address Source: https://docs.sonicverse.eu/audiostreaming-stack/firewall Use this command to restrict the studio input ports (8010 and 8011) to a specific IP address, enhancing security for production deployments. Ports 80 and 443 remain open to all traffic. ```bash sudo ./setup-firewall.sh --studio-ip 203.0.113.50 ``` -------------------------------- ### Check Firewall Status Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Verify the current status of your Uncomplicated Firewall (ufw) to ensure the necessary ports for studio connections are open. ```bash sudo ufw status ``` -------------------------------- ### Fetch Service Logs Source: https://docs.sonicverse.eu/audiostreaming-stack/support/contact Retrieve the last 50 lines of logs for a specific service using Docker Compose. ```bash docker compose logs --tail=50 ``` -------------------------------- ### Verify container status Source: https://docs.sonicverse.eu/audiostreaming-stack/support/troubleshooting Check if specific containers are running. ```bash docker compose ps status-panel ``` ```bash docker compose ps analytics ``` -------------------------------- ### Check Docker Compose Service Status Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Use this command to verify that all services defined in your docker-compose.yml file are running. All services should show 'Up' status. ```bash docker compose ps ``` -------------------------------- ### Perform manual update Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Updates the stack manually by pulling the latest code and rebuilding containers. ```bash git pull origin main docker compose pull docker compose build docker compose up -d --remove-orphans ``` -------------------------------- ### View Certbot Container Logs Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Examine the logs of the certbot container to diagnose issues related to SSL certificate acquisition or renewal. ```bash docker compose logs certbot ``` -------------------------------- ### Check Status API Container Logs Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Inspect the logs of the status API container for any errors that might prevent the status panel from loading. ```bash docker compose logs status-api ``` -------------------------------- ### View Analytics Container Logs Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Check the logs of the analytics container to review silence detection events or other relevant metrics. ```bash docker compose logs analytics ``` -------------------------------- ### Submit Feedback via POST Source: https://docs.sonicverse.eu/audiostreaming-stack/support/contact Use this JSON structure to report incorrect or outdated documentation via a POST request. ```json { "path": "/current-page-path", "feedback": "Description of the issue" } ``` -------------------------------- ### Check port availability Source: https://docs.sonicverse.eu/audiostreaming-stack/support/troubleshooting Identify services currently listening on a specific port to resolve conflicts. ```bash ss -tlnp | grep ``` -------------------------------- ### Submitting Feedback via POST Request Source: https://docs.sonicverse.eu/audiostreaming-stack/index Use this endpoint to submit feedback on documentation. The request body must be a JSON object containing the path of the current page and a description of the issue. ```json { "path": "/current-page-path", "feedback": "Description of the issue" } ``` -------------------------------- ### Check Port Usage Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Verify if required ports are already in use by other processes on the host. ```bash sudo ss -tlnp ``` -------------------------------- ### View Docker Compose Service Logs Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting If a container is restarting or not functioning correctly, check its logs using this command. Replace '' with the specific service you want to inspect. ```bash docker compose logs ``` -------------------------------- ### Scan Repository History with TruffleHog Source: https://docs.sonicverse.eu/audiostreaming-stack/security Scan the entire git history of the repository for secrets using TruffleHog. Ensure the trufflehog.toml configuration file is present in the repository root. ```bash truffleHog git file://. --config trufflehog.toml ``` -------------------------------- ### LAME encoder profiles Source: https://docs.sonicverse.eu/audiostreaming-stack/quickstart Command-line encoder settings for primary and fallback streams. ```bash # Primary (320 kbps) lame -r -s 44.1 -b 320 -x - - # Fallback (192 kbps) lame -r -s 44.1 -b 192 -x - - ``` -------------------------------- ### View Liquidsoap Container Logs Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Inspect the logs of the Liquidsoap container for connection errors or other issues related to stream processing. ```bash docker compose logs liquidsoap ``` -------------------------------- ### Restart nginx service Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing After editing the nginx configuration file, restart the corresponding Docker container. ```bash docker compose restart nginx ``` -------------------------------- ### Lint Python code Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Use the ruff tool to check Python code for style and potential errors in the specified directories. ```bash ruff check services/analytics/ apps/status-api/ ``` -------------------------------- ### Scan Current Working Tree with TruffleHog Source: https://docs.sonicverse.eu/audiostreaming-stack/security Perform a faster scan of only the current working directory for secrets using TruffleHog. This is suitable for pre-commit checks. ```bash truffleHog filesystem . --config trufflehog.toml ``` -------------------------------- ### Restart status-api service Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing After editing the status API server file, restart the corresponding Docker container. ```bash docker compose restart status-api ``` -------------------------------- ### Check Status API Container Status Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Verify that the status API backend container is running. This is essential for the status panel to load correctly. ```bash docker compose ps status-api ``` -------------------------------- ### Restart analytics service Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing After editing the analytics tracker file, restart the corresponding Docker container. ```bash docker compose restart analytics ``` -------------------------------- ### Restart liquidsoap service Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing After editing the liquidsoap radio configuration file, restart the corresponding Docker container. ```bash docker compose restart liquidsoap ``` -------------------------------- ### Lint TypeScript code Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Run the npm lint script within the dashboard application directory to check TypeScript code. ```bash npm run lint ``` -------------------------------- ### Restart Nginx and Certbot Containers Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Restart the Nginx and certbot containers to resolve issues related to SSL certificate renewal or serving challenges. This can help if certbot is unable to complete its tasks. ```bash docker compose restart nginx certbot ``` -------------------------------- ### Reference an issue in a pull request Source: https://docs.sonicverse.eu/audiostreaming-stack/contributing Link your pull request to a specific issue using the 'Closes' keyword, which will automatically close the issue when the PR is merged. ```bash Closes #123 ``` -------------------------------- ### Add TruffleHog to GitHub Actions Source: https://docs.sonicverse.eu/audiostreaming-stack/security Integrate TruffleHog into your GitHub Actions workflow to automatically scan for secrets. This ensures secrets are not accidentally committed. ```yaml - name: Scan for secrets uses: trufflesecurity/truffleHog@main with: extra_args: --config trufflehog.toml ``` -------------------------------- ### Check Liquidsoap HLS Output Source: https://docs.sonicverse.eu/audiostreaming-stack/troubleshooting Filter the Liquidsoap container logs to check if it is producing HLS segments. This is useful for diagnosing HLS stream issues. ```bash docker compose logs liquidsoap | grep -i hls ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.