# How to Update TrendRadar: A Complete Guide for Source, Docker, and MCP Deployments

> Easily update TrendRadar with our guide. Learn to pull source code from sansan0/TrendRadar, migrate config, and refresh Docker images for seamless deployment.

- Repository: [sansan/TrendRadar](https://github.com/sansan0/TrendRadar)
- Tags: how-to-guide
- Published: 2026-04-22

---

**Updating TrendRadar involves pulling the latest source code from the `sansan0/TrendRadar` repository, migrating your [`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml) to match any new schema requirements, and refreshing Docker images if running containerized deployments.**

This guide covers every update path for the TrendRadar open-source project, whether you run it directly from Python, use Docker Compose, or operate the optional MCP server. Each method preserves your existing reports and data while bringing in new features and security fixes.

---

## Update Methods Overview

TrendRadar supports three primary deployment patterns, each with its own update workflow:

| Method | Best For | Update Complexity |
|--------|----------|-----------------|
| **Source Code** | Development, customization | Low — `git pull` and config check |
| **Docker Compose** | Production, server deployments | Low — image pull and container recreate |
| **MCP Server** | AI/LLM integrations | Low — separate image update |

---

## Source Code Updates

The core Python application lives in the `trendradar/` directory with entry point at [`trendradar/__main__.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/__main__.py). When updating from source, you pull the latest commits and verify configuration compatibility.

### Step 1: Pull Latest Commits

```bash

# Navigate to your local repository

cd /path/to/TrendRadar

# Pull latest changes from master branch

git pull origin master

```

### Step 2: Verify Configuration Migration

Starting with **v2.0.0**, the configuration schema changed significantly. The legacy `push_window` and `analysis_window` top-level keys are no longer valid.

Open your configuration file and update to the new format:

```bash
nano config/config.yaml

```

**Old format (pre-v2.0.0):**

```yaml
push_window: 3600
analysis_window: 86400

```

**New format (v2.0.0+):**

```yaml
schedule:
  preset: always_on
  # or use: preset: fixed_window with explicit timing

```

The sample configuration at [[`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml)](https://github.com/sansan0/TrendRadar/blob/master/config/config.yaml) in the repository always reflects the current schema.

### Step 3: Verify Installation

```bash

# Run version check via module execution

python -m trendradar --version

```

---

## Docker and Docker Compose Updates

For containerized deployments, TrendRadar publishes images to Docker Hub as `wantcat/trendradar`. The Docker Compose orchestration is defined in [`docker/docker-compose.yml`](https://github.com/sansan0/TrendRadar/blob/main/docker/docker-compose.yml).

### Step 1: Pull Latest Images

```bash

# Pull the main TrendRadar image

docker pull wantcat/trendrador

# Or, using Docker Compose from the docker directory

cd docker
docker compose pull

```

### Step 2: Recreate Containers

Force recreation ensures new image layers are active and old environment doesn't persist:

```bash
cd docker
docker compose up -d --force-recreate

```

### Step 3: Verify Running Version

```bash

# Check container logs for version banner

docker logs trendradar

```

The [**[`docker/docker-compose.yml`](https://github.com/sansan0/TrendRadar/blob/main/docker/docker-compose.yml)**](https://github.com/sansan0/TrendRadar/blob/master/docker/docker-compose.yml) file includes service definitions for both the main application and persistent volumes for report storage.

---

## MCP Server Updates

The optional **Model Context Protocol (MCP)** server enables AI assistant integrations. It runs as a separate container image: `wantcat/trendradar-mcp`.

### Update the MCP Server

```bash

# Pull latest MCP image

docker pull wantcat/trendradar-mcp

# Recreate only the MCP service

cd docker
docker compose up -d mcp --force-recreate

```

The MCP server configuration is typically handled through environment variables in your Docker Compose override or `.env` file, separate from the main [`config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config.yaml).

---

## Data Preservation and Migration

Updating TrendRadar **does not delete existing data**. The following components persist across updates:

| Component | Location | Persistence Method |
|-----------|----------|------------------|
| HTML reports | [`output/index.html`](https://github.com/sansan0/TrendRadar/blob/main/output/index.html) and dated files | Host filesystem or Docker volume |
| SQLite database | `data/trendradar.db` (default) | Local file or configured S3 backend |
| User configuration | [`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml) | Manual migration required on schema changes |

The storage abstraction in [[`trendradar/storage/base.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/storage/base.py)](https://github.com/sansan0/TrendRadar/blob/master/trendradar/storage/base.py) handles both local SQLite and remote S3 backends, ensuring data portability across update scenarios.

---

## Troubleshooting Common Update Issues

### Configuration Validation Errors

If you see errors about missing keys after update, your [`config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config.yaml) likely uses the old schema:

```bash

# Validate your config against the sample

diff config/config.yaml config/config.yaml.sample

```

### Docker Image Pull Failures

```bash

# Force fresh authentication and pull

docker logout
docker login
docker pull wantcat/trendradar:latest

```

### Database Migration Issues

For major version jumps, manual SQLite migration may be required:

```bash

# Backup before any manual migration

cp data/trendradar.db data/trendradar.db.backup.$(date +%Y%m%d)

```

---

## Summary

- **Source updates** use `git pull origin master` followed by [`config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config.yaml) migration for v2.0.0+ schema changes.
- **Docker updates** pull `wantcat/trendradar:latest` and recreate containers with `docker compose up -d --force-recreate`.
- **MCP server updates** follow the same pattern using `wantcat/trendradar-mcp`.
- **All data persists** automatically — only configuration requires manual attention during schema changes.

---

## Frequently Asked Questions

### How do I know if my config.yaml needs migration?

Check for the `schedule:` key in your config. If you see top-level `push_window` or `analysis_window` keys instead, you're using the pre-v2.0.0 format and must migrate to the new schema documented in the sample [[`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml)](https://github.com/sansan0/TrendRadar/blob/master/config/config.yaml).

### Can I update TrendRadar without stopping my scheduled runs?

Yes. For Docker deployments, the `docker compose up -d --force-recreate` command performs a rolling-style restart with minimal downtime. For source deployments, the application only runs when explicitly invoked, so updates won't interrupt inactive schedules.

### What happens to my historical reports when I update?

Nothing — reports are preserved. The `output/` directory and its contents remain intact across updates. New runs simply append fresh reports. If you wish to clear old data, you must manually remove files from the output directory.

### Is the MCP server updated separately from the main application?

Yes. The MCP server (`wantcat/trendradar-mcp`) is a distinct Docker image with its own release cycle. While major versions typically align, you should pull and recreate the MCP service independently using `docker compose up -d mcp --force-recreate` to ensure you have the latest AI integration capabilities.