Deploy Openinary
Openinary is a self-hosted Cloudinary alternative.
Openinary App
Just deployed
/app/data
Assets Storage
Bucket
Just deployed
Deploy and Host Openinary on Railway
Openinary is an open-source, self-hosted media processing platform. It handles on-the-fly image and video transformations via URL, built-in S3-compatible storage with automatic caching, smart optimization with modern codecs like WebP and AVIF, and a simple REST API with an admin dashboard.
About Hosting Openinary
Hosting Openinary involves running a Dockerized service that processes and serves media assets on demand. You'll need a persistent volume for caching, public assets, and the internal database. Once deployed, Openinary exposes a REST API that accepts URL-based transformation parameters for images and videos, handles format conversion, resizing, cropping, and compression automatically. Optionally, you can connect any S3-compatible storage backend, such as AWS S3 or Cloudflare R2, to store and serve your original media files at scale.
Common Use Cases
- On-the-fly image resizing, cropping, and format conversion (WebP, AVIF) for web and mobile applications
- Video optimization and thumbnail generation, including clip extraction and lightweight preview generation
- Centralized media asset management with an admin dashboard as a self-hosted alternative to services like Cloudinary or Imgix
Dependencies for Openinary Hosting
- Docker 20.x or later
- S3-compatible object storage (AWS S3, Cloudflare R2, or any compatible provider)
Deployment Dependencies
Implementation Details
After deployment, complete the initial setup by visiting /setup to create your admin account, then generate an API key from your profile settings. Example transformation URLs:
# Resize an image
GET /t/w_800,h_600/image.jpg
# Smart crop with face detection
GET /t/w_400,h_400,c_fill,g_face/portrait.jpg
# Video thumbnail extraction
GET /t/w_800,h_450,so_5,f_avif/video.mp4
# Extract a video clip (10s to 30s)
GET /t/so_10,eo_30/interview.mp4
To connect Cloudflare R2 as your storage backend, set the following environment variables in apps/api/.env:
STORAGE_REGION=auto
STORAGE_ACCESS_KEY_ID=your_r2_access_key
STORAGE_SECRET_ACCESS_KEY=your_r2_secret_key
STORAGE_BUCKET_NAME=your-bucket-name
STORAGE_ENDPOINT=https://your-account-id.r2.cloudflarestorage.com
STORAGE_PUBLIC_URL=https://your-custom-domain.com
Why Deploy Openinary on Railway?
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 Openinary 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.
Template Content
Openinary App
openinary/openinaryBETTER_AUTH_SECRET
32 characters long secret
Assets Storage
Bucket
