---
title: Deploying to Servers or Public Cloud
framework: swift-org
role: article
path: swift-org/documentation/server/guides/deployment.html
---

# Deploying to Servers or Public Cloud

The following guides can help with the deployment to public cloud providers:

- [AWS Lambda using the Serverless Application Model (SAM)](https://swift.org/documentation/server/guides/deploying/aws-sam-lambda.html)
- [AWS Fargate with Vapor and MongoDB Atlas](https://swift.org/documentation/server/guides/deploying/aws-copilot-fargate-vapor-mongo.html)
- [AWS EC2](https://swift.org/documentation/server/guides/deploying/aws.html)
- [DigitalOcean](https://swift.org/documentation/server/guides/deploying/digital-ocean.html)
- [Heroku](https://swift.org/documentation/server/guides/deploying/heroku.html)
- [Kubernetes & Docker](/docs/swift-org/documentation/server/guides/packaging.html/#docker)
- [GCP](https://swift.org/documentation/server/guides/deploying/gcp.html)
- *Have a guides for other popular public clouds like Azure? Add it here!*

If you are deploying to your own servers (e.g. bare metal, VMs or Docker) there are several strategies for packaging Swift applications for deployment, see the [Packaging Guide](https://swift.org/server/guides/packaging.html) for more information.

## Deploying a Debuggable Configuration (Production on Linux)

- If you have `--privileged`/`--security-opt seccomp=unconfined` containers or are running in VMs or even bare metal, you can run your binary with @@FENCE lldb --batch -o "break set -n main --auto-continue 1 -C \"process handle SIGPIPE -s 0\"" -o run -k "image list" -k "register read" -k "bt all" -k "exit 134" ./my-program @@/FENCE instead of `./my-program` to get something akin to a ‘crash report’ on crash. - If you don’t have `--privileged` (or `--security-opt seccomp=unconfined`) containers (meaning you won’t be able to use `lldb`) or you don’t want to use lldb, consider using a library like [`swift-backtrace`](https://github.com/swift-server/swift-backtrace) to get stack traces on crash.
