---
title: "Deploy imgproxy | Open Source Image CDN with On-the-Fly Resizing"
description: "Resize and convert images on the fly from signed URLs"
category: "Other"
url: https://railway.com/deploy/6HKVuw
---

# Deploy imgproxy | Open Source Image CDN with On-the-Fly Resizing

Resize and convert images on the fly from signed URLs

**[Deploy imgproxy | Open Source Image CDN with On-the-Fly Resizing on Railway](https://railway.com/template/6HKVuw)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/6HKVuw/manifest.json

- **Creator:** katsuba.dev
- **Category:** Other
- **Total deploys:** 12

## Template content

### Console https://devicons.railway.app/minio

- **Source:** railwayapp-templates/minio-console
- **Start command:** `/bin/sh -c "exec console server --host 0.0.0.0 --port $PORT"`
- **Health check:** /login
- **Public domain:** Yes

### Bucket https://res.cloudinary.com/h5kvzw/image/upload/v1706062979/MINIO_Bird_vbtpet.png

- **Image:** minio/minio:RELEASE.2025-09-07T16-13-09Z
- **Start command:** `/bin/sh -c "exec minio server --address [::]:$MINIO_PRIVATE_PORT $RAILWAY_VOLUME_MOUNT_PATH"`
- **Health check:** /minio/health/ready

### Bucket Creator https://devicons.railway.app/minio

- **Image:** minio/mc:RELEASE.2025-08-13T08-35-41Z
- **Start command:** `/bin/sh -c "for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do /usr/bin/mc alias set minio ${MINIO_ENDPOINT} ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} && /usr/bin/mc mb --ignore-existing minio/${MINIO_BUCKET} && /usr/bin/mc anonymous set public minio/${MINIO_BUCKET}/public && exit 0; sleep 5; done; exit 1"`

### imgproxy https://cdn.derock.dev/imgproxy-logo.png

- **Image:** darthsim/imgproxy:v4.0.14
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host imgproxy on Railway

imgproxy resizes, crops and converts images on the fly from a signed URL. Store one original, serve every size and format from it — WebP and AVIF included — without a build step, a cron job or a folder full of thumbnails.

## About Hosting imgproxy

Four services that make a complete image pipeline: imgproxy itself, S3-compatible object storage for the originals, a web console to upload and browse them, and a one-shot initializer that creates the bucket on first boot. imgproxy reads from the bucket over the private network and is the only thing that needs to be fast.

URL signing is on, with a generated key and salt.

## Common Use Cases

- **User-uploaded avatars and photos**: One original per user, every size derived on request, with the source never exposed publicly.
- **Responsive images for a site or app**: `srcset` variants and modern formats generated on demand instead of at build time.
- **Replacing a paid image CDN**: The same transformation grammar on infrastructure you own, with a year-long cache TTL in front of it.

## Dependencies for imgproxy Hosting

### Deployment Dependencies

- [imgproxy v4.0](https://docs.imgproxy.net/) — the transformation server
- S3-compatible object storage on a Railway volume — the originals
- A web console for uploads, and a one-shot bucket initializer
- An imgproxy URL-signing helper in your application

### Implementation Details

**`IMGPROXY_KEY` and `IMGPROXY_SALT` are generated per deployment and URLs must be signed with them.** This is not optional decoration: without signing, anyone could point your instance at arbitrary sources and use it as an open resizing proxy. Every official imgproxy client library takes the key and salt and produces the signature; copy both from the service variables into your application.

imgproxy reads from the bucket through the private endpoint, so image bytes never leave the project on their way in.

`IMGPROXY_TTL` is one year, which is the right default for content-addressed URLs — change the transformation and you change the URL, so a long cache is safe.

`IMGPROXY_MAX_SRC_RESOLUTION` is 16.8 megapixels. Uploads larger than that are rejected rather than allowed to exhaust memory; raise it deliberately if you handle camera originals.

The initializer container creates the bucket and exits. A stopped container after the first deploy is expected.

The console has its own public domain and uses the object store's root credentials — it is a full storage administration UI, so treat that URL as privileged.

## Why Deploy imgproxy 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 imgproxy 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.

**Resources**: imgproxy is written in Go and idles under 100 MB, spiking per transformation; object storage and the console add a little more. On the order of $8–12 a month, with CPU the thing that scales with traffic.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — 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/6HKVuw
