Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xcoder-es/media-cleaner-pro/llms.txt

Use this file to discover all available pages before exploring further.

MediaCleaner Pro’s REST API ships with no authentication layer. It is intentionally designed as a localhost-only interface: the binary, the embedded frontend, and the API all run on the same machine, so no credentials are required to use any endpoint. Every feature — starting jobs, streaming progress, browsing directories — is available to any process that can reach the server.
The default binding address is SERVER_HOST=127.0.0.1. A 127.0.0.1 listener is only reachable from the local machine itself. Other devices on your network — even on the same Wi-Fi — cannot connect to it. This is the safest and recommended configuration for personal use.

Accessing the API from Another Machine

If you want to reach MediaCleaner Pro from a different device (for example, a tablet used as a remote control, or another workstation on your LAN), you can bind on all network interfaces by changing SERVER_HOST in the .env file:
SERVER_HOST=0.0.0.0
SERVER_PORT=8080
After restarting the binary, the API will accept connections on every network interface, making it reachable via the host’s LAN IP address (e.g. http://192.168.1.50:8080).
Binding to 0.0.0.0 exposes the API — with no authentication — to every device on your local network. Anyone who can reach that IP and port has full control over the pipeline, including the ability to start jobs, cancel jobs, and browse the local filesystem via /api/browse. If you are on an untrusted network (shared office, public Wi-Fi, guest network), place the API behind a firewall rule or a reverse proxy that adds authentication before enabling this setting.

Reverse Proxy with Basic Authentication (nginx)

A lightweight way to add password protection when exposing the API on a network is to front it with nginx and HTTP Basic Auth. The following configuration listens on HTTPS and requires a valid username/password before forwarding the request to MediaCleaner Pro:
server {
    listen 443 ssl;
    server_name mediacleaner.local;

    location / {
        auth_basic "MediaCleaner Pro";
        auth_basic_user_file /etc/nginx/.htpasswd;
        proxy_pass http://127.0.0.1:8080;
    }
}
Create the password file with:
htpasswd -c /etc/nginx/.htpasswd your_username
With this setup, MediaCleaner Pro itself continues to bind on 127.0.0.1:8080 (not reachable from the network directly), and all external access goes through nginx, which enforces the password check.

CORS Policy

The API enables CORS via the tower-http CORS layer. This is required so that the embedded frontend — which is served from the same origin as the API — can make requests in the browser without being blocked. The CORS policy is permissive by default. If you build a custom frontend running on a different origin or port (for example, a development server on http://localhost:5173), cross-origin requests to http://127.0.0.1:8080 will be allowed. No additional configuration is needed on the server side for local development workflows.
The simplest and most secure setup for home use is to leave SERVER_HOST=127.0.0.1 (the default) and access the MediaCleaner Pro UI from a browser on the same machine. You get full functionality with zero network exposure and no configuration required.

Supabase and Future Cloud Features

The mc-core domain model includes fields for UserId, TeamId, and SyncStatus, and the binary reads optional SUPABASE_URL / SUPABASE_KEY environment variables for future cloud and team-sync features. When those variables are configured, interactions with Supabase (remote job records, team collaboration) will use Supabase’s standard JWT-based authentication. However, the local REST API itself remains unauthenticated regardless of whether Supabase is configured. The Supabase credentials control only the optional cloud sync layer; they do not add any authentication requirement to the http://127.0.0.1:8080 endpoints described in this documentation.

Build docs developers (and LLMs) love