# Production Linux Server Audit and Repair for a Data Subscription Site

> An audit of the single Ubuntu server behind a financial-data subscription site, a fix for its silently failed social-posting pipeline, and a documented setup so it can be maintained safely.

Section: Python Automation

Page: https://showcase.growlyze.cloud/case/python-production-vps-audit-and-pipeline-repair

## The Problem

A financial-data subscription site ran a Python backend, scheduled jobs, blog and email automation and a social-posting pipeline, all on one Ubuntu VPS. The social pipeline had silently died. The client needed an audit, a fix and a roadmap.

## What Was Done

- Audited the whole server (systemd units, cron, logs, nginx, gunicorn, the SQLite database and the backup job) and wrote a plain-English client report with a health score and prioritised fixes.
- Fixed the dead social pipeline with two targeted changes and stabilised the scheduling.
- Set up maintenance through a git mirror of /opt with a CLAUDE.md that describes the architecture, so Claude Code can work on it safely.

### How the system runs

A single source of truth: one SQLite database plus JSON outputs.

```plain text
20:00 ET  systemd timer  → nightly_pipeline.sh
                            ingest OHLC → run scanners → build JSON → DB backup to Drive (rclone)
                            → build newsletter + blog post (publish via WP REST API)
                            → send daily email (Brevo)
15:45 ET  systemd timer  → live_pipeline.py (real-time signals + options pricing)
always    systemd service → gunicorn Flask API :5500 behind nginx + Cloudflare Tunnel
cron      08:15 / 08:45 / every 15 min market hours / 21:00 → content engine renders PNG/MP4 cards and posts to IG / X / TikTok
```

**Built with**

Python, Flask, SQLite, systemd, cron, bash, nginx, gunicorn, Cloudflare Tunnel, rclone, JWT auth, Stripe, the WordPress REST API, Brevo and the Post for Me API.
