Back to Blog

How to Migrate to Convox: Cut PaaS Costs Up to 70% While Keeping Full Control

Moving from one Platform as a Service (PaaS) to another can seem daunting, but migrating to Convox offers significant advantages in terms of cost, control, and flexibility. Whether you're coming from Heroku, Platform.sh, Fly.io, or AWS Elastic Beanstalk, this comprehensive guide will walk you through the migration process step by step.

Why Migrate to Convox?

Before diving into the migration process, let's understand what makes Convox an attractive alternative:

  • Cost Efficiency: Run on your own cloud infrastructure at a fraction of traditional PaaS costs
  • Complete Control: Own your infrastructure while maintaining PaaS simplicity
  • Multi-Cloud Support: Deploy on AWS, Google Cloud, Azure, or Digital Ocean
  • No Vendor Lock-in: Your applications run on standard Kubernetes infrastructure
  • Enterprise Features: Built-in scaling, monitoring, and security features

Pre-Migration Planning

1. Assess Your Current Setup

Before starting the migration, document your current application architecture:

  • Application Components: Web services, workers, scheduled tasks
  • Dependencies: Databases, caches, external services
  • Environment Variables: Configuration and secrets
  • Custom Domains: SSL certificates and DNS configurations
  • Deployment Processes: CI/CD pipelines and workflows

2. Choose Your Cloud Provider

Convox supports multiple cloud providers. Consider factors like:

  • Current infrastructure relationships
  • Regional requirements
  • Pricing models
  • Compliance needs

Step 1: Set Up Your Convox Account and Runtime

Create Your Convox Account

  1. Sign up at the Convox Console
  2. Use your company email address for better organization management
  3. Create an Organization at the first prompt (you can invite team members later)

Install a Runtime Integration

  1. In the Convox Console, navigate to Integrations
  2. Click the + sign in the Runtime section
  3. Select your cloud provider (AWS, Google Cloud, Azure, or Digital Ocean)
  4. Follow the provider-specific guided setup process which will:
  • AWS: Create an IAM user with AdministratorAccess policy
  • GCP: Create a service account with Owner role
  • Azure: Create a service principal with Owner role
  • Digital Ocean: Generate Personal Access Token and Spaces Access Key

Install Your First Rack

  1. Go to Racks in the Convox Console
  2. Click Install and select your cloud provider
  3. Choose your runtime integration
  4. Configure your rack:
  • Name: Choose a descriptive name (e.g., production, staging)
  • Region: Select the region closest to your users
  • Parameters: Use our predefined templates or customize:
  • Production: Optimized for production workloads
  • Staging: Balanced configuration for staging
  • Minimalist: Cost-effective for development

Note: Feel free to browse the available parameters to see if you'd like to make any fine-tune adjustments now. Most parameters can be changed after rack installation; the ones that cannot are listed in the immutable section of the install modal. For a complete list of parameters available for all cloud providers, see the Rack Parameters documentation.

The rack installation typically takes 5-20 minutes depending on your cloud provider.

Step 2: Install and Configure the Convox CLI

Install the CLI

Linux (x86_64):

curl -L https://github.com/convox/convox/releases/latest/download/convox-linux -o /tmp/convox
sudo mv /tmp/convox /usr/local/bin/convox
sudo chmod 755 /usr/local/bin/convox

macOS (Intel):

curl -L https://github.com/convox/convox/releases/latest/download/convox-macos -o /tmp/convox
sudo mv /tmp/convox /usr/local/bin/convox
sudo chmod 755 /usr/local/bin/convox

macOS (M1/ARM64):

curl -L https://github.com/convox/convox/releases/latest/download/convox-macos-arm64 -o /tmp/convox
sudo mv /tmp/convox /usr/local/bin/convox
sudo chmod 755 /usr/local/bin/convox

Authenticate with Convox

  1. In the Convox Console, go to your Account page
  2. Copy the CLI login command
  3. Run it in your terminal:
convox login console.convox.com -t your-cli-key-here

Switch to Your Rack

convox switch your-rack-name

Step 3: Platform-Specific Migration Guides

Migrating from Heroku

Heroku users will find Convox familiar, as both platforms use similar concepts.

Convert Heroku Procfile to convox.yml

Heroku Procfile:

web: python manage.py runserver 0.0.0.0:$PORT
worker: celery worker

Convox convox.yml equivalent:

services:
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:3000
    port: 3000
  worker:
    build: .
    command: celery worker

Migrate Add-ons to Resources

Heroku Add-ons → Convox Resources:

# Heroku Postgres → Convox Postgres
resources:
  database:
    type: postgres
    options:
      storage: 100
      version: 13

# Heroku Redis → Convox Redis  
  cache:
    type: redis
    options:
      version: 6.2

services:
  web:
    resources:
      - database
      - cache

Environment Variables

Export your Heroku config:

heroku config -a your-app-name --shell > heroku-env.txt

Import to Convox:

convox env set $(cat heroku-env.txt)

Migrating from Platform.sh

Platform.sh uses .platform.app.yaml which translates well to Convox's convox.yml.

Convert Platform.sh Configuration

Platform.sh .platform.app.yaml:

name: app
type: php:8.1
web:
  locations:
    "/":
      root: "web"
      passthru: "/index.php"

Convox convox.yml equivalent:

services:
  web:
    build: .
    command: php-fpm
    port: 9000

Platform.sh Services → Convox Resources

Platform.sh .platform/services.yaml:

database:
  type: postgresql:13
  disk: 2048

Convox equivalent:

resources:
  database:
    type: postgres
    options:
      version: 13
      storage: 2048

Migrating from Fly.io

Fly.io's fly.toml configuration maps to Convox's convox.yml.

Convert Fly.toml to convox.yml

Fly.io fly.toml:

app = "my-app"

[build]
  image = "my-app:latest"

[[services]]
  internal_port = 8080
  protocol = "tcp"

  [[services.ports]]
    handlers = ["http"]
    port = "80"

Convox convox.yml equivalent:

services:
  web:
    image: my-app:latest
    port: 8080

Migrating from AWS Elastic Beanstalk

Elastic Beanstalk applications often use Dockerrun.aws.json or platform-specific configurations.

Convert Dockerrun.aws.json

Elastic Beanstalk Dockerrun.aws.json v2:

{
  "AWSEBDockerrunVersion": 2,
  "containerDefinitions": [
    {
      "name": "web",
      "image": "my-app:latest",
      "portMappings": [
        {
          "hostPort": 80,
          "containerPort": 8000
        }
      ]
    }
  ]
}

Convox convox.yml equivalent:

services:
  web:
    image: my-app:latest
    port: 8000

Step 4: Create Your Application Structure

Create the convox.yml File

In your application root, create a convox.yml file. Here's a comprehensive example:

environment:
  - NODE_ENV=production
  - DATABASE_URL

resources:
  database:
    type: postgres
    options:
      storage: 100
      version: 13
  cache:
    type: redis

services:
  web:
    build: .
    command: npm start
    port: 3000
    environment:
      - PORT=3000
    resources:
      - database
      - cache
    health: /health
    scale:
      count: 2
      cpu: 256
      memory: 512
  
  worker:
    build: .
    command: npm run worker
    resources:
      - database
      - cache
    scale:
      count: 1

timers:
  daily-cleanup:
    schedule: "0 2 * * *"
    command: npm run cleanup
    service: worker

Need Framework Examples? Check out our example applications repository for pre-configured samples of popular frameworks including Rails, Django, Node.js, Python, and more. These examples provide working convox.yml configurations and Dockerfiles to help accelerate your migration.

Set Up Your Dockerfile

If you don't already have one, create a Dockerfile:

FROM node:16-alpine

WORKDIR /app

COPY package*.json ./
RUN npm ci --only=production

COPY . .

EXPOSE 3000

CMD ["npm", "start"]

Step 5: Deploy Your Application

Create the App

convox apps create my-app

Set Environment Variables

convox env set NODE_ENV=production DATABASE_URL=your-db-url

Deploy

convox deploy

Monitor the deployment:

convox logs

Verify Deployment

convox services
# Shows your application URLs

convox ps
# Shows running processes

Step 6: Set Up Workflows for CI/CD

Create Deployment Workflow

  1. In the Convox Console, go to Workflows
  2. Click Create Workflow
  3. Select Deployment Workflow
  4. Configure:
  • Repository: Link your GitHub/GitLab repository
  • Branch: Choose trigger branch (e.g., main, production)
  • Applications: Select your Convox app
  • Promotion: Choose automatic or manual
  • Environment Variables: Set deployment-specific variables

Create a Review Workflow (Optional)

For pull request testing:

  1. Create a Review Workflow
  2. Configure:
  • Repository: Same as deployment workflow
  • Rack: Use staging rack
  • Run Tests: Enable if you have test commands
  • Deploy Demo: Enable for temporary review apps

Step 7: Database Migration

Export from Current Platform

From Heroku:

heroku pg:backups:capture -a your-app
heroku pg:backups:download -a your-app

From Platform.sh:

platform db:dump --gzip

Import to Convox

convox resources import database -f your-dump.sql

For large databases, consider using cloud provider tools for faster transfers.

Step 8: Configure Custom Domains and SSL

Add Custom Domain

Update your convox.yml:

services:
  web:
    domain: ${HOST}
    port: 3000

Set the domain:

convox env set HOST=yourdomain.com
convox deploy

SSL Certificates

Convox automatically provisions SSL certificates via Let's Encrypt. For custom certificates:

convox certs upload cert.pem key.pem

Update DNS

Point your domain to the Convox router:

convox rack
# Note the Router URL

Create a CNAME record:

yourdomain.com CNAME router.your-rack.convox.cloud

Step 9: Performance Optimization and Scaling

Configure Autoscaling

services:
  web:
    scale:
      count: 2-10
      targets:
        cpu: 70
        memory: 80

Resource Allocation

Adjust CPU and memory based on your application needs:

services:
  web:
    scale:
      cpu: 512
      memory: 1024

Health Checks

Configure appropriate health checks:

services:
  web:
    health:
      path: /health
      grace: 30
      interval: 10
      timeout: 5

Step 10: Monitoring and Maintenance

Application Logs

convox logs
convox logs --filter error
convox logs --since 1h

Application Metrics

Convox provides comprehensive monitoring capabilities through multiple options:

Integrated Convox Monitoring (Recommended)

Convox offers built-in monitoring and alerting that requires no additional tools or complex configuration:

  • Automatic metrics collection from your racks and applications
  • Pre-configured dashboards with essential infrastructure metrics
  • Custom panel creation using Smart Queries or PromQL
  • Intelligent alerting with configurable thresholds
  • Slack and Discord integrations for notifications

Enable Monitoring:

  1. Navigate to your rack in the Convox Console
  2. Click Rack Settings in the left sidebar
  3. Scroll to Dashboard Settings
  4. Toggle Enable Metrics Agent to on
  5. Wait 2 minutes for agents to install

Once enabled, access your metrics through the V3 Dashboard in the Metrics section of the Console.

External Monitoring Solutions

You can also integrate with:

  • Datadog: Full APM and infrastructure monitoring
  • Custom monitoring solutions via syslog forwarding

Backup Strategy

Set up regular backups:

convox resources export database -f backup-$(date +%Y%m%d).sql

Consider automated backup scripts in your CI/CD pipeline.

Post-Migration Checklist

Immediate Actions

  • Verify all services are running: convox ps
  • Test application functionality thoroughly
  • Confirm database connectivity and data integrity
  • Validate environment variables are set correctly
  • Test custom domains and SSL certificates

Performance Validation

  • Run load tests to compare performance
  • Monitor resource usage and adjust scaling
  • Verify backup and restore procedures
  • Test disaster recovery scenarios

Team Onboarding

  • Share CLI installation instructions
  • Provide access to Convox Console
  • Update deployment documentation
  • Train team on new workflows

Infrastructure Optimization

  • Review and optimize rack parameters
  • Set up monitoring and alerting
  • Configure log aggregation
  • Implement security best practices

Common Migration Challenges and Solutions

Challenge: Environment Variable Management

Solution: Use Convox's environment variable management:

convox env set KEY1=value1 KEY2=value2
convox env edit  # Interactive editing

Challenge: Database Connection Issues

Solution: Verify resource linking in convox.yml:

services:
  web:
    resources:
      - database  # This creates DATABASE_URL automatically

Challenge: Build Failures

Solution:

  1. Check Dockerfile compatibility
  2. Verify build context and .dockerignore
  3. Use build logs for debugging:
convox builds logs BUILD_ID

Challenge: Scaling and Performance

Solution:

  1. Monitor resource usage: convox rack ps
  2. Adjust resource allocation gradually
  3. Use autoscaling for variable workloads

Cost Optimization Tips

Right-Size Your Resources

Start with minimal resources and scale up:

services:
  web:
    scale:
      count: 1
      cpu: 256
      memory: 512

Use Spot Instances (AWS)

Configure your rack to use spot instances for cost savings:

convox rack params set node_capacity_type=spot

Optimize Database Resources

Use appropriate database sizing:

resources:
  database:
    type: postgres
    options:
      storage: 20  # Start small, increase as needed
      class: db.t3.micro  # Cost-effective for development

Advanced Features

Multi-Environment Setup

Create separate racks for different environments:

# Production rack
convox rack install aws production region=us-east-1 node_type=t3.medium

# Staging rack  
convox rack install aws staging region=us-east-1 node_type=t3.small

Custom Build Processes

Use build-time environment variables:

convox build --build-args "NODE_ENV=production" --build-args "API_URL=https://api.example.com"

Advanced Networking

Configure custom load balancers for TCP/UDP services:

balancers:
  custom:
    service: api
    ports:
      5000: 3001
      5001: 3002

services:
  api:
    ports:
      - 3001
      - 3002

Getting Help and Support

Community Resources

Commercial Support

  • Open support tickets in the Convox Console
  • Access to Convox engineering team
  • Free white-glove migration assistance and consultation

Your Path to Cost-Effective, Controlled Infrastructure

Platform migration doesn't have to be complex or risky. With Convox, you get all the simplicity of a traditional PaaS while maintaining complete control over your infrastructure and dramatically reducing your operational costs.

Whether you're migrating from Heroku, Platform.sh, Fly.io, or AWS Elastic Beanstalk, this comprehensive approach ensures a smooth transition that delivers immediate cost savings and long-term strategic advantages. No vendor lock-in, no compromise on features, no sacrifice of the developer experience you expect—just better economics and complete infrastructure ownership.


Ready to cut your PaaS costs by up to 70% while keeping full control? The future of application hosting is infrastructure ownership without operational complexity, and the right platform can make all the difference in your bottom line and strategic flexibility.

Get Started Free with your Convox migration today, or contact our team for free white-glove onboarding and personalized migration assistance.


For additional migration resources and best practices, visit our documentation.

Let your team focus on what matters.