Deploy Coolify on AWS & Deploy Your App
Run your own application platform on AWS using Coolify, similar to Heroku or Vercel
Overview
Coolify lets you run your own platform similar to Heroku or Vercel, on your own infrastructure.
In this tutorial, you will:
Deploy Coolify on AWS EC2
Deploy a real application using Coolify
Test that everything is working
Then use Stakpak Autopilot to monitor and maintain it automatically
all with just one prompt
Estimated time: 20 Minutes
Problem
Setting up Coolify on AWS is mostly manual steps and trial and error.
Create the server
Install dependencies
Run the install script
Make sure everything is configured correctly
A small mistake can leave you with a broken setup that’s hard to debug.
How Stakpak Helps?
We created a Stakpak Skill that handles the Coolify setup end to end, with just one prompt
Application
What the app does
We’ll use a simple todo app built with Next.js and Turso.
It:
lets you create and delete tasks
stores data in a Turso database (SQLite over HTTP)
uses a modern stack (Next.js, Drizzle ORM, Tailwind)
This is a small app, but it’s enough to test:
deployment
database connectivity
container behavior
You can check the code source here
Now that we understand the app, we can start deploying it
Step-by-Step Guide
Prerequisites
Install Browser Extension(Optional)
Cloud provider credentials configured
Deployment
Open stakpak ask it to
deploy my app on aws with coolify
Now let it do its stakpak magic

As you can see, it automatically find the coolify skill, let's press enter

Now its asking us about which EC2 we want to use, lets choose t3.medium

Now it's asking us where we want to deploy our app, choose the closest region to your users

Now it's asking for the DB URL and Auth Token for our app

Now, let's restrict SSH to our IP only for security

Now that we have everything ready lets press enter

Now that Coolify is deployed, let's make an admin account

Then it configured Coolify by starting the reverse proxy and enabling API access
It created a project and connected the GitHub repo as a new application
It added the Turso database credentials as environment variables
Finally, it triggered the deployment, and Coolify built and launched the app automatically

Now everything is working🥳
Now, let's ask it to set up Stakpak Autopilot
Monitoring
Prompt:
Set up stakpak autopilot to monitor the app


That's it!!
Extra Resources:
Related Use Cases
and more...
References
Last updated