โšชSliplane Deploy

A guide on how to deploy your LightningRails app to sliplane

Sliplane is now my favorite hosting provider, it is very easy to deploy and you can have several apps under the same server, great if your apps haven't picked up momentum without having to spend hundreds of $ on Heroku servers.


Sliplaneโ€™s mental model is:

  1. Create a Server (your machine)

  2. Create a Project (a group for one app and its services)

  3. Add services inside the project (Postgres, Redis, your Rails app from GitHub)

  4. Add env vars, deploy, then optionally add a custom domain

  5. Use the built-in console (SSH) when you need to run Rails commands

circle-info

Bonus: you can host several apps on the same server, which is awesome for keeping costs down. Each app is just another Project on that same Server.


0. Prerequisites

  • Your Lightning Rails app is pushed to GitHub (main branch recommended)

  • You have a Sliplane account

  • You are ready to set production env vars (Cloudinary, OpenAI, Stripe, etc if your app uses them) from your .env file


1. Prepare your app (Choose based on your case)

chevron-right๐Ÿ’ก For updating existing appshashtag
# One-time setup (if not already done)
gh auth login

# Fetch the Sliplane setup files and add them to your project

# 1. Fetch the rake task
gh api repos/LightningRails/lightning-rails/contents/lib/tasks/sliplane_setup.rake \
  --jq '.content' | base64 -d > lib/tasks/sliplane_setup.rake

# 2. Fetch the bash script
gh api repos/LightningRails/lightning-rails/contents/bin/setup-sliplane \
  --jq '.content' | base64 -d > bin/setup-sliplane

# 3. Make the bash script executable
chmod +x bin/setup-sliplane

# 4. Commit the changes
git add lib/tasks/sliplane_setup.rake bin/setup-sliplane
git commit -m "Added Sliplane deployment setup"

# 5. You're ready to deploy!
rails sliplane:setup
chevron-right๐Ÿ†• For a new apphashtag

From your project root:

This command will:

  • Create a production-ready Dockerfile

  • Create .dockerignore

  • Create bin/docker-entrypoint

  • Create .env.example

  • Generate a SECRET_KEY_BASE

  • Print all required environment variables

  • Show the Sliplane deployment checklist

Then push your code:

Thatโ€™s it on the code side.


2. Create a Server in Sliplane

  1. Go to Sliplane

  2. Click Create Server

  3. Choose a region

  4. Choose an instance size (start small, scale later)

  5. Wait until the server is ready

You can deploy multiple apps on the same server by creating multiple Projects.


3. Create a Project (your app)

  1. Click Create Project

  2. Name it something like:

Inside this project, youโ€™ll add services.


4. Add a PostgreSQL service (Required)

Inside your project:

  1. Click Add Service

  2. Choose PostgreSQL

  3. Set it to Private (not public) โš ๏ธ

  4. Add a Volume (Leave default)

  5. Set (Leave default):

  • POSTGRES_USER

  • POSTGRES_PASSWORD (mark as Secret)

  • POSTGRES_DB

  1. Add

Deploy it.

Once live, note the variables above and the internal hostname Youโ€™ll need it for DATABASE_URL.


5. Add Redis (Optional)

If your app uses:

  • Caching

  • ActionCable

  • Very complex Background jobs

  • Sidekiq

Then:

  1. Add Service โ†’ Redis

  2. Set to Private

  3. Add a volume (optional)

  4. Deploy

If not, you can skip this and use a SolidQueue setup (Guide coming soon)


6. Add Your Rails App (Repository Service)

Inside your project:

  1. Click Add Service

  2. Choose Repository

  3. Connect your GitHub repo

  4. Select branch (usually main or master)

  5. Sliplane will detect your Dockerfile

Set:

  • Public: Enabled

  • Protocol: HTTP

  • Healthcheck path: /

Deploy.

Sliplane will now build your Docker image and compile assets.


7. Add Environment Variables

Go to your Rails service โ†’ Settings โ†’ Environment Variables.

Add all the variables found in your .env file.

Required

Database URL

Go to your PostgreSQL service and find the variables in "settings". Here is where we link our brand new PostgreSQL service with our brand new repository service.

Build it using your Postgres service:

Example shape:

Add it as:


Third-Party Keys (if your app uses them)

If your Lightning Rails app uses external services, add them here:

Examples:

  • CLOUDINARY_URL

  • OPENAI_API_KEY

  • STRIPE_PUBLIC_KEY

  • STRIPE_SECRET_KEY

  • POSTMARK_API_TOKEN

If it exists in your .env locally, it likely belongs here in production.


8. First Deploy Checklist

Once deployed:

  • Visit your Sliplane URL (*.sliplane.app)

  • Confirm styles are loading

  • Test login / registration

  • Check logs if anything fails

If styles are missing, make sure:

is set.


9. Add a Custom Domain (Private Domain)

To use your own domain:

  1. Open your Rails service

  2. Go to Domains

  3. Add your domain (example: app.yourdomain.com)

  4. Sliplane will show required DNS records

Usually:

  • For subdomain โ†’ create a CNAME

  • For root domain โ†’ follow the exact record Sliplane provides

Once DNS propagates, SSL is handled automatically.

You can then update:

in environment variables if needed.


10. Open Console (SSH)

Useful for:

  • Running migrations

  • Seeding data

  • Rails console

Step 1 โ€“ Add your SSH key

In Sliplane account settings, add your public SSH key.

Step 2 โ€“ Open the service console

In your Rails service, click Console / SSH. Sliplane provides a ready-to-copy SSH command.

Use that command.

Step 3 โ€“ Navigate to the app directory

Step 4 โ€“ Run commands


Cost Optimization Tip

You can host multiple Lightning Rails apps on the same Sliplane server.

Each app:

  • Has its own Project

  • Has its own Postgres service

  • Shares the same server resources

This keeps infrastructure simple and affordable.


Summary

Deploying Lightning Rails to Sliplane is:

  1. Run one setup command

  2. Create server

  3. Add Postgres

  4. Add Repository service

  5. Paste env variables

  6. Deploy

Clean, simple, production-ready.

Last updated