---
title: "Deploy Thumbor"
description: "On-demand image crop, resize and filter service with signed URLs"
category: "Other"
url: https://railway.com/deploy/thumbor-2
---

# Deploy Thumbor

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

**[Deploy Thumbor on Railway](https://railway.com/template/thumbor-2)**

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

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### thumbor https://raw.githubusercontent.com/thumbor/thumbor/7.8.0/logo-thumbor.png

- **Source:** https://github.com/aalfath/thumbor-railway-template
- **Health check:** /healthcheck
- **Public domain:** Yes

## Documentation

# 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

* Thumbor on GitHub: https://github.com/thumbor/thumbor
* Thumbor 7.8.0 release: https://github.com/thumbor/thumbor/releases/tag/7.8.0
* Thumbor documentation: https://thumbor.readthedocs.io/en/latest/
* Template repo: https://github.com/aalfath/thumbor-railway-template

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

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



## 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) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/thumbor-2
