- Home
- Frameworks
- Hanami
Hanami hosting on infrastructure you control
Deploy Hanami apps to servers you own
Hanami 2 is a fast, modular Ruby framework. Hatchbox deploys it the same way it has deployed Ruby apps since 2016 — git push, build, restart, no downtime.
Includes a 7 day free trial. $10 per server per month after that — unlimited apps.
Hatchbox spots Hanami in your Gemfile.lock and configures the deploy itself —
it installs your Ruby, bundles your gems, compiles assets, runs migrations, and sets
HANAMI_ENV=production for you. Nothing about your app has to change to make
it container-shaped first.
It's version-aware, too. Hanami 2.x builds use the bin/hanami CLI while 1.3
uses bundle exec hanami, and the steps that don't apply to your version are
skipped rather than failing the deploy.
Why deploy Hanami with Hatchbox
Built for Rack apps, not just Rails
Hatchbox doesn't assume Rails. Any Rack-compatible app — Hanami, Sinatra, Roda — deploys with the same build script and process model.
Assets and migrations, handled
Hatchbox runs bin/hanami assets compile and bin/hanami db migrate
on every deploy without being told to — and skips whichever your Hanami version predates.
Postgres, MySQL, or SQLite
Run a database on the same server for free, attach a managed database cluster, or
point DATABASE_URL anywhere you like.
Slice-friendly processes
Run separate processes for your web app and background work, each restarted automatically on deploy and on crash.
What customers say
I run 15+ Rails apps and static sites with Hatchbox. My bill went from $400/month on Heroku to $28/mo with Hatchbox & DigitalOcean combined.
Donn Felker
Software Professional
If you want the most bang for your buck, Hatchbox / Hetzner / DigitalOcean is the killer combo. You can throw sooo much at this and it's crazy how inexpensive it is.
Josh Pigford
Serial Entrepreneur
- Applications deployed
- 24,000+
- Deployments run
- 2 million+
- Deploying since
- 2016
How to deploy a Hanami app
Four steps from an empty server to a live site. Most people finish in under half an hour.
-
Connect a server
Provision a server through your hosting provider's API key, or bring an existing Ubuntu LTS machine.
-
Connect your repository
Pick the GitHub repo and branch holding your Hanami app. Auto-deploy on push is one checkbox.
-
Set your database URL
HANAMI_ENV=productionis set for you when Hanami is detected, soDATABASE_URLis usually the only variable you need to add. -
Deploy
Hatchbox bundles, compiles assets, migrates, and starts Puma. Watch it all in the streaming deploy log.
What Hatchbox does for you
Hatchbox detects Hanami from your Gemfile.lock and picks the right commands
for your version. There's no build script to write.
Build steps on Hanami 2.x
bin/hanami db migrate # skipped on 2.0–2.1, which shipped without database support
bin/hanami assets compile # skipped on 2.0, which shipped without asset compilation
Build steps on Hanami 1.3
bundle exec hanami db migrate
bundle exec hanami assets precompile
Environment variables
HANAMI_ENV is set automatically. Add the rest in Hatchbox and they're
written into every release.
HANAMI_ENV=production # set for you on detection
DATABASE_URL=postgres://user:pass@host/db_name
Hanami deployment questions
Still stuck? Ask us directly — a real person who has deployed a lot of Hanami apps will answer.
Gemfile.lock and runs the right commands for your version — bin/hanami on 2.x, bundle exec hanami on 1.3. Early 2.0 and 2.1 releases shipped without database support or asset compilation, and Hatchbox skips those steps rather than failing the build.
bin/hanami db migrate as part of every deploy, before the new release is promoted.
Simple, predictable pricing.
We charge per server, not per app. Run one application or twenty on the same box — the bill doesn't change.
$10
- Unlimited applications
- Deploy anywhere
- Zero downtime deployments
- Custom domains & free SSL
- Databases, cron jobs & background workers
- Full SSH access to your servers
- Real, human support
- 7 day free trial
Deploy more than Hanami
One server, one bill, as many apps as it can hold. Run any of these alongside your Hanami app for no extra cost.
- Ruby Deploy Ruby on Rails Rails deployment without the platform tax
- Ruby Deploy Bridgetown Bridgetown hosting with full server access
- Go Deploy Hugo Hugo hosting without the per-site pricing
- Ruby Deploy Jekyll Jekyll hosting with real server access
- Ruby Deploy Middleman Middleman hosting on your own infrastructure
- JavaScript Deploy Astro Astro hosting with no vendor lock-in
Ready to deploy your Hanami app?
Hatchbox has run more than 2 million deploys across 24,000+ applications since 2016. Start a 7 day free trial and put yours on a server you own.