> ## Content Index
> Fetch the complete content index at: https://www.jvrc.ca/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to deploy an existing Rails app for free
- URL: https://www.jvrc.ca/how-to-deploy-an-existing-rails-app-for-free/
- Published: 2026-07-16T20:09:00.000Z
- Updated: 2026-09-18T21:16:12.000Z
- Author: Javier Cervantes
- Tags: existing-topic, rubyforum

You want to know how to host your app for free, but you don’t want to spend half a day figuring out how to deploy it. Or you tried self-hosting with Kamal but couldn’t make it.

If you are starting an app from scratch, you can follow the previous tutorials for a step-by-step process:

- [Guide to deploy a Rails app (in less than 10 minutes)](https://www.jvrc.ca/guide-to-deploy-a-new-rails-app-in-less-than-10-minutes/)
- [How to deploy Ruby apps to the Miren demo cluster for free](https://www.jvrc.ca/how-to-deploy-ruby-apps-to-the-miren-demo-cluster-for-free/)

In most cases, you already have an application. This guide shows the full process of deploying a real-world Rails app ([toronto-ruby.com](http://toronto-ruby.com/?ref=jvrc.ca)) to Miren Club.

## About Miren Club

[Miren Club](https://miren.md/miren-club?ref=jvrc.ca) is a shared cluster where you can deploy something without setting up your own server. It’s great for demos, hack projects, or to get started. Later on, if you’d rather run Miren on your own machine, you can follow the guide on [How to self-host your Ruby apps](https://www.jvrc.ca/how-to-self-host-your-ruby-apps/).

## Pre-requisites

1. [Request access](https://miren.md/miren-club?ref=jvrc.ca#requesting-access) to the Miren Club.
2. [Get the miren CLI](https://miren.dev/get-started?ref=jvrc.ca)
3. Install [rv](https://rv.dev/?ref=jvrc.ca) by running the following command:

`curl -LsSf https://rv.dev/install | sh`

## Authentication

Once you have access, connect to Miren Club:

`$ miren login`

> *✓ Authentication successful!* 
>  
> *…*

`$ miren cluster add`

> *Select a cluster to bind:* 
>  
> *NAME ORGANIZATION ADDRESS* 
>  
> *▸ club Miren Club 34.27.122.56:8443 (+6)*

## Prepare the app

Download the code:

`$ git clone `[git@github.com](mailto:git@github.com)`:toronto-ruby/toronto-ruby.com.git`

Move to the project’s folder:

`$ cd toronto-ruby.com`

Copy the default configuration files

`$ cp ./config/database.yml.production ./config/database.yml`

`$ cp ./config/storage.yml.production ./config/storage.yml`

Create a `.miren/app.toml` configuration file with the following content:

```javascript
name = 'toronto-ruby.com'
post_import = ''
env = []
include = ['config/database.yml', 'config/storage.yml']

[addons.miren-postgresql]
variant = "small"
```

Install ruby and required dependencies:

`$ rv clean-install`

Use the following command to add the application credentials in an encrypted file:

`$ rv run rails credentials:edit --environment production`

Your editor will open the file, then add the following content:

```javascript
auth:
  user: YOU_ADMIN_USER
  password: YOUR_ADMIN_PASSWORD
  
admins: []
```

After you save the file and close it, it will create 2 files:

- production.yml.enc - You can commit and deploy this file.
- production.key - Keep safe, keep it secret.

Note: .gitignore will also include the new production.key so the Miren server won’t push it to the server.

## Deployment

Make an initial deployment to create the app in the cluster:

`$ miren deploy`

> *✓ Deploying:* [*toronto-ruby.com*](http://toronto-ruby.com/?ref=jvrc.ca) *→ club* 
> *✓ Upload artifacts (0.4s) - 698 B at 4.3 KB/s, reused 162/163 files (saved 969.2 KB, \~3m 43s)* 
> *✓ Build & push image (28.9s) - 17 steps completed* 
> *✓ Version w1o deployed — scaled to zero, no instance running right now (0.2s)* 
>  
> *No routes configured for this app.* 
> *To set a hostname, try: miren route set toronto-ruby-com.cluster-jwomf2l0tn8z.org-miren-club-djwhunl15a5n.miren.systems* [*toronto-ruby.com*](http://toronto-ruby.com/?ref=jvrc.ca)  
> *To make it the default route: miren route set-default* [*toronto-ruby.com*](http://toronto-ruby.com/?ref=jvrc.ca)

Configure a route for the app:

`$ miren route set toronto-ruby-com.cluster-jwomf2l0tn8z.org-miren-club-djwhunl15a5n.miren.systems toronto-ruby.com`

> *Route set: toronto-ruby-com.cluster-jwomf2l0tn8z.org-miren-club-djwhunl15a5n.miren.systems →* [*toronto-ruby.com*](http://toronto-ruby.com/?ref=jvrc.ca)

Set the RAILS\_MASTER\_KEY so the app can read the encrypted credentials file. The value is the content of `/config/credentials/production.key`

`$ miren env set -s RAILS_MASTER_KEY`

> *setting RAILS\_MASTER\_KEY (sensitive)…* 
> *Setting env vars on* [*toronto-ruby.com*](http://toronto-ruby.com/?ref=jvrc.ca) *— new version: toronto-ruby.com-vCd3tqZd1pZAP71wwAG68a* 
> *✓ Version toronto-ruby.com-vCd3tqZd1pZAP71wwAG68a deployed — scaled to zero, no instance running right now (0.1s)*

Finally, load the database schema:

`$ miren app run -- bin/rails db:schema:load`

The app should be working now, but it won’t list any events. If you want to add some dummy data, you can run this command:

`$ miren app run -- bin/rails db:seed`

You can view the end result here: [https://toronto-ruby-com.cluster-jwomf2l0tn8z.org-miren-club-djwhunl15a5n.miren.systems](https://toronto-ruby-com.cluster-jwomf2l0tn8z.org-miren-club-djwhunl15a5n.miren.systems/?ref=jvrc.ca)

[](https://canada1.discourse-cdn.com/flex030/uploads/ruby%5Fusers%5Fforum/original/1X/16fb8f1eb5564bfaed01207cf030c0a4f5402ab4.jpeg?ref=jvrc.ca)

## Before you go

Thanks for reaching this far! If you find this guide helpful, please share it with your friends and enemies alike.

I would love to know if you’re able to deploy your apps using this guide. If you have any issues, please reply with your feedback or comments.

If you haven’t already, take a look at the [other articles](https://www.jvrc.ca/) and the [#deployment](https://www.rubyforum.org/tag/deployment/55?ref=jvrc.ca) tag in the Ruby Users Forum.

Happy deploying!