Deploy to your cloud
Create a VM with Ratel on AWS, Google Cloud, Azure, DigitalOcean or Hetzner, with deploy.sh or a one-click button.
One command from your laptop
curl -fsSL https://raw.githubusercontent.com/ratel-ai/ratel/main/deploy.sh | shdeploy.sh finds the cloud you are logged in to. With several, it asks, or takes --cloud.
| Cloud | How it finds your login |
|---|---|
| AWS | aws sts get-caller-identity |
| Google Cloud | The account and project of gcloud |
| Azure | az account show |
| DigitalOcean | DIGITALOCEAN_TOKEN or doctl |
| Hetzner | HCLOUD_TOKEN or hcloud |
It uses OpenTofu (tofu), or Terraform when OpenTofu is not installed. It creates:
- One Ubuntu 24.04 LTS VM with 2 vCPU or more, 8 GB of RAM and 30 GB of disk or more.
- A firewall, a static IP and a dedicated SSH key.
It shows the plan and a rough monthly cost per size, and asks before it creates anything. Then it runs the installer on the VM and prints how to open the console. The modules are in deploy/terraform/.
Access modes
--access public(default): Caddy with TLS and a login. Ports 80 and 443 are open to all, or only to the--allow-cidrranges (for example a VPN). With--allow-cidr, Caddy uses its own CA, because Let's Encrypt cannot reach port 80. SSH is open only to your current IP. The certificate is for--domain, or for<ip>.sslip.iowith no domain. The login password is printed once, and stays only on your laptop, in~/.ratel/deploy/<name>/login.--access private: no web port. SSH is open to your current IP and the--allow-cidrranges. Reach the console through a tunnel:
ssh -i ~/.ratel/deploy/ratel/id_ed25519 -N -L 3000:127.0.0.1:3000 ratel@<ip>Options
Pass them after sh -s --:
| Option | What it does |
|---|---|
--cloud | aws, gcp, azure, digitalocean or hetzner. |
--region, --size | Where the VM runs and how big it is. |
--name | Default ratel. Use one per deploy, for more than one. |
--version, --ref | Passed to install.sh. Default: the latest release. |
--domain, --allow-cidr | See Access modes. |
--iac terraform|tofu | Force Terraform or OpenTofu. |
--yes | Ask nothing. |
Status, upgrade and destroy
The state, the SSH key and the password stay on your laptop in ~/.ratel/deploy/<name>/ (owner-only). The other commands need no flags:
curl -fsSL https://raw.githubusercontent.com/ratel-ai/ratel/main/deploy.sh | sh -s -- status
curl -fsSL https://raw.githubusercontent.com/ratel-ai/ratel/main/deploy.sh | sh -s -- up # upgrade to the latest release
curl -fsSL https://raw.githubusercontent.com/ratel-ai/ratel/main/deploy.sh | sh -s -- destroyupon an existing deploy rerunsinstall.shon the VM over SSH, with--versionor the latest release. A deploy made with--ref <branch>stays on that branch. If your IP changed, it first opens SSH to the new one.destroydeletes the VM, its disk with all Ratel data and its IP, then the local state. Back up first.
One-click deploy
Each button opens your cloud's console with Ratel's template, in your account. Nothing is created until you confirm there.
The VM runs install.sh, as deploy.sh does. Pick the public mode (Caddy with TLS and a login for user ratel, with the password that you type) or the private mode (no web port, an SSH tunnel). The template's version parameter (default latest) sets the release. Its ref parameter builds a branch or commit from source instead.
| Cloud | Button | What it opens |
|---|---|---|
| AWS | ![]() | CloudFormation quick-create, with deploy/cloudformation/ratel.yaml (default VPC, t3.large, Elastic IP) |
| Azure | A custom deployment, with deploy/azure/azuredeploy.json (its own network, Standard_B2ms, static IP) | |
| Google Cloud | Cloud Shell, with a tutorial that runs ./deploy.sh up --cloud gcp |
The password is in the user data of the VM (AWS) or in its custom data (Azure), base64-encoded. Anyone who can read the VM's configuration in your account can read it. Use deploy.sh when that matters: it gives the VM only the hash.
