# Deployment Overview

> Compare Django deployment options including VPS, PaaS platforms like Heroku and Render, Docker containers, and Kubernetes for SaaS applications.

Pegasus---like Django---can be deployed on any standard cloud infrastructure.

The most common ways of deploying Pegasus are:

1. On a raw VPS / Virtual Machine, such Digital Ocean, Linode, or Amazon EC2 or Lightsail
2. On a platform-as-a-service (PaaS) platform, such as Heroku, or PythonAnywhere
3. In a containerized way, using Docker, and (optionally) Kubernetes

Choosing the right deployment architecture involves a complex set of trade-offs, and there’s no one-size-fits-all solution. PaaS and Docker-based solutions tend to be easier to get up and running, but can be more difficult to modify and are often more expensive at scale. Meanwhile, setting up a VPS can be error-prone but is a very cost-effective way to deploy small applications.

Much of the choice will also depend on the knowledge and comfort of you/your team with various tools and platforms. See this [Django Deployment Guide](https://www.saaspegasus.com/guides/django-deployment/) for a big-picture overview on choosing a deployment strategy.

## Deployment to any VPS

[Section titled “Deployment to any VPS”](#deployment-to-any-vps)

The easiest way to deploy your application to any Linux server is to use Pegasus’s Kamal deployment support. This will deploy your application using portable, cross-platform Docker containers. For more information on deploying to a VPS, see the [kamal deployment documentation](/deployment/kamal).

## Officially supported PaaS platforms

[Section titled “Officially supported PaaS platforms”](#officially-supported-paas-platforms)

Pegasus also ships with configuration files to deploy to select platforms out-of-the-box. The officially supported platforms are:

* [Render](/deployment/render) (Python-based)
* [Fly](/deployment/fly) (Docker-based)
* [Heroku](/deployment/heroku) (Python or Docker)
* [Digital Ocean App Platform](/deployment/digital-ocean) (Docker-based)
* [Google Cloud Run](/deployment/google-cloud) (Docker-based)

Render and Fly are comparable, and are the recommended options for staging sites or MVPs, since they are easy to set up and have a generous free tier. Digital Ocean and Heroku tend to be more expensive but have a longer track record. Google Cloud is the most copmlex to set up, but allows you to access Google’s infrastructure.

If you would like to deploy to a platform that’s not listed here, please get in touch on Slack or by emailing <support@saaspegasus.com> and I’m happy to help!

## Other options

[Section titled “Other options”](#other-options)

If, for whatever reason, you want to deploy to a VPS but don’t want to use the built in Kamal option, the Django documentation provides a good overview on [how to deploy Django to your own server](https://docs.djangoproject.com/en/stable/howto/deployment/).

Pegasus user [Mitja Martini](https://mitjamartini.com/) has documented how he [deploys his SaaS Pegasus application to a VPS using Dokku](https://mitjamartini.com/blog/2024/09/22/deploying-django-on-dokku/) (an open-source, self-hosted PaaS platform).

Pegasus user [Artem Gordinskiy](https://artem.cool/) has documented his experience [migrating Pegasus apps from Kamal to Coolify](https://artem.cool/blog/coolify-django/) (another open-source, self-hosted PaaS).

Pegasus’s [Docker support](/docker) can be used as a basis for other production environments that supports container---for example, Google Kubernetes Engine and Amazon ECS.

Please reach out in the Pegasus Slack `#deployment` channel for any help on this!