Skip to content

Self-hosted · Headless · Source-available

Media infrastructure you actually own.

Store, transform and deliver every image and video through one secure API. On your servers, under your domain, in every environment from dev to production. No per-transformation bill. No media leaving your infrastructure.

media.example.com — install
# Node.js 24+npm install @surge-media/corenpx surge-media init     # SQLite, PostgreSQL or MySQLnpx surge-media start# …or Docker (amd64 · arm64)docker run -d -p 3000:3000 \    -v surge-media-data:/app/data \    ghcr.io/mahmoud-nb/surge-media✔ Admin, API and media delivery ready

Runs on the stack you already trust

  • Node.js 24
  • Docker · amd64 & arm64
  • SQLite
  • PostgreSQL
  • MySQL / MariaDB
  • Local disk or S3
  • Sharp
  • FFmpeg

Why SurgeMedia

Everything a media platform should do. Nothing that locks you in.

The convenience of a media SaaS, the control of your own infrastructure. SurgeMedia gives your teams one place to manage media, and your applications one API to consume it.

Live in minutes, not sprints

npx surge-media init or a single Docker image. The CLI sets up your database, applies migrations and generates secrets. No build step, no third-party account to create.

Self-hosted, end to end

Your servers, your domain (media.your-company.com), your disk or S3-compatible bucket. Media never passes through a third party, which makes it ideal for GDPR and data-residency requirements.

The database you already run

SQLite out of the box for small teams and quick starts. PostgreSQL or MySQL / MariaDB for production at enterprise scale. Same package, same image, one variable.

One source of truth for every environment

Dev, staging and production read the same media library. Environment-tagged API keys per project: no more re-uploading assets or syncing buckets between stages.

Processing on demand

Resize, crop, focal point, AVIF and WebP: just change the URL, and Sharp does the work. Video renditions (H.264, AV1), posters and subtitles with FFmpeg, off the request path.

APIs locked down by design

Publishable and secret keys, scopes, expiry and rotation, CORS allow-lists, signed URLs and short-lived upload tokens. Project owners manage all of it, without filing a ticket with ops.

Roles that match your organization

Admin, Manager, Developer and Editor across the platform; Owner, Developer and Editor per project. Everyone gets exactly the access they need, two-factor authentication can be required, and sensitive actions are audited.

An admin your editors will enjoy

Upload, organize in folders, tag, filter, set focal points, generate URLs and HTML snippets. Light and dark themes, English and French, built to WCAG 2.2 AA.

An API documented from the code

An OpenAPI 3.1 specification generated from the routes, an interactive reference in the admin, and stable error codes in application/problem+json.

Centralized media

One library. Every environment.

Stop copying uploads from production to staging and losing them in between. Every environment of every application consumes the same media, each with its own keys.

Your applications

  • Developmentlocalhost:5173
  • Stagingstaging.acme.app
  • Productionwww.acme.com
  • Mobile & back-officeiOS · Android · CMS

SurgeMedia

  • REST API v1 — projects, media, folders, tags
  • URL transformations — /m/…
  • Video processing workers
  • Admin UI, roles & audit log

Your infrastructure

  • Your domain & TLS certificate
  • SQLite · PostgreSQL · MySQL
  • Local disk or S3-compatible storage
  • Your CDN, your cache rules
Your applications call one SurgeMedia instance, which runs on and stores to your own infrastructure.

On-the-fly transformations

Every size, every format. One URL away.

Upload the original once. SurgeMedia generates the variant your page asks for on the first request, keeps it, and serves it with immutable cache headers from then on.

<picture>
<source type="image/avif" srcset="https://media.example.com/m/k7d2m9qz/v3/w_800,h_450/hero.avif" />
<source type="image/webp" srcset="https://media.example.com/m/k7d2m9qz/v3/w_800,h_450/hero.webp" />
<img src="https://media.example.com/m/k7d2m9qz/v3/w_800,h_450/hero.jpg"
width="800" height="450" alt="Our new collection" />
</picture>

Installation

Install it your way

One npm package, one Docker image. Pick the database that fits today, and switch to PostgreSQL or MySQL as you grow.

Terminal window
# In the folder that will hold your configuration and data (Node.js 24+)
npm install @surge-media/core
npx surge-media init # choose SQLite, PostgreSQL or MySQL / MariaDB
npx surge-media start # admin, API and delivery on http://localhost:3000

Security & governance

Built for teams who get audited

Access control is not an add-on: it is how the API and the admin are designed.

SDKs

Works with any stack today. Native components on the way.

The REST API speaks to any language. MIT-licensed Vue components and a JavaScript client are on their way to npm, to make responsive images, videos and uploads a one-liner.

Fair-source pricing

Free for the vast majority. Fair for the rest.

The source code is public under the Business Source License 1.1. Production use is free for organizations under USD 500,000 in annual revenue.

Own your media pipeline, starting today.

Install SurgeMedia on your infrastructure in minutes. Development, testing and evaluation are free for everyone.