Deploy Thumbor

On-demand image crop, resize and filter service with signed URLs

Deploy Thumbor

/data

Deploy and Host Thumbor on Railway

Thumbor is an open-source image service. You request an image through a URL such as /300x200/smart/example.com/photo.jpg, and Thumbor fetches the original, crops it (around detected faces and features when you ask for smart), resizes it, applies filters such as blur, watermark or format conversion, and returns the result.

About Hosting Thumbor

This template runs Thumbor 7.8.0 from the official ghcr.io/thumbor/thumbor image, pinned by version and digest, built from the public repo aalfath/thumbor-railway-template. One service answers on a public Railway domain with a /healthcheck route. Railway generates THUMBOR_SECURITY_KEY at deploy, and only URLs signed with it are served, so the service is not an open image proxy. The deploy form asks for nothing. A volume at /data caches downloaded originals, smart-crop focal points and rendered images, with age-based expiry and a size cap. Thumbor needs no database. It fits Railway's 0.5 GB Free-plan limit.

Common Use Cases

  • Serve thumbnails and responsive image sizes for a website or app from one original upload
  • Crop user photos around faces automatically for avatars, cards and previews
  • Convert images to WebP and apply filters on the fly instead of pre-generating every variant

Dependencies for Thumbor Hosting

  • The thumbor service, built from aalfath/thumbor-railway-template (official Thumbor 7.8.0 image)
  • A Railway volume at /data for the image cache

Deployment Dependencies

Implementation Details

After deploy, open https://YOUR-DOMAIN/healthcheck (it answers WORKING) and copy THUMBOR_SECURITY_KEY from the service's Variables tab. Build signed URLs with a Thumbor client library, for example libthumbor in Python:

from libthumbor import CryptoURL
path = CryptoURL(key="YOUR-KEY").generate(width=300, height=200, smart=True, image_url="example.com/photo.jpg")
# serve https://YOUR-DOMAIN + path

Unsigned /unsafe/ URLs are disabled. To limit which hosts Thumbor may fetch from, add THUMBOR_ALLOWED_SOURCES (comma-separated hostnames). Large sources are scaled down to 2560 px before cropping so one request stays under about 400 MB of RAM; with 1 GB or more you can raise THUMBOR_MAX_WIDTH and THUMBOR_MAX_HEIGHT and THUMBOR_ENGINE_THREADS. The repo README lists every optional setting. Put a CDN in front of the domain for heavy traffic.

Updates: when the template repo moves to a new Thumbor release, Railway shows an "update available" notice on your project. The changes are listed in the repo's CHANGELOG.md. The volume only holds a cache, so updates need no data migration.

Why Deploy Thumbor 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 Thumbor 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

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0