# How to Update ReClip: A Complete Guide to Keeping Your Self-Hosted Downloader Current

> Update ReClip easily with our guide. Learn to pull the latest code, refresh dependencies, or use Docker for a seamless upgrade of your self-hosted downloader.

- Repository: [Avery Gan/reclip](https://github.com/averygan/reclip)
- Tags: how-to-guide
- Published: 2026-09-05

---

**Update ReClip by running `git pull origin main` to fetch the latest source code, then execute [`./reclip.sh`](https://github.com/averygan/reclip/blob/main/./reclip.sh) to automatically refresh Python dependencies including `yt-dlp`, or use `docker-compose build && docker-compose up -d` for Docker deployments.**

ReClip is a lightweight, self-hosted video and audio downloader built with a **Flask** back-end and a vanilla HTML front-end. According to the **averygan/reclip** source code, keeping the tool updated ensures you have the latest `yt-dlp` extractor capabilities and Flask security patches. Regular updates are essential because `yt-dlp` frequently changes to match evolving video platform APIs.

## Understanding ReClip's Update Architecture

Before updating, it helps to know which components change during an update. The repository contains several critical files that work together:

- **[`app.py`](https://github.com/averygan/reclip/blob/main/app.py)** – The Flask back-end that serves the UI and implements the download API (`/api/info`, `/api/download`). The `run_download` function orchestrates `yt-dlp` via subprocess calls.
- **[`reclip.sh`](https://github.com/averygan/reclip/blob/main/reclip.sh)** – The Bash wrapper that manages the Python virtual environment, installs dependencies, and automatically updates `yt-dlp` on startup (unless disabled).
- **[`templates/index.html`](https://github.com/averygan/reclip/blob/main/templates/index.html)** – The single-page front-end that communicates with the back-end via JSON API.
- **`Dockerfile` and [`docker-compose.yml`](https://github.com/averygan/reclip/blob/main/docker-compose.yml)** – Container definitions that mirror the Bash wrapper logic for Docker-based deployments.

Updates typically involve two parts: pulling the latest source code from GitHub and refreshing the Python dependencies (`yt-dlp` and `flask`).

## How to Update ReClip from Source

### Step 1: Pull the Latest Repository Code

Navigate to your ReClip directory and fetch the newest commits:

```bash
cd ~/reclip
git pull origin main

```

This command updates [`app.py`](https://github.com/averygan/reclip/blob/main/app.py), [`templates/index.html`](https://github.com/averygan/reclip/blob/main/templates/index.html), and [`reclip.sh`](https://github.com/averygan/reclip/blob/main/reclip.sh) with the latest UI improvements and back-end logic.

### Step 2: Execute the Update Script

Run the Bash wrapper to refresh dependencies and restart the service:

```bash
./reclip.sh

```

The script performs several actions as implemented in [`reclip.sh`](https://github.com/averygan/reclip/blob/main/reclip.sh) (lines 43-48):

- Checks for `python3`, `yt-dlp`, and `ffmpeg` on your system
- Creates a Python virtual environment (`venv/`) if it does not exist
- Installs `flask` and `yt-dlp` into the environment
- Executes `pip install -q -U yt-dlp` to upgrade the downloader to the latest release

After completion, the script launches the Flask server on the port defined by `$PORT` (default **8899**).

### Step 3: Force Update All Python Dependencies (Optional)

If you need to manually upgrade both `yt-dlp` and `flask` to specific versions, activate the virtual environment and run:

```bash
source venv/bin/activate
pip install -U yt-dlp flask

```

Remember to restart the Flask process after manual updates by stopping the current instance (Ctrl-C) and rerunning [`./reclip.sh`](https://github.com/averygan/reclip/blob/main/./reclip.sh).

## How to Update ReClip with Docker

For containerized deployments, you must rebuild the image to incorporate both code changes and dependency updates:

```bash
git pull origin main
docker-compose pull        # Optional: update base images

docker-compose build       # Rebuild with latest code and dependencies

docker-compose up -d       # Restart the container

```

The `Dockerfile` mirrors the Bash wrapper logic by creating a virtual environment and installing `yt-dlp` during the build phase. Rebuilding ensures the container contains the freshest `yt-dlp` extractor.

To force a complete dependency refresh without cache:

```bash
docker-compose build --no-cache
docker-compose up -d

```

## Verifying the Update

Confirm the update succeeded by checking the `yt-dlp` version inside the virtual environment:

```bash
source venv/bin/activate
yt-dlp --version

```

Alternatively, open the web UI (e.g., `http://localhost:8899`) and request video metadata for a known URL. If the UI loads and returns format information, [`app.py`](https://github.com/averygan/reclip/blob/main/app.py) and `yt-dlp` are functioning correctly.

## Summary

- Pull the latest source code with `git pull origin main` to update [`app.py`](https://github.com/averygan/reclip/blob/main/app.py), templates, and scripts
- Run [`./reclip.sh`](https://github.com/averygan/reclip/blob/main/./reclip.sh) to automatically create or refresh the virtual environment and update `yt-dlp`
- Set the environment variable `RECLIP_NO_UPDATE=1` before running the script to skip automatic `yt-dlp` updates
- For Docker deployments, rebuild with `docker-compose build` and restart to apply changes
- Verify updates by checking `yt-dlp --version` or testing the download API through the web interface

## Frequently Asked Questions

### How often should I update ReClip?

Update weekly or immediately when video downloads fail. Because `yt-dlp` extracts metadata from sites that frequently change their HTML structure, the extractor receives updates multiple times per week to maintain compatibility.

### What does the reclip.sh script do during an update?

The script checks for required system binaries (`python3`, `yt-dlp`, `ffmpeg`), initializes a Python virtual environment in `venv/` if missing, and executes `pip install -q -U yt-dlp` to fetch the latest extractor version according to the logic in [`reclip.sh`](https://github.com/averygan/reclip/blob/main/reclip.sh) (lines 43-48). It then launches [`app.py`](https://github.com/averygan/reclip/blob/main/app.py) to start the Flask server.

### Can I update ReClip without stopping the server?

No. You must terminate the current Flask process (using Ctrl-C or `kill <pid>`) before running [`./reclip.sh`](https://github.com/averygan/reclip/blob/main/./reclip.sh). The script launches a new server instance, and the updated code and dependencies only take effect when the new process starts.

### Why is my Docker deployment not using the latest yt-dlp?

Docker images bake dependencies into the image layers at build time, not runtime. If you only run `docker-compose up -d` without rebuilding, the container continues using the `yt-dlp` version from the original image. You must run `docker-compose build` (or `build --no-cache` for a clean slate) to install the latest `yt-dlp` release into the image.