### Install Cleanuparr from AUR on Arch Linux Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed_unraid= Instructions for installing Cleanuparr on Arch Linux using an AUR helper. It provides examples for both source and binary packages available in the AUR. ```bash $ yay -Sy cleanuparr ``` -------------------------------- ### Docker Run: Install Cleanuparr Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/quick_start This command installs and runs Cleanuparr using Docker. It maps ports, mounts a configuration volume, and sets environment variables for customization. Ensure the host path '/path/to/config' is accessible and appropriate for your system. ```docker docker run -d --name cleanuparr \ --restart unless-stopped \ -p 11011:11011 \ -v /path/to/config:/config \ -e PORT=11011 \ -e BASE_PATH= \ -e PUID=1000 \ -e PGID=1000 \ -e UMASK=022 \ -e TZ=Etc/UTC \ ghcr.io/cleanuparr/cleanuparr:latest ``` -------------------------------- ### Run Cleanuparr on Linux (Portable) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed_unraid= Instructions for installing and running the portable version of Cleanuparr on Linux. This includes downloading a zip file, extracting it, making the binary executable, and running it. The application can be accessed via a web interface. ```bash 1. Download the appropriate zip file from GitHub Releases: * `Cleanuparr-{version}-linux-amd64.zip` for x86_64 systems * `Cleanuparr-{version}-linux-arm64.zip` for ARM64 systems 2. Extract the zip file: unzip Cleanuparr-{version}-linux-amd64.zip cd Cleanuparr-{version}-linux-amd64/ 3. Make the binary executable: chmod +x Cleanuparr 4. Run Cleanuparr: ./Cleanuparr 5. Access the web interface at `http://localhost:11011` ``` -------------------------------- ### Install Cleanuparr on macOS (Installer) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed_unraid= Steps to install Cleanuparr using a native macOS installer (`.pkg` file). This method installs Cleanuparr as a system service that starts automatically. It requires manual user intervention to bypass macOS security warnings. ```bash 1. Download the appropriate `.pkg` installer from GitHub Releases: * `Cleanuparr-{version}-macos-intel.pkg` for Intel Macs * `Cleanuparr-{version}-macos-arm64.pkg` for Apple Silicon Macs 2. Double-click the downloaded `.pkg` file 3. When macOS shows a security warning, go to **System Settings → Privacy & Security** 4. Scroll down and click **"Open Anyway"** to proceed with installation 5. Follow the installation prompts 6. Cleanuparr will be installed as a system service and start automatically ``` -------------------------------- ### Custom Port and Base Path Configuration (JSON) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed This configuration example combines setting a custom port and a custom base path for Cleanuparr. This provides flexibility for complex network setups, allowing specific access routes and avoiding port collisions. ```json { "PORT": 8080, "BASE_PATH": "/apps/cleanup" } ``` -------------------------------- ### Run Cleanuparr on Windows (Portable) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed_unraid= Instructions for running the portable version of Cleanuparr on Windows. This involves downloading a zip file, extracting it, and running the executable. The application can be accessed via a web interface. ```bash 1. Download the `Cleanuparr-{version}-win-amd64.zip` from GitHub Releases 2. Extract the zip file to your desired directory (e.g., `C:\\Tools\\Cleanuparr\\`) 3. Run `Cleanuparr.exe` to start the application 4. Access the web interface at `http://localhost:11011` ``` -------------------------------- ### Docker Compose: Install Cleanuparr Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/quick_start This Docker Compose configuration defines a service for Cleanuparr. It specifies the image, container name, restart policy, port mappings, volume mounts for configuration, and necessary environment variables. ```yaml services: cleanuparr: image: ghcr.io/cleanuparr/cleanuparr:latest container_name: cleanuparr restart: unless-stopped ports: - "11011:11011" volumes: - /path/to/config:/config environment: - PORT=11011 - BASE_PATH= - PUID=1000 - PGID=1000 - UMASK=022 - TZ=Etc/UTC ``` -------------------------------- ### Example Download Client Category Names Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner Shows examples of category names that can be configured in a download client and referenced by Cleanuparr for applying specific seeding rules. These names must match exactly. ```text tv-sonarr ``` ```text radarr ``` ```text lidarr ``` -------------------------------- ### Directory Structure Example for Ignored Root Directory Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner Demonstrates a typical directory structure for media management applications and their download clients. This example helps in understanding how to correctly configure the 'Ignored Root Directory' setting to manage hardlinks and cross-seed setups. ```bash /data ``` ```bash ├── downloads ``` ```bash │ ├── torrents ``` ```bash │ └── cross-seed ``` ```bash ├── movies ``` ```bash └── shows ``` -------------------------------- ### Set up .NET SDK on FreeBSD Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Downloads and configures the .NET SDK for FreeBSD, specifically version v9.0.104-amd64-freebsd-14. It sets environment variables DOTNET_ROOT and PATH to point to the SDK installation, enabling .NET CLI commands. ```bash # Navigate to home directory cd ~ # Set up variables for cleaner commands DOTNET_VERSION="v9.0.104-amd64-freebsd-14" DOTNET_BASE_URL="https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download" # Download .NET SDK wget -q "${DOTNET_BASE_URL}/${DOTNET_VERSION}/dotnet-sdk-9.0.104-freebsd-x64.tar.gz" # Set up .NET environment export DOTNET_ROOT=$(pwd)/.dotnet mkdir -p "$DOTNET_ROOT" tar zxf dotnet-sdk-9.0.104-freebsd-x64.tar.gz -C "$DOTNET_ROOT" export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools ``` -------------------------------- ### Run Cleanuparr on macOS (Portable) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed_unraid= Instructions for running the portable version of Cleanuparr on macOS. This involves downloading a zip file, extracting it, making the binary executable, and running it from the terminal. The application is then accessible via a web interface. ```bash 1. Download the appropriate zip file from GitHub Releases: * `Cleanuparr-{version}-osx-amd64.zip` for Intel Macs * `Cleanuparr-{version}-osx-arm64.zip` for Apple Silicon Macs 2. Extract the zip file to your desired directory 3. Open Terminal and navigate to the extracted directory 4. Make the binary executable: `chmod +x Cleanuparr` 5. Run: `./Cleanuparr` 6. Access the web interface at `http://localhost:11011` ``` -------------------------------- ### Download Client Category Examples for Seeding Rules Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner_unlinked-download-settings= Provides examples of download client category names that can be used to apply specific seeding rules in Cleanuparr. These rules dictate when downloads within a category are removed. ```text tv-sonarr radarr lidarr ``` -------------------------------- ### Cleanuparr Configuration File (JSON) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed The primary configuration file for Cleanuparr is `cleanuparr.json`. This file allows users to specify the port on which the application runs and a base path for reverse proxy setups. It is essential for initializing the application and customizing its network access. ```json { "PORT": 11011, "BASE_PATH": "" } ``` -------------------------------- ### Cron Expression Examples for Download Cleaner Scheduling Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner_unlinked-download-settings= Provides examples of Quartz.NET cron expressions for scheduling the Download Cleaner. These expressions define the intervals at which the cleaner will run to process downloads. ```cron 0 0/5 * ? * * * - Every 5 minutes 0 0 * ? * * * - Every hour 0 0 */6 ? * * * - Every 6 hours ``` -------------------------------- ### Configure Cleanuparr as a Systemd Service on Linux Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed_unraid= This snippet shows how to set up Cleanuparr to run as a systemd service on Linux. It involves creating a service unit file, setting up a dedicated user, copying the executable, and enabling/starting the service. ```bash 1. Create a service file: sudo nano /etc/systemd/system/cleanuparr.service 2. Add the following content: [Unit] Description=Cleanuparr After=network.target [Service] Type=simple User=cleanuparr Group=cleanuparr ExecStart=/opt/cleanuparr/Cleanuparr WorkingDirectory=/opt/cleanuparr Restart=always RestartSec=5 Environment=PORT=11011 Environment=BASE_PATH= [Install] WantedBy=multi-user.target 3. Create a dedicated user: sudo useradd -r -s /bin/false cleanuparr 4. Move Cleanuparr to `/opt/cleanuparr` and set ownership: sudo mkdir -p /opt/cleanuparr sudo cp Cleanuparr /opt/cleanuparr/ sudo chown -R cleanuparr:cleanuparr /opt/cleanuparr 5. Enable and start the service: sudo systemctl enable cleanuparr sudo systemctl start cleanuparr ``` -------------------------------- ### Ignored Root Directory Example for Unlinked Downloads Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner_unlinked-download-settings= Demonstrates the configuration of an ignored root directory for unlinked download handling. This is useful in cross-seed setups to prevent valid hardlinks from being incorrectly identified as unlinked. ```bash /data ├── downloads │ ├── torrents │ └── cross-seed ├── movies └── shows ``` -------------------------------- ### Run Cleanuparr Application on FreeBSD Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Makes the compiled Cleanuparr binary executable and starts the application. It assumes the binary has been moved to `/example/directory/` and sets execute permissions before running it. The application defaults to port 11011. ```bash cd /example/directory chmod +x Cleanuparr ./Cleanuparr ``` -------------------------------- ### Clone and Build Frontend with npm Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Clones the Cleanuparr repository from GitHub and builds the frontend application using npm. It navigates to the frontend directory, installs dependencies using `npm ci`, and then runs the build command `npm run build`. ```bash # Clone the project git clone https://github.com/Cleanuparr/Cleanuparr.git cd Cleanuparr # Build the frontend cd code/frontend npm ci npm run build cd ../.. ``` -------------------------------- ### Custom Port Configuration (JSON) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed This JSON snippet demonstrates how to configure Cleanuparr to run on a custom port, overriding the default. This is useful for avoiding port conflicts or adhering to specific network configurations. ```json { "PORT": 8080 } ``` -------------------------------- ### Install FreeBSD Dependencies with pkg Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Installs necessary system packages for building Cleanuparr on FreeBSD. This includes Git, ICU, libinotify, libunwind, wget, Node.js, and npm. Ensures the basic development environment is ready. ```bash # Install basic dependencies pkg install -y git icu libinotify libunwind wget node npm ``` -------------------------------- ### Deploy Cleanuparr using Docker Compose Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed This `docker-compose.yml` file defines a Cleanuparr service for easier Docker management. It specifies the image, container name, restart policy, port mapping, volume mounts for configuration and downloads, environment variables, and a health check configuration to ensure the service is running correctly. ```yaml services: cleanuparr: image: ghcr.io/cleanuparr/cleanuparr:latest container_name: cleanuparr restart: unless-stopped ports: - "11011:11011" volumes: - /path/to/config:/config # Mount your downloads directory if needed - /path/to/downloads:/downloads environment: - PORT=11011 - BASE_PATH= - PUID=1000 - PGID=1000 - UMASK=022 - TZ=Etc/UTC # Health check configuration healthcheck: test: ["CMD", "curl", "-f", "http://localhost:11011/health"] interval: 30s # Check every 30 seconds timeout: 10s # Allow up to 10 seconds for response start_period: 30s # Wait 30 seconds before first check retries: 3 # Mark unhealthy after 3 consecutive failures ``` -------------------------------- ### GET /health/ready - Readiness Probe Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/health-checks Verifies that the application is ready to serve traffic. Ideal for Kubernetes readiness probes and load balancer health checks. ```APIDOC ## GET /health/ready - Readiness Probe ### Description Verify the application is ready to serve traffic. Used for Kubernetes readiness probes and load balancer health checks. Checks include database connectivity, file system access, and download client health. ### Method GET ### Endpoint /health/ready ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl http://localhost:11011/health/ready ``` ### Response #### Success Response (200) Indicates the application is ready to serve traffic. #### Error Response (503) Indicates the application is not ready to serve traffic. #### Response Example (No specific JSON response body documented, success is indicated by HTTP 200) ``` -------------------------------- ### Install Angular CLI Globally Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Installs the Angular CLI globally using npm. This tool is essential for building and managing frontend projects, including the Cleanuparr UI. ```bash npm install -g @angular/cli ``` -------------------------------- ### Reverse Proxy Base Path Configuration (JSON) Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/detailed This JSON snippet shows how to set a custom base path for Cleanuparr when running behind a reverse proxy. This allows the application to be accessed via a specific URL segment, organizing multiple applications under a single domain. ```json { "BASE_PATH": "/cleanuparr" } ``` -------------------------------- ### Example Ignored Downloads Patterns Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/general Illustrates various patterns that can be used to ignore specific downloads in Cleanuparr. These include torrent hashes, client-specific tags or categories, and tracker domains. ```text fa800a7d7c443a2c3561d1f8f393c089036dade1 tv-sonarr qbit-tag mytracker.com ``` -------------------------------- ### Cron Expression Examples for Download Cleaner Scheduling Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner Provides common Quartz.NET cron expressions for scheduling the Download Cleaner. These expressions define the frequency at which the cleaner runs, offering flexibility from every 5 minutes to every 6 hours. ```cron 0 0/5 * ? * * * ``` ```cron 0 0 * ? * * * ``` ```cron 0 0 */6 ? * * * ``` -------------------------------- ### GET /health - Liveness Probe Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/health-checks Performs a basic liveness check to verify the application is running and responsive. Suitable for Docker HEALTHCHECK and Kubernetes liveness probes. ```APIDOC ## GET /health - Liveness Probe ### Description Basic liveness check to verify the application is running and responsive. Used for Docker HEALTHCHECK and Kubernetes liveness probes. ### Method GET ### Endpoint /health ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl http://localhost:11011/health ``` ### Response #### Success Response (200) Indicates the application is healthy. #### Error Response (503) Indicates the application is unhealthy. #### Response Example (No specific JSON response body documented, success is indicated by HTTP 200) ``` -------------------------------- ### GET /health/detailed - Detailed Status Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/health-checks Provides a detailed JSON status of all application components for monitoring and debugging purposes. ```APIDOC ## GET /health/detailed - Detailed Status ### Description Provides detailed health status for monitoring and debugging. Returns a JSON object with the status of all components, including timing and detailed information. ### Method GET ### Endpoint /health/detailed ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl http://localhost:11011/health/detailed ``` ### Response #### Success Response (200) Returns a JSON object containing the detailed health status of all components. #### Response Example { "application": { "status": "healthy", "time_ms": 10 }, "database": { "status": "healthy", "time_ms": 50, "checks": [ "connected", "migrations_pending: 0", "schema_ok" ] }, "file_system": { "status": "healthy", "time_ms": 5, "checks": [ "config_dir_accessible", "working_dir_accessible" ] }, "download_client": { "status": "healthy", "time_ms": 20, "checks": [ "client1_available", "client2_available" ] } } #### Error Response (503) Indicates one or more components are unhealthy. ``` -------------------------------- ### Build Backend Application with .NET CLI Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Copies the built frontend assets into the backend project's `wwwroot` directory and then publishes the backend application. It uses `dotnet publish` with release configuration and self-contained deployment, outputting a single executable file to the `artifacts` directory. ```bash # Copy frontend build to backend mkdir -p code/backend/Cleanuparr.Api/wwwroot cp -r code/frontend/dist/ui/browser/* \ code/backend/Cleanuparr.Api/wwwroot/ # Build and publish the backend dotnet publish code/backend/Cleanuparr.Api/Cleanuparr.Api.csproj \ -c Release \ --self-contained \ -o artifacts \ /p:PublishSingleFile=true # Move to final destination mv artifacts/Cleanuparr /example/directory/ ``` -------------------------------- ### Download NuGet Dependencies Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Downloads required NuGet package files for FreeBSD into a temporary directory. It specifies runtime versions and fetches necessary packages like ASP.NET Core runtime and .NET Core runtime hosts. ```bash # Create NuGet directory mkdir -p /tmp/nuget # Set up variables for package URLs NUGET_BASE_URL="${DOTNET_BASE_URL}/${DOTNET_VERSION}" RUNTIME_VERSION="9.0.3" # Download required packages wget -q -P /tmp/nuget/ \ "${NUGET_BASE_URL}/Microsoft.AspNetCore.App.Runtime.freebsd-x64.${RUNTIME_VERSION}.nupkg" wget -q -P /tmp/nuget/ \ "${NUGET_BASE_URL}/Microsoft.NETCore.App.Host.freebsd-x64.${RUNTIME_VERSION}.nupkg" wget -q -P /tmp/nuget/ \ "${NUGET_BASE_URL}/Microsoft.NETCore.App.Runtime.freebsd-x64.${RUNTIME_VERSION}.nupkg" ``` -------------------------------- ### Configure NuGet Sources with .NET CLI Source: https://cleanuparr.github.io/Cleanuparr/docs/installation/freebsd Configures NuGet package sources for the .NET build process. It adds a local source pointing to the downloaded packages in `/tmp/nuget` and a remote source for GitHub packages, requiring user credentials for private repositories. ```bash # Add local NuGet source dotnet nuget add source /tmp/nuget --name tmp # Add GitHub NuGet source # Note: Generate a PAT at https://github.com/settings/tokens dotnet nuget add source \ --username \ --password \ --store-password-in-clear-text \ --name Cleanuparr \ https://nuget.pkg.github.com/Cleanuparr/index.json ``` -------------------------------- ### Ignored Download Patterns for Download Cleaner Source: https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner Illustrates patterns that can be used to ignore specific downloads from being cleaned by the Download Cleaner. These patterns include torrent hashes, client-specific tags/categories, and tracker domains. ```text fa800a7d7c443a2c3561d1f8f393c089036dade1 ``` ```text tv-sonarr ``` ```text qbit-tag ``` ```text mytracker.com ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.