TrailSnap is a free, open source photo & video editors project written in Python and released under AGPL-3.0. It has 914 GitHub stars, 113 forks and 40 open issues, and was last pushed 15 hours ago. On this registry it ranks #78 of 88 tracked projects in Photo & Video Editors, with 5 head-to-head comparisons available.

What is TrailSnap?

TrailSnap (行影集) is an AGPL-3.0, Python-based, self-hosted AI photo album that turns travel and everyday photographs into searchable, presentable memories, built for individuals and families who would rather run their photo library on their own NAS or server than hand it to a hosted service.

What it is

TrailSnap is an open-source photo album application written in Python and released under the AGPL-3.0 licence. It is distributed both as desktop installers and as Docker images, and its topic list places it squarely in the self-hosted and NAS ecosystem alongside the photo-gallery category, with a google-photos tag marking the hosted model it is measured against. The README frames the ambition plainly: every person, or at least every family, should eventually have a personal AI data centre, and the album is one of its most important sources of data because it holds the moments of a life.

The concrete problem it solves is that travel photographs are taken and then never revisited. TrailSnap reads the paper trail of a trip — train tickets, itineraries, scenic-spot and concert tickets — extracts the journey information from those images automatically, and turns it into travel journals, annual reports, footprint maps and albums that are ready to post. Its stated goal is to move a trip from "photographed" to something that can be kept, shown and shared, and to do so while the data stays genuinely with its owner: the libraries live on mounted folders and the metadata lives in the user's own PostgreSQL database.

Key capabilities

  • A footprint album (足迹相册) that plots uploaded photos on a map and offers list, map, timeline and track views, filterable by province, city and district.
  • Ticket recognition (车票识别) that uses OCR on photographs of train tickets and itineraries to extract trip information automatically.
  • An Agent that converses with a large model to generate a travel diary from a single instruction, paired with a cli command-line interface built so that AI can operate the application.
  • SKILL support for connecting platforms such as OpenClaw and Claude Code to run automated tasks, plus support for the MCP protocol.
  • An annual report (年度报告) that assembles a photo wall, cities visited, 5A-level scenic spots, an itinerary timeline and total route mileage for the year.
  • Face recognition, automatic scene classification into categories such as night scenes, pets, food and selfies, and smart search by person, image content or time.
  • Live photo support across iPhone, vivo, oppo and Xiaomi handsets, external folders registered as auto-scanned data sources, and a recycle bin for restoring deleted photos.

Who uses it and how

  • Households running a NAS or home server deploy the supplied docker-compose.yml, which starts a postgres service on a pgvector:pg18-trixie image, a trailsnap-server service and a separate ai service, with a local photo directory mounted at /app/Photos.
  • Operators on a LAN set TRAILSNAP_PUBLIC_URL to the host's local IP address so that the mobile app can discover the server automatically.
  • Users with dedicated graphics hardware can take the GPU acceleration path offered by the one-line install script.
  • People building AI workflows connect the album to agents through SKILL integrations and the MCP protocol rather than through the web interface alone.
  • Prospective users who do not want to deploy anything can try the hosted demo at https://demo.siyuan.ink with the account and password trailsnap.

Getting started

The simplest route is to download the installer for the relevant platform from the GitHub Releases page. Otherwise, run curl -fsSL https://trailsnap.cn/install.sh | bash on Linux, macOS or WSL2 (or irm https://trailsnap.cn/install.ps1 | iex in Windows PowerShell) to have Docker, an accelerated registry and the services configured automatically, or deploy manually with the provided Compose file.

How it compares

Among the tools named in the facts, the reference point is Google Photos, the hosted consumer service the project tags itself against. TrailSnap targets the same job of organising and rediscovering a photo library, but it runs on the user's own NAS or server under the AGPL-3.0, with originals on mounted directories and metadata in a PostgreSQL instance the operator controls, and it puts its emphasis on travel — ticket OCR, itineraries and annual travel reports — rather than on general-purpose backup alone.

When to use it — and when not

A self-hoster must be prepared to operate a PostgreSQL database with the pgvector extension, the application server, a separate AI service, and a configured large-model endpoint through AI_API_URL, since the AI features depend on it. Anyone looking for a zero-maintenance hosted album, or a team without the appetite to run those services, should not choose it. Two of the headline ideas in the README — automatic AI video VLOG generation and AI photo retouching — are still marked as to be developed (待开发), and the primary documentation is written in Chinese, so English-speaking operators should expect to lean on doc/README_en.md and the project website.

project readme (upstream, from github) — read inline
GitHub forks Docker Pulls Hits GitHub release (with filter) Docker Pulls Downloads

English | 中文

TrailSnap 是一个智能化的 AI 相册应用,致力于帮助用户轻松记录、整理和回顾自己的出行经历。通过强大的 AI 处理能力,让每一张照片和每一段旅程都成为值得珍藏的记忆。

未来每个人(至少每个家庭)都有一个属于自己的 AI 数据中心,而相册是数据中心的一个重要数据来源,它留存了你生活中的很多瞬间,TrailSnap 致力于将这些瞬间转化为有价值的记忆,它可以帮你默默地记录下相册里的车票、景点门票,可以帮你记录旅行中的所见所闻,可以帮你自动整理出可以发朋友圈的照片(甚至帮你准备好文案),可以帮你剪一段15s的短视频······。

把旅行从"拍过"变成"可留念、可展示、可分享"。TrailSnap 做的,是让每一段出行都值得珍藏。

所以,我给这个项目命名为 《行影集》,在这里你的数据才 "真正属于你"。



🎉 在线体验:不想自己部署?可以直接访问演示站体验完整功能 👉 https://demo.siyuan.ink(账号 / 密码均为 trailsnap)

✨ 核心特色

需求共创平台已独立开源至 TrailSnap-Feedback,其部署、数据库迁移、AI 对话和镜像构建在独立仓库维护。提交反馈。

  • 📷 智能相册: 足迹地图、人物识别、智能分类、OCR识别、智能搜索。
  • 🚆 行程记录: 特有的火车票、行程、景区/演唱会门票管理功能,自动识别票据信息。
  • 🤖 AI 赋能: 一句话让AI帮你生成旅行日记。
    • AI自动剪视频生成VLOG(待开发)
    • AI修图,自动识别高质量照片(待开发)

homepage

🧭 功能概览

功能 实现情况 描述
Agent √ 与AI大模型进行对话,一键生成旅行日记
cli √ 提供命令行界面,方便AI操作
SKILL √ 支持接入OpenClaw、Claude Code等平台,实现自动任务执行
车票识别 √ 支持识别照片中的火车票和行程单,自动提取行程信息
年度报告 √ 自动生成2025年的出行统计报告,包括照片墙、出行城市、出行景点、行程时间轴、线路里程等
AI分析 √ 使用大模型分析照片内容,生成描述和评分,做成电子画廊
那年今日 √ 查看往年今天的照片,按图片评分排序、自动播放往年值得回忆的照片
旅行日志 √ 支持用户手动输入或 AI 识别出的行程信息,生成旅行日志
点亮的城市 √ 查看所有上传的照片中出现的城市,点击城市可以查看该城市的所有照片
去过的景区 √ 统计去过的5A级景区,点击景区可以查看该景区的所有照片,也可以自定义景区位置,自动筛选在景区范围内的照片
添加外部文件夹 √ 可以添加外部文件夹作为数据源,TrailSnap 会自动扫描并索引其中的照片和视频
live photo √ 支持iphone、vivo、oppo、小米等手机型号
时间轴 √ 丝滑的时间轴滚动效果
足迹相册 √ 可以在地图上查看所有上传的照片,点击照片可以查看详情,也可以按省、市、区单独查看(支持列表视图、地图视图、时间轴视图、轨迹视图)
人脸识别 √ 支持识别照片中的人物,自动添加人物标签
场景智能分类 √ 支持根据照片中的场景自动分类,例如:夜景、宠物、美食、自拍等
智能搜索 √ 支持根据照片中的人物、画面内容、时间等进行搜索
标签 √ 支持手动添加和删除标签,也可以根据 AI 识别结果自动添加标签
条件相册 √ 支持根据标签、场景、人物、地点等条件筛选照片,生成自定义相册
智能相册 √ 支持根据照片中的内容自动生成相册,例如:"我和女朋友在海边的自拍"等

Todo List

  • 支持回收站功能,用户可以恢复已删除的照片。
  • 支持MCP协议,用户可以通过MCP协议与TrailSnap进行通信。
  • 支持skills,可以接入OpenClaw、Claude Code等平台。
  • 更丰富的行程管理功能,例如:支持演唱会门票、景区门票、酒店订单、电影票等。
  • 更全面的AI能力,例如:支持AI自动剪视频生成VLOG、支持AI修图,AI生成旅行日记等。

2025 年度报告

2025 相册年度报告

查看预览版

年度报告

🚀 快速开始

其他问题请查看软件官网:https://trailsnap.cn

桌面端安装包(最简单)

前往 Releases 页面,下载对应平台的安装包并安装即可。

Docker部署一键安装脚本

TrailSnap 提供一键安装脚本,自动完成 Docker 安装、镜像加速配置和服务部署。

Linux / macOS / WSL2:

curl -fsSL https://trailsnap.cn/install.sh | bash

Windows PowerShell:

irm https://trailsnap.cn/install.ps1 | iex

更多用法(非交互模式、GPU 加速、自定义端口等)请参考 安装文档。

Docker 手动部署(推荐)

  1. 确保已安装 Docker 和 Docker Compose。

  2. docker-compose

docker-compose.yml 配置文件(注意修改挂载路径为本地路径,不然无法扫描本地照片目录),具体可以参考 TrailSnap 文档 :

services:
  postgres:
    image: crpi-d7wuvvdylhqugyu2.cn-hangzhou.personal.cr.aliyuncs.com/siyuan044/pgvector:pg18-trixie
    restart: always
    environment:
      POSTGRES_DB: trailsnap
      POSTGRES_USER: trailsnap
      POSTGRES_PASSWORD: trailsnap
      POSTGRES_INITDB_ARGS: "--encoding=UTF8 --lc-collate=C --lc-ctype=C"
      PGDATA: /var/lib/postgresql/data/pgdata
    networks: [ app-network ]
    volumes:
      - ./pg_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U trailsnap -d trailsnap -p 5432"]
      interval: 5s
      timeout: 5s
      retries: 5
      start_period: 10s

  server:
    image: crpi-d7wuvvdylhqugyu2.cn-hangzhou.personal.cr.aliyuncs.com/siyuan044/trailsnap-server:latest
    restart: always
    expose: [ "8000" ]
    networks: [ app-network ]
    volumes:
      - ./data:/app/data
      - /path/to/your/photos:/app/Photos
    environment:
      - TZ=Asia/Shanghai
      - DB_URL=postgresql://trailsnap:trailsnap@postgres:5432/trailsnap
      - RAILWAY_DB_URL=postgresql://trailsnap:trailsnap@postgres:5432/railway
      - AI_API_URL=http://ai:8001
      - TRAILSNAP_ROOT_PATH=/api
      # 请替换为这台主机的局域网 IP,供 App 自动发现
      - TRAILSNAP_PUBLIC_URL=http://192.168.1.10:3180
    depends_on:
      postgres:
        condition: service_healthy

  ai:
    image: crpi-d7wuvvdylhqugyu2.cn-hangzhou.personal.cr.aliyuncs.com/siyuan044/trailsnap-ai:latest
    restart: always
    stop_grace_period: 15s
    expose: [ "8001" ]
    networks: [ app-network ]
    volumes:
      - ./data:/app/data
    environment:
      - TZ=Asia/Shanghai
    healthcheck:
      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8001/health-check', timeout=3)"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 30s

  frontend:
    image: crpi-d7wuvvdylhqugyu2.cn-hangzhou.personal.cr.aliyuncs.com/siyuan044/trailsnap-frontend:latest
    restart: always
    ports: [ "3180:80" ]
    depends_on: [ server ]
    networks: [ app-network ]

networks:
  app-network:
    driver: bridge
  1. 启动服务
docker-compose up -d

源码部署

源码部署

📚 文档

更多详细文档请参阅 TrailSnap 文档

🔍 其他

QQ交流群

微信交流群

扫码关注公众号回复“行影集”获取入群二维码

微信交流群

致谢

本项目90%以上的代码由AI生成

  • TRAE 本来不打算做完整的相册,奈何AI太强了,于是开了10$套餐年卡,从此告别手写代码.如果你的AI写代码能力一般,可以参考一下我的提示词
  • Claude Code 没钱用官方模型,用它来帮我提交代码,写写文档啥的
  • 豆包 满嘴胡话,但还是能提出建设性意见的
  • ChatGPT 用于教豆包做AI
  • InkTime InkTime 是一个可自托管的墨水屏电子相框。它用AI分析你的照片库,按值得回忆度打分,并按"历史上的今天"自动生成每日最具回忆价值的照片,让沉睡的记忆重新被看见

🌟 Star History

Star History Chart

🤝 贡献者

📖 贡献指南

欢迎提交 Pull Request!请阅读 贡献指南 了解开发环境设置、代码规范和提交流程。

Frequently asked questions

Is TrailSnap free to use?

TrailSnap is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does TrailSnap do?

TrailSnap (行影集) | AI-Powered open-source photo album for travel & life memories.(AI赋能的开源相册工具,珍藏旅行与生活点滴)

What is TrailSnap written in?

TrailSnap is primarily written in Python. Its source is publicly available at https://github.com/LC044/TrailSnap, and it has 914 GitHub stars.