What's New
New updates and improvements to Hatchbox.io
Updated asdf and prebuilt Rubies
ImprovementHatchbox servers now run asdf 0.20, the current Go version of asdf. Each server switches on its next deploy. Your installed languages, .tool-versions files and .asdf-vars keep working as before. Our build adds .asdf-vars support and is open source at hatchboxio/asdf.
Prebuilt Rubies. When your app needs a Ruby version the server doesn't have yet, Hatchbox now downloads it from hatchboxio/precompiled-ruby. It takes a couple of seconds. Versions without a prebuilt download are compiled on the server, as before.
The first deploy after a Ruby upgrade takes a little longer. Gems with native extensions, like bcrypt, puma and nio4r, are rebuilt for the new Ruby once. Later deploys skip that step.
If you use asdf in your own scripts. asdf 0.20 renamed a few commands:
asdf global ruby 3.4.4is nowasdf set -u ruby 3.4.4asdf localis nowasdf setasdf shellis gone; setASDF_RUBY_VERSION(orASDF_<TOOL>_VERSION) insteadasdf plugin-add,asdf plugin-listandasdf list-allare nowasdf plugin add,asdf plugin listandasdf list all
asdf exec, asdf install, asdf vars and the shims in ~/.asdf/shims work as before, including from cron jobs.
See the Ruby docs for the list of prebuilt versions.
PostgreSQL 19
NewPostgreSQL 19 is out, and Hatchbox now supports it.
New database servers start on 19. When you add a PostgreSQL server, Hatchbox installs PostgreSQL 19.
Upgrade your existing servers. If your database server runs an older version, there's an Upgrade button on its database page. Your extensions come with you, disk space is checked first, and the old data is kept until the new version is running. We recommend taking a backup before you upgrade.
A couple of exceptions. Ubuntu 20.04 servers stop at PostgreSQL 17, because 19 isn't packaged for 20.04. TimescaleDB doesn't have PostgreSQL 19 packages yet, so on a server with TimescaleDB the upgrade stops before changing anything and keeps your database running on its current version.
See the PostgreSQL docs for more.
Redis memory limit and eviction policy
NewYou can now set a memory limit and an eviction policy for self-hosted Redis and Valkey from the database's Settings tab.
- Memory limit (MB) caps how much memory Redis uses. Leave it blank for no limit, which is how your servers run today.
- When the limit is reached chooses what Redis does when it's full. You can pick any of Redis' eight policies, grouped by whether they evict any key or only keys with an expiry. Use Don't evict for Sidekiq, Action Cable or anything that can't lose data. Use an LRU or LFU policy for a cache.
Changes apply right away, without restarting Redis, and they're saved to Redis' config file so they last through restarts. If you already tuned these by hand on the server, saving changes only the setting you edited.
Be careful with eviction on a Redis that Sidekiq uses, because evicting keys can drop queued jobs. If you use Redis for both jobs and caching, consider a separate Redis for the cache.
We also fixed Redis failing to start after a reboot on servers with IPv6 disabled on loopback.
Safer PostgreSQL upgrades
ImprovementMajor PostgreSQL upgrades on your servers are now more reliable:
- Extensions come with you. If you've installed extensions like pgvector or PostGIS, the upgrade installs the new version's packages for them. Afterwards, it updates the extensions in each database. If an extension has no package for the new version, the upgrade stops before changing anything, names the package, and your database keeps running.
- Disk space is checked first. An upgrade copies your data, so it needs room for a second copy. Hatchbox now checks before it starts. If there isn't enough room, it tells you how much space you need, and the old version keeps running untouched.
- Your configuration carries over. Upgrades now copy Hatchbox's PostgreSQL config and access rules to the new version. Before, some upgrades failed safely and others left the new version listening on localhost only.
- Ubuntu 20.04 explains why it stops at 17. PostgreSQL 18 isn't packaged for 20.04, so the Upgrade button now says so and links to Upgrading Ubuntu server versions.
Security improvements
ImprovementWe spent part of November on security work across Hatchbox and your servers:
- SSH host key verification. Hatchbox records each server's SSH host key the first time it connects, and your jump server's key too. If a key later changes, Hatchbox refuses to connect and emails your account's admins. You can compare the new fingerprint on the server page and trust it if you rebuilt the server yourself.
- SSH key alerts. Admins now get a notification and an email when someone else adds, imports or removes an SSH key on your account.
- Key rotation removes the old key. Rotating a cluster's SSH key now removes the old key from your servers, not just adds the new one.
- Secrets are kept out of sight. SSL private keys, database passwords, Git connection tokens and two-factor secrets are now encrypted at rest. Environment variable values no longer appear in our request logs. DNS provider credentials, Redis passwords and passwords in failed commands are hidden in your server logs.
- Tighter permissions on your servers. Backup credentials and scripts can only be read by the deploy user.
/home/deployis no longer readable by other users on older Ubuntu releases. Each AWS server now has its own token for syncing its IP address. - Safer package installs. apt now checks package signatures on every install.
- Stronger PostgreSQL passwords. New servers use SCRAM password authentication. Existing servers switch on their next Update once none of their database users have an old md5 password. Resetting a user's password in Hatchbox converts it.
- Kernel exploit mitigation. Every server now drops TCP packets that carry IPv4 options. Nothing legitimate sends them, and they're the way in for a recent kernel vulnerability.
- Close port 22 to the world. Once you add a firewall rule that allows SSH from specific addresses, including Hatchbox's, you can remove the "SSH from anywhere" rule. Hatchbox won't add it back.
More improvements from November
ImprovementA roundup of smaller changes from the past few weeks:
Clusters and servers
- Add a server like this one. Each row of the cluster diagram ends with a + that opens the new-server form with the same size and roles. It only copies web, worker and app roles, so you don't end up with a second database or cron server.
- Clearer diagrams. Backend servers are split into worker and database rows. Every card shows its public IP, which you can click to copy. Full server names fit on the cards, and clusters with several load balancers show all of them.
- Uninstall a database engine from its Settings page. Before, the only way was unticking its role on the server.
- New servers start provisioning sooner, as soon as SSH answers.
- Fewer stuck OS updates. Hatchbox now clears a stuck Ubuntu background update that was holding apt's lock, and repairs broken packages.
- Custom cluster Caddyfiles can use
%{default}to add to the default config instead of replacing it, so you keep getting our updates. - One cron server per cluster. A second cron server ran every job twice, so clusters can no longer have one.
Apps and deploys
- Monorepos: set the subfolder when you create the app.
- Renamed or transferred GitHub repos keep deploying, and Hatchbox updates the repository's name on each deploy.
- A failing post-deploy script shows a warning instead of marking a live release as failed.
- Clearer failures. Deploys that run too long now say why and run your failed-deploy script. A server lost during a restart is named. A failed step names its command, with passwords kept out of the log.
- Crash loops are visible. A process's page warns when systemd keeps restarting it.
- Precompiled Ruby. If Hatchbox can't download one, the deploy log says so and Ruby is compiled on the server. A failed download no longer leaves a half-installed Ruby behind.
- Apps sharing a server no longer break each other's Bundler when they deploy at the same time.
- A failed app delete can be retried, and deleting an app now also removes its Git webhooks.
- Cron job names must now be unique within an app, since monitoring tells jobs apart by name.
Everything else
- Live deploy logs keep their status and last steps up to date.
- Browser notifications after a deploy work again.
- Support tickets can include formatting, screenshots and file attachments.
- On-demand backups and provisioning now keep running while Hatchbox itself deploys, instead of starting over.
- Your favorite apps are listed first in the app switcher, and the Deploy button is back on the Apps page.
AWS Lightsail and OVHcloud servers
NewYou can now create clusters on two more providers: AWS Lightsail and OVHcloud Public Cloud.
AWS Lightsail is AWS's flat-priced VPS. The disk, a public IP and 3–5 TB of transfer are included, so it costs about the same as DigitalOcean at each size ($12 for 2 GB, $24 for 4 GB), where EC2 ends up costing 1.5–2× that once you add those. If you need to be on AWS, it's now the cheaper way to get there. Your existing AWS clusters are now labelled AWS EC2 so the two are easy to tell apart.
OVHcloud costs about half of what DigitalOcean does at each size, bills hourly, and has regions in the US (Virginia and Oregon), Canada and Europe. Hatchbox puts each cluster's servers on their own private network on OVHcloud's vRack, and orders the vRack for you if your project doesn't have one yet.
We've also switched Vultr cluster templates to Vultr's High Performance plans: newer AMD EPYC or Intel Xeon CPUs on NVMe disks, priced the same as DigitalOcean's. You can still choose any plan when you add a server.
Prefer a dedicated server or a budget VPS host? Two new guides cover connecting them as custom servers.
Cluster metrics
NewDigitalOcean clusters now have a Metrics tab that shows every server in the cluster on one page, so you don't have to open each server's metrics in turn.
- Charts for CPU, memory, disk, load and bandwidth in and out, with one line per server.
- Deploy markers: each deploy shows up as a dashed line on the charts, so you can line a jump in CPU or memory up with the code that caused it. Failed deploys are red, and hovering a marker shows the app, who deployed it, and the commit.
- Filters: show or hide individual servers, or press a role like Worker to see only those servers.
- Current usage: a table of each server's CPU, memory, disk and load per CPU, along with its size. Bars turn amber at 70% and red at 90%.
Open any DigitalOcean cluster and click Metrics. Since the data comes from DigitalOcean's monitoring, the tab only appears on DigitalOcean clusters for now.
Define cron jobs in your repository
NewYou can now keep your app's cron jobs in your repository, in a .hatchbox/cron.yml file:
daily_report:
schedule: "0 3 * * *"
command: bin/rails runner 'Report.daily'
cleanup_sessions:
schedule: "@hourly"
command: bin/rails cleanup:sessions
Each deploy reads the file and syncs your cron jobs to match once the new release is live: changed jobs are updated, new jobs are added, and jobs you've removed from the file are deleted. Jobs you created in Hatchbox aren't affected. If one of them has the same name as a job in the file, the file takes it over, so it never runs twice.
If the file has a mistake, like invalid YAML, a bad schedule or an unknown key, the deploy stops before anything is built and tells you what to fix, including the line number.
Jobs from the file appear in their own section on your app's Cron Jobs page. AppSignal and Honeybadger check-ins are still set in Hatchbox, and they stay attached when you change a job's schedule or command.
Using whenever? It keeps working as before. Once you commit a .hatchbox/cron.yml, Hatchbox stops installing config/schedule.rb, so you can move your jobs over without anything running twice.
Safer deploys behind a load balancer
ImprovementWe've made a number of changes so deploys and outages on load balanced clusters don't take your site down:
- Deploys wait for each web server. On clusters with two or more web servers behind a load balancer, a deploy now restarts one web server at a time, waits for your app to answer on it, and only then moves on to the next. Before, they could all restart at once. If your app doesn't come up on a server within two minutes, the deploy stops there, the load balancer routes around that server, and the rest keep serving the previous release.
- Health checks are set up for you. Most Rails apps have a
/uproute, but few had it set as their health check. Hatchbox now checks for/upat the end of each deploy and turns it on when it answers. With a health check, the load balancer stops sending traffic to a server whose app has stopped responding. If the route later goes away, Hatchbox removes the health check again rather than taking your site down. - Dead servers are pulled faster even without a health check, and POST requests are no longer retried with an empty body.
- Maintenance mode stays up. On clusters with a dedicated load balancer, the maintenance page used to disappear after about 30 seconds and leave visitors with an empty error page. The load balancer now serves the maintenance page itself.
You don't need to do anything to get these changes. Each cluster picks them up on its next deploy.
Log retention
NewYou can now choose how long your servers keep their logs. Under Log retention in your cluster's Settings, pick 1, 3, 7, 14, 30 or 90 days.
It covers your app's output, Caddy's access logs, your app's own log files and the system journal. When you save the setting, Hatchbox applies it to every server in the cluster and deletes older journal entries right away. Rotated log files older than the limit are deleted at the next daily rotation.
The default is still no limit, and logs are still capped by size as before. The setting is useful if your privacy policy or a compliance requirement limits how long you can keep logs, since they can include IP addresses and other personal data.
Automatic reboots in maintenance windows
NewKernel updates, and some core library updates, only take effect after a server reboots. Until then, the server keeps running the old versions, security fixes included.
Maintenance windows can now reboot your servers for you. After each server's update, if an update asked for a reboot, Hatchbox reboots it, waits for it to come back with its services running, and then moves on to the next server. Your account's admins get a notification naming the servers it rebooted.
It's on for new windows. If you set up a window before November 21, tick Reboot servers when an update needs it under it in your cluster's Settings.
The Clusters and Apps pages now point out servers that have waited a week for a reboot, and your account's admins get one email if a server has waited two weeks.
Maintenance windows
NewYou can now choose a weekly hour when your app is quiet, and Hatchbox keeps your servers up to date in it.
Each week in your window, Hatchbox updates your servers one at a time, the same as clicking Update on each. It installs all package updates, including PostgreSQL, Redis and new kernels, along with the latest Caddy, Hatchbox's latest server configuration and your setup script. Only services that need it restart, and your apps aren't deployed.
Nightly security updates now run in your window's hour too, one server every 10 minutes, so their restarts don't hit every server at once.
Update: windows can now also reboot servers when an update needs it. See Automatic reboots in maintenance windows.
Set a window in your cluster's Settings. Read the docs for the details.
Ruby 4.0.10, 3.4.13, and 3.3.14 support
NewRuby 4.0.10, 3.4.13, and 3.3.14 are now precompiled and ready to deploy on Hatchbox.
These are security releases. They fix seven vulnerabilities in Ruby's regular expression engine and in string case conversion, and the Ruby team is aware of proofs of concept that use some of them for remote code execution. We strongly recommend upgrading as soon as possible. See the Ruby security advisory for more details.
Apps behind Cloudflare or a load balancer now receive the visitor's IP
ImprovementCaddy now hands your app the visitor's IP address as the only value in X-Forwarded-For, instead of the full proxy chain, so apps behind Cloudflare or an external load balancer get the real visitor in request.remote_ip, sessions, rate limiting and logs without any trusted proxy configuration of their own. Caddy also drops the client-supplied Forwarded and Client-IP headers, which vulnerability scanners were using to trigger IpSpoofAttackError 500s in Rails apps.
One thing to check: if your app inspected the last entry of X-Forwarded-For to confirm a request arrived through Cloudflare, that entry is no longer there. Two stronger options are a firewall at your provider that only allows ports 80 and 443 from Cloudflare's IP ranges, or a Cloudflare Transform Rule that adds a secret request header your app checks. Reach out to support if you'd like help setting either one up.
A small number of servers on Caddy builds older than 2.8 keep the previous X-Forwarded-For chain until Caddy is upgraded there.
jemalloc is on by default for new apps
ImprovementNew apps on native clusters now start with LD_PRELOAD=libjemalloc.so.2 in their environment variables, so Puma and Sidekiq run on jemalloc instead of glibc malloc. Rails apps typically see noticeably lower and flatter memory use with no code changes.
It's an ordinary environment variable, so you stay in control:
- Existing apps can opt in by adding
LD_PRELOADwith the valuelibjemalloc.so.2on the app's Environment Variables page. It takes effect on the next deploy or restart. - New apps can opt out by deleting the variable.
- Docker apps are unaffected. The Dockerfile owns the container environment, and Rails' default Dockerfile already sets jemalloc up.
The library is already installed on every Hatchbox server, so there's nothing to provision.
Smaller, single-file database backups
ImprovementDatabase backups are now written as a single compressed file per database rather than a dump inside a .tar.gz. A backup now needs about one compressed copy's worth of free disk instead of room for the dump and its tarball together. Postgres dumps also stop being compressed twice.
New backups are named:
- PostgreSQL:
<database>.dump, restore withpg_restore - MySQL:
<database>.sql.gz - Redis/Valkey:
<database>.rdb.gz - SQLite:
<database>.sqlite3.gz
Existing databases keep their current .tar.gz backups until you switch them. To switch, open the database, choose Backups → Configure and click Save. You don't need to change anything. New databases and backup settings use the new format automatically. If you use the API or MCP, updating a database's backup configuration does the same.
If you have scripts that look for *.tar.gz files in your bucket or in /home/deploy/backups, update them before you switch.
Each database page now has a How to restore this backup section under Backups, with the exact commands for your engine and server. Docker clusters get docker exec versions. Older .tar.gz backups still work and get their own restore steps.
PgHero query stats and a user per database
UpdateThis applies to PostgreSQL servers that Hatchbox installs, on regular and Dockerfile clusters. Managed DigitalOcean databases aren't affected.
Each database gets its own user
Until now, every database's user was a Postgres superuser. A superuser can read every other database on the server and run shell commands on it, so one leaked DATABASE_URL exposed everything on that server.
New databases now belong to their own user, without superuser. That user can still run your migrations and enable the common extensions, like pgcrypto, citext, hstore, pg_trgm and uuid-ossp. Existing databases keep the user they have.
Extensions that need a superuser, like postgis or timescaledb, can't be created from a migration anymore. Install them on the server and create them once as postgres. After that, enable_extension in your migrations finds the extension already there and moves on.
PostGIS
SSH into the database server and install the package for your PostgreSQL version (18 here), then create the extension in your app's database:
sudo apt install postgresql-18-postgis-3
sudo -u postgres psql -d your_database -c "CREATE EXTENSION postgis;"
TimescaleDB
Install it with Timescale's Ubuntu instructions. TimescaleDB also has to be preloaded, so add it next to pg_stat_statements, restart PostgreSQL, and create the extension:
sudo -u postgres psql -c "ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_statements', 'timescaledb';"
sudo systemctl restart postgresql
sudo -u postgres psql -d your_database -c "CREATE EXTENSION timescaledb;"
These steps are for regular clusters. Dockerfile clusters run the official postgres image, which doesn't include PostGIS or TimescaleDB.
PgHero query stats work out of the box
New PostgreSQL servers load pg_stat_statements, and each new database has it installed, so PgHero's Queries page works with no setup. Each app only sees its own queries.
On an existing server, click Update on the server's page to turn it on. This restarts PostgreSQL, so pick a quiet time. Then run CREATE EXTENSION pg_stat_statements; in each existing database you want stats for, or use PgHero's Enable button.
If you customized shared_preload_libraries
Hatchbox now sets shared_preload_libraries when it updates a PostgreSQL server. It keeps the libraries your server already loads and adds pg_stat_statements, so nothing you set is removed. Where you set your list matters:
- On the existing
shared_preload_librariesline inpostgresql.conf: nothing to do. Hatchbox copies your libraries intoconf.d/hatchbox.confnext topg_stat_statements. - At the end of
postgresql.conf, underCUSTOMIZED OPTIONS: your line still wins, sopg_stat_statementswon't load. Add it to your list, for exampleshared_preload_libraries = 'timescaledb,pg_stat_statements', and restart PostgreSQL. - With
ALTER SYSTEM, including on Dockerfile clusters: your setting wins as well. On a Dockerfile cluster, Hatchbox addspg_stat_statementsto your list for you. On other servers, include it in your ownALTER SYSTEMlist.
Questions? Email us.
Ruby 4.0.9, 3.4.12, and 3.3.13 support
NewRuby 4.0.9, 3.4.12, and 3.3.13 are now precompiled and ready to deploy on Hatchbox.
These are security releases. They fix memory corruption bugs in Ruby's regular expression engine that GitLab reported as CVE-2026-89078, CVE-2026-93577, CVE-2026-97229, and CVE-2026-110264. Apps that build regular expressions from user input should upgrade as soon as possible. See the Ruby announcement for more details.
Ruby 4.0.8 support
NewRuby 4.0.8 is now precompiled and ready to deploy on Hatchbox. This is a routine bugfix release. See the GitHub release notes for more details.