Overview
Coolify is an open-source & self-hostable Heroku / Netlify / Vercel alternative. It makes deployment easy and secure with features like:
- Automatic SSL certificates
- One-click deployments
- Database management
- Team collaboration
- Resource monitoring
Prerequisites
Before setting up Coolify, you'll need:
- A server/VPS with at least 2GB RAM and 20GB disk space
- Ubuntu 20.04/22.04 or Debian 11/12
- Root access to the server
- A domain name (optional but recommended)
Installing Coolify
SSH into your server and run the installation command:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
Accessing Coolify
After installation, access Coolify through your server's IP address:
https://74.208.97.134
On first access, you'll need to create an admin account.
Setting Up Your NextCoder Application
1. Create a New Project
- Log in to your Coolify dashboard
- Click "New Project"
- Enter a name for your project (e.g., "NextCoder App")
- Click "Create"
2. Configure Source Repository
- In your project, click "Deploy"
- Select "GitHub" as your source provider
- Connect your GitHub account if prompted
- Select your NextCoder repository
- Choose the branch to deploy (usually "main" or "master")
3. Configure Build Settings
For Next.js applications, use these settings:
- Build Pack: "Dockerfile" or "Nixpacks"
- Build Command:
npm run build - Output Directory:
.next - Port:
3000
4. Set Environment Variables
Add your environment variables in the "Environment Variables" section:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key
DATABASE_URL=your_database_url
NEXT_PUBLIC_BASE_URL=https://yourdomain.com
5. Deploy
- Click "Deploy" to start the deployment process
- Coolify will build your application and deploy it
- Once complete, you'll get a preview URL
Setting Up a Custom Domain
- In your project, go to "Domains"
- Click "Add Domain"
- Enter your custom domain
- Follow the DNS instructions to verify ownership
- Coolify will automatically provision an SSL certificate
Database Setup
Coolify can also manage your PostgreSQL database:
- Go to "Databases" in the Coolify dashboard
- Click "New Database"
- Select "PostgreSQL"
- Configure database settings
- Deploy the database
- Use the provided connection string in your app
Monitoring and Logs
Coolify provides monitoring tools:
- View application logs in real-time
- Monitor resource usage (CPU, memory, disk)
- Set up health checks
- Configure alerts for downtime or performance issues
Team Collaboration
Invite team members to your Coolify account:
- Go to "Team" in the dashboard
- Click "Invite Member"
- Enter their email address
- Set appropriate permissions
Advanced Configuration
Automatic Deployments
Set up automatic deployments on code changes:
- In your project, go to "Settings"
- Enable "Auto-deploy" for your preferred branch
- Configure any pre-deployment tests if needed
Rollback
If you need to rollback to a previous deployment:
- Go to "Deployments" in your project
- Find the deployment you want to rollback to
- Click "Rollback" on that deployment
Troubleshooting Connection Issues
If you're having trouble connecting to your Coolify instance, check our troubleshooting guidefor solutions to common connection problems.
Getting Help