Deployment And Production

Choosing a Host

One of the biggest advantages of containerizing your application is the ability to run your application anywhere. This gives you the freedom to choose the best host for your needs. Here's a guide to help you choose the right host for your needs.

The beauty of portability

Because your application runs in a container, you're no longer tied to a specific hosting provider. The same container that runs on your laptop will run on:

  • Any VPS provider (DigitalOcean, Hetzner, Vultr, Linode, etc.)
  • Cloud platforms (AWS, Google Cloud, Azure)
  • Managed Kubernetes services
  • Your own hardware in a data center
  • Even a Raspberry Pi in your closet

This portability means:

  • No vendor lock-in - Switch hosts without rebuilding your application
  • Price shopping - Move to cheaper providers if prices increase
  • Multi-cloud strategies - Run on multiple providers for redundancy
  • Freedom to experiment - Try different hosts without risk

Hosting options

Choose your hosting based on your team's experience, budget, and application scale. Here's a quick comparison:

Hosting TypeBest ForMonthly CostManagement LevelWhen to Choose
VPSMost PHP apps$5-20Self-managedYou want control and best value
Managed KubernetesEnterprise/high-traffic$70-100+ModerateYou need advanced orchestration
Cloud PlatformsVariable workloads$20-50+LowYou want integrated cloud services
PaaSQuick deployment$25-100+MinimalYou want zero infrastructure hassle
Our recommendation: Start with a VPS unless you have specific needs. A $10/month VPS can handle what costs $50-100/month on PaaS, and you'll have full control over your infrastructure.

Below are our recommended hosts from our experience. Some links may contain referral codes, but these codes give you free credits to help you get started. These referral programs do not influence our recommendations.

VPS Hosts

Hetzner

Hetzner is infamously known for its low prices and high performance. They are a great choice for small to medium-sized applications.

Vultr

Vultr has great performance and and over 32 global data centers.

DigitalOcean

DigitalOcean is most known for it's simple user experience and vast support of many developer tools.

PaaS Hosts

Sevalla

Sevalla is a modern PaaS with transparent usage-based pricing and no artificial limits. Full disclosure: Sevalla sponsors this project, but we genuinely recommend them for their refreshingly honest approach to PaaS pricing.

Simplifying VPS setup with Spin

Spin is a free and open source tool that simplifies Docker workflows from development to production.

Spin can automatically provision and configure servers on Hetzner, DigitalOcean, and Vultr, setting up Docker Swarm for zero-downtime deployments. It handles the infrastructure complexity while you maintain full control of your server. Here's a quick example with Laravel:

Spin is not required to run these Docker images, but it can help simplify the setup process. Spin was designed to have native integration with these images, but it can be used with any Docker setup.

Learn more about Spin

What to consider when choosing a host

  • Budget - VPS offers best value ($10-20/mo), PaaS most expensive ($25-100+/mo)
  • Technical expertise - VPS requires Linux knowledge, PaaS abstracts complexity
  • Scale - Small/medium apps thrive on VPS, very large apps benefit from Kubernetes
  • Time investment - PaaS saves time but costs more, VPS costs less but needs more hands-on
  • Data sovereignty - Choose providers with data centers in your required regions
  • Growth trajectory - VPS and Kubernetes scale cost-effectively, PaaS gets expensive

Specifically for PaaS providers

  • Pricing - Is the pricing transparent and upfront? Are there alerts if you're approaching your limits?
  • Debugging - Are you able to access logs easily and debug issues?
  • Vendor lock-in - Are you building around a proprietary platform, or can you easily migrate to another provider if needed?

Our recommendation for most projects

If you're running a typical PHP application (Laravel, WordPress, custom app), here's our suggested progression:

Starting out: VPS provider like Hetzner or DigitalOcean ($5-10/month)

  • Use Docker Swarm for single-server deployment
  • Simple, affordable, and plenty of room to grow

Growing: Performance tuning and hardware upgrades ($20-40/month)

  • Focus on fine tuning your application for performance
  • Upgrade your server hardware if needed (simple as a few clicks)

At scale: Managed Kubernetes or multiple VPS servers (>$100/month)

  • Move to Kubernetes when you need sophisticated orchestration
  • Only consider if you must exceed 99.999% of uptime

Most PHP applications never need to move beyond a well-configured VPS. A $20/month server can serve thousands of requests per second when properly optimized.

Don't let fancy infrastructure distract you from building your application. Pick what works for you. Start simple, prove your concept, then scale up as needed.

Key requirements for any host

Regardless of which provider you choose, ensure they support:

  • Docker installation - Ability to install and run Docker (most Linux VPS hosts support this)
  • Adequate resources - At minimum 1GB RAM, 1 CPU core (2GB+ recommended for most applications)
  • Security - Strong security policies and practices to protect your application and data
  • Performance - Good performance and quality hardware to handle your application's traffic
  • Network reliability - Good uptime SLA and network performance
  • Responsive support team - Quality and responsive support team to help you out when you need it
  • Data center location - Close to your users for better performance
  • Backup options - Either provided by host or easily implemented yourself (and we strongly recommend the 3-2-1 backup rule)