---
title: "Deploy Openinary"
description: "Openinary is a self-hosted Cloudinary alternative."
category: "Other"
url: https://railway.com/deploy/openinary-1
---

# Deploy Openinary

Openinary is a self-hosted Cloudinary alternative.

**[Deploy Openinary on Railway](https://railway.com/template/openinary-1)**

- **Creator:** Florian's Projects
- **Category:** Other
- **Total deploys:** 22

## Template content

### Openinary App https://templates.dokploy.com/blueprints/openinary/openinary.svg

- **Image:** openinary/openinary
- **Health check:** /health
- **Public domain:** Yes

## Buckets

- **Assets Storage**

## Documentation

# 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

- [Openinary Docker Hub](https://hub.docker.com/r/openinary/openinary)
- [Openinary Documentation](https://docs.openinary.dev)
- [GitHub Repository](https://github.com/openinary/openinary)

### 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:

```bash
# 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`:

```bash
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.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/openinary-1
