โช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:
Create a Server (your machine)
Create a Project (a group for one app and its services)
Add services inside the project (Postgres, Redis, your Rails app from GitHub)
Add env vars, deploy, then optionally add a custom domain
Use the built-in console (SSH) when you need to run Rails commands
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
.envfile
1. Prepare your app (Choose based on your case)
๐ก For updating existing apps
# 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:setupThis command will:
Create a production-ready
DockerfileCreate
.dockerignoreCreate
bin/docker-entrypointCreate
.env.exampleGenerate a
SECRET_KEY_BASEPrint 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
Go to Sliplane
Click Create Server
Choose a region
Choose an instance size (start small, scale later)
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)
Click Create Project
Name it something like:
Inside this project, youโll add services.
4. Add a PostgreSQL service (Required)
Inside your project:
Click Add Service
Choose PostgreSQL
Set it to Private (not public) โ ๏ธ
Add a Volume (Leave default)
Set (Leave default):
POSTGRES_USERPOSTGRES_PASSWORD(mark as Secret)POSTGRES_DB
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:
Add Service โ Redis
Set to Private
Add a volume (optional)
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:
Click Add Service
Choose Repository
Connect your GitHub repo
Select branch (usually
mainormaster)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_URLOPENAI_API_KEYSTRIPE_PUBLIC_KEYSTRIPE_SECRET_KEYPOSTMARK_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:
Open your Rails service
Go to Domains
Add your domain (example:
app.yourdomain.com)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:
Run one setup command
Create server
Add Postgres
Add Repository service
Paste env variables
Deploy
Clean, simple, production-ready.
Last updated