Deploy PeakCut

Self-hosted AI clipper turning long videos into captioned shorts

Deploy PeakCut

Just deployed

/data

/var/lib/postgresql/data

Deploy and Host self hosted PeakCut (AI/ML) on Railway

This template deploys PeakCut, an MIT-licensed, self-hosted AI video clipper, as a public web service with a private Postgres database.

About Hosting PeakCut open-source software on Railway (self hosted PeakCut template)

This template runs PeakCut, an MIT-licensed open-source AI video clipper, as two Railway services: the app and a private Postgres database.

This is independent community packaging of haziqahmedqasmi/PeakCut at commit b3e403e. It is not affiliated with or endorsed by PeakCut. YouTube, Instagram and TikTok are named only to describe sources and optional posting.

Why Deploy PeakCut, the self-hosted AI video clipper on Railway

A hosted clipping service charges a monthly subscription and keeps your videos and AI prompts on its servers, while self-hosting PeakCut puts the software, the clips and the database in your own Railway project.

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying PeakCut on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Railway vs Other Hosting Providers and VPS for PeakCut self hosting

Here is how Railway compares with common options for running PeakCut yourself.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanA template that deploys peakcut and a private Postgres service with volumes, HTTPS and a health check.A droplet you configure yourself, including Docker, ffmpeg, the proxy and backups.
AWSBoth services wired together from one template, with usage-based billing.Many services to assemble yourself, giving fine control but more setup and ops work.
HetznerManaged deploys, volumes and HTTPS handled for you.Servers with good CPU and RAM value, where you handle installation and patching.

Common Use Cases for hosted PeakCut

  • Highlight detection from long recordings: Paste a YouTube, Twitch or Kick link, or upload a long recording, and PeakCut transcribes the audio and picks the moments most likely to hold a viewer's attention. Without an AI key, it ranks moments by loudness instead.
  • Vertical reframing for short-form feeds: Each chosen moment is cut to 9:16, so a horizontal stream or interview fits a phone screen without you editing frame by frame.
  • Word-by-word captions: Captions are burned into each clip word by word, which suits viewers who watch with the sound off.
  • Batch clipping for a creator workspace: Queue several long videos in one session and let the jobs run in turn, then review the clips in your own library.
  • Optional posting to connected accounts: Once you have connected YouTube, Instagram or TikTok accounts, you can queue finished clips for posting, so the hosted instance handles the publishing step as well.

Dependencies for PeakCut Docker hosted on Railway

This template runs two services: the PeakCut app, public on port 8080, and a private bundled PostgreSQL database.

Deployment Dependencies for Managed PeakCut Service

The peakcut service is public on port 8080, mounts a volume at /data, and uses /healthz as its health check with a 600 second timeout and an Always restart policy. Postgres is private, stores its files under PGDATA on its volume, and uses the database name postgres. Keep one replica of each service. The discovery of clips runs in this app service; there is no separate worker.

Implementation Details for PeakCut

The image is ghcr.io/onepush-dev/peakcut:b3e403e: the upstream Dockerfile built unmodified at commit b3e403e, plus railway/serve.py and railway/start.sh. The wrapper converts DATABASE_URL to the postgresql+psycopg:// form, starts the server, waits for /healthz, then on first boot creates the owner account admin@peakcut.local via /api/auth/signup (authenticated with a bootstrap header) and grants admin with the upstream admin command. Public sign-up stays closed unless you set PEAKCUT_OPEN_SIGNUP=1. About 480 MB of speech model downloads into /data in the background on first boot, and the first job waits for it. Baked values include PEAKCUT_PORT=8080, PEAKCUT_DATA=/data, PEAKCUT_TRUST_PROXY=1, PEAKCUT_ACCOUNTS=1, PEAKCUT_OPEN_SIGNUP=0, PEAKCUT_ADMIN_EMAIL=admin@peakcut.local and PEAKCUT_UPDATE_CHECK=0. Video processing is CPU and RAM heavy; packaging guidance is several vCPUs and a few GB of RAM, not a Railway guarantee. YouTube may refuse downloads from data-centre IPs; uploads and Twitch or Kick links can still work. Without an AI key, highlights are picked by loudness only.

The peakcut service uses three template variables, all generated or referenced with no inputs:

  • DATABASE_URL, referenced from the bundled Postgres service and converted at boot.
  • PEAKCUT_PUBLIC_URL, which defaults to the Railway HTTPS domain. Change it if you add a custom domain.
  • PEAKCUT_ADMIN_PASSWORD, the password of the owner account, created on first boot.

The Postgres service provides POSTGRES_PASSWORD, DATABASE_URL, PGHOST, PGPASSWORD and PGDATA. Leave PGDATA as it is.

How does PeakCut compare against other tools

PeakCut vs a hosted clipping service (Hosted Clipping Alternative)

  • Data location: Your videos and clips stay in your own Railway volume rather than on a vendor's platform.
  • Cost model: You pay Railway for usage and any AI provider you choose, instead of a subscription; hosted services win on zero setup.
  • Customisation: The MIT source is yours to read and change, while a hosted service sets its own features and limits.

PeakCut vs a local PeakCut install (Local Install Alternative)

  • Always on: The Railway deployment keeps the web app and job queue reachable without a laptop left running.
  • Setup: Railway provides Postgres, an HTTPS domain and health checks, while a local install means managing Python, ffmpeg and the database yourself.
  • Local wins on iteration: A local install is simpler to debug and avoids network uploads for quick experiments.

PeakCut with Docker vs Railway (Docker Compose Alternative)

  • Docker Compose: You run the app, Postgres and a reverse proxy on a server you manage, with full host control.
  • Railway: The template wires peakcut and a private Postgres service together, with a /data volume and a /healthz check.
  • Scaling: Keep one replica of each service, since local persistent state lives in the volume; Compose on one server has the same limit.

How to use PeakCut on Railway?

  1. Open the public domain and sign in as admin@peakcut.local with the PEAKCUT_ADMIN_PASSWORD value from the peakcut Variables tab. This account is an admin at /admin.
  2. Change the email and password in Settings.
  3. Optional: add an AI key under Settings, AI (Gemini, OpenAI, Groq, OpenRouter, Anthropic and similar). Without a key, clips are picked by loudness only.
  4. Paste a YouTube, Twitch or Kick link, or upload a file. The first job waits until the speech model (about 480 MB) has downloaded.
  5. If you add a custom domain, update PEAKCUT_PUBLIC_URL.

Video processing is CPU and RAM heavy.

How to self host PeakCut on other VPS Services (PeakCut self hosting guide)

Clone the Repository

Clone the upstream repository at the pinned commit so your copy matches what the Railway template runs.

git clone https://github.com/haziqahmedqasmi/PeakCut.git peakcut
cd peakcut
git checkout b3e403e

Install Dependencies

Upstream expects Python 3.10 or newer and ffmpeg.

pip install -r requirements.txt

Alternatively, use the documented Docker Compose stack with Postgres and a reverse proxy; see the upstream README and DEPLOY.md.

Configure Environment Variables

Create a .env file next to the README.

PEAKCUT_ACCOUNTS=1
PEAKCUT_AI_PROVIDER=gemini
PEAKCUT_AI_MODELS=your-model-id
PEAKCUT_AI_KEY=your-key-here

Start the PeakCut Application

Start the server and open it in your browser, then sign in as your admin account.

python -m studio.server

Railway handles the domain, HTTPS, the persistent volumes and restarts for you, which you otherwise configure yourself on a VPS.

Pricing and License of PeakCut (PeakCut pricing)

PeakCut is MIT-licensed open-source software, so you can self-host it without paying a licence fee.

PeakCut hosted vs self hosted comparison (Pricing, features, costs, and more)

This template packages the MIT software pinned to commit b3e403e.

Monthly cost of self hosting PeakCut on Railway

Railway bills by usage, so the monthly cost depends on the RAM and CPU the peakcut service uses, the size of the volume at /data, and how many services run alongside it.

System Requirements for Hosting PeakCut on a VPS

PeakCut needs enough CPU and RAM to transcribe audio and render video with ffmpeg, plus disk for videos, clips and the roughly 480 MB speech model.

Frequently Asked Questions (FAQs)

How do I sign in to my PeakCut instance?

Open your public domain and sign in as admin@peakcut.local with the password from the PEAKCUT_ADMIN_PASSWORD variable on the peakcut service.

Can a stranger sign up on my PeakCut server?

No. Public sign-up stays closed unless you set PEAKCUT_OPEN_SIGNUP=1.

Do I need an AI key to use PeakCut?

No. Without an AI key, highlights are still picked by loudness only.

Why is the first job slow?

The speech model, about 480 MB, downloads into /data on first boot, and the first job waits until that finishes.

Why might a YouTube link fail?

YouTube sometimes refuses downloads from data-centre IPs, so a link can fail on Railway even when it works elsewhere.

What should I back up?

Back up the /data volume and the Postgres volume.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1