Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The current Ruby on Rails Getting Started guide shows a direct deployment path: build a Docker image, configure Kamal to reach a server and image registry, then run bin/kamal setup. For later releases, use bin/kamal deploy. Before exposing the app, also configure production data storage, provide Rails secrets securely, and decide how to handle background jobs, DNS, and HTTPS.

What this deployment path does

Kamal deploys a containerized Rails application directly to a server. The current Rails Getting Started guide uses this as its introductory deployment workflow; it is a starting point, not a universal architecture or a guarantee of capacity, uptime, or recovery.

New Rails applications include Docker support files intended as a starting point for production deployment. The generated production Dockerfile uses Thruster to compress and serve assets. Adapt the image and runtime configuration to the application’s dependencies, persistence requirements, traffic, and security needs. Rails 7.1 release notes also demonstrate building an image, mounting persistent storage, and passing RAILS_MASTER_KEY when running a container: Rails 7.1 release notes.

Prepare the server and image registry

The Rails walkthrough’s example calls for an Ubuntu LTS server with at least 1 GB of RAM and a Docker Hub account and token. That memory figure is the tutorial’s stated minimum for its example—not a sizing recommendation for every production app. The guide names Hetzner and DigitalOcean as possible providers, but does not compare their prices, regions, support, or service levels.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You will need a server address reachable by the deployment process, a registry where the image can be stored, and credentials that allow Kamal to publish or retrieve that image. Keep registry credentials out of committed configuration files.

Configure Kamal

In config/deploy.yml, set the application’s service and image names, server address, and registry details. Supply the registry token through an environment variable as shown in the Rails deployment walkthrough, rather than committing the token to the repository. Check the generated file and adapt it to your own hostnames, account, and deployment environment.

Point a domain to the server and enable HTTPS

If you want to use a domain, create or update its DNS record to point to the server. The guide’s Kamal example enables TLS with proxy.ssl: true and a host value. Kamal then uses Let’s Encrypt to issue a certificate for that domain. Confirm that DNS resolves to the intended server and that the configured host matches the domain before relying on the certificate setup.

Set up production data and credentials

Choose and configure a database

Rails accepts production connection settings through DATABASE_URL or config/database.yml. The Rails 7.2 configuration guide documents SQLite, MySQL/MariaDB, and PostgreSQL support, and notes that a busy production environment may overload SQLite. The right choice depends on workload and on how you will operate, back up, and monitor the database; the Rails guide does not establish a universal best option.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make the credentials key available safely

Rails credentials are encrypted, but the running application needs the decryption key. Rails documents config/master.key and the RAILS_MASTER_KEY environment variable as ways to provide it. Keep the key private and out of public source control; make it available to the production process through your deployment’s protected secret handling. See the Rails 7.0 security guide.

Deploy the application

  1. Review config/deploy.yml and set the server IP or address, image and registry details, and any domain and proxy settings you need.

  2. Make the registry token and Rails decryption key available to the deployment and application processes without committing either secret.

  3. From the application directory, run bin/kamal setup for the first deployment. This is the setup command used by the official Rails walkthrough.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. For subsequent releases, run bin/kamal deploy. Confirm the running application, domain routing, and HTTPS behavior in your environment after deployment.

The walkthrough demonstrates an approachable single-server path. It does not specify a general scaling strategy, backup policy, monitoring setup, or recovery objective, so those operational needs must be planned for the application rather than inferred from the example.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Decide how background jobs should run

The guide’s development :async job adapter holds pending jobs in memory; restarting the process loses them. Its production example uses Solid Queue, which stores jobs in the database and runs separately. The Kamal example enables Solid Queue in its configuration with SOLID_QUEUE_IN_PUMA: true. Follow the configuration appropriate to your Rails version and application rather than treating this example as a requirement for every deployment.

Check version-specific settings before release

Rails commands, defaults, and generated files can vary by version. The deployment walkthrough is current as checked on September 30, 2026; the supporting configuration and security references cited above are the Rails 7.2 and Rails 7.0 guides. Compare their instructions with your app’s Rails version and generated configuration before deploying.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.