Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Home
  2. Guides
  3. Install Cipi on AWS EC2
Cloud providers

Install Cipi on AWS EC2

Launch an AWS EC2 instance for Laravel step by step (Ubuntu AMI, instance type, gp3 storage, security group, Elastic IP), install Cipi, point DNS, and connect S3, SES and CodeCommit.

By Updated 3 min read

EC2 gives you a full virtual machine, which is exactly what Cipi needs. This walkthrough uses the AWS console; the same settings work from Terraform or the CLI.

Key ideas, in plain words#

TermMeaning
Instance / serverThe virtual machine you rent
ImageThe operating system it starts with: pick plain Ubuntu LTS, nothing pre-installed
Public IPThe address visitors and DNS point to; make it static so it survives rebuilds
Provider firewallRules in the provider's console, before traffic reaches the server. Cipi adds its own (UFW) on the server
SSH keyHow you log in: the public half goes to the provider, the private half stays on your laptop (basics)

Before you start#

  • An account with the provider and a payment method.
  • An SSH key on your laptop (ssh-keygen -t ed25519), see VPS, SSH and DNS basics.
  • A domain whose DNS you can edit.

1. Launch the instance#

In EC2 → Launch instance:

SettingChoose
AMIUbuntu Server 24.04 LTS (or 26.04 LTS), from Canonical
Instance type2 GB RAM or more to be comfortable
Key pairYour existing key, or create one and download it
Storage30 GB gp3 or more (releases, logs and local backups live here)
NetworkA public subnet, Auto-assign public IP on

2. Open the ports#

Create a security group with inbound rules:

PortSourceFor
22 (SSH)Your IP, or anywhere if you'll rely on Cipi's fail2ban and keysAdministration
80 (HTTP)Anywhere (IPv4 and IPv6)Let's Encrypt validation, redirects
443 (HTTPS)Anywhere (IPv4 and IPv6)Your apps

Cipi also runs its own firewall (UFW) on the instance; the two layers don't conflict.

3. Attach an Elastic IP#

EC2 → Elastic IPs → Allocate, then Associate it with the instance. The public IP of an instance changes on stop/start; your DNS shouldn't.

4. Install Cipi#

EC2 logs you in as ubuntu (a sudo user), not root:

bash
ssh -i ~/Downloads/my-key.pem ubuntu@203.0.113.10
sudo -i
wget -O - https://cipi.sh/setup.sh | bash

When the installer asks for your SSH public key, paste the public half of the key you'll use from now on (cat ~/.ssh/id_ed25519.pub on your laptop). After the install you log in as cipi:

bash
ssh cipi@203.0.113.10
sudo cipi status

5. Point DNS and create the first app#

Create an A record (Route 53 or your DNS provider) for your domain to the Elastic IP, then follow Deploy Laravel on an Ubuntu VPS from step 4.

AWS services that fit well#

NeedUse
Off-site backupsAn S3 bucket as destination: sudo cipi backup configure (guide)
Outgoing mailAmazon SES SMTP credentials in the app's .env
Code on AWSCodeCommit works with Cipi's automatic deploy keys
Snapshots of the whole diskEBS snapshots, on top of Cipi's database and file backups

Outbound port 25 is restricted on EC2 by default. Use SES or another provider on port 587 for app mail and for Cipi's notifications.

Troubleshooting#

ProblemFix
Installer stops: container detectedYou picked a container product (LXC/OpenVZ): choose a KVM virtual machine
Installer stops: unsupported OSUse a plain Ubuntu 24.04 or 26.04 LTS image, not a marketplace app
Permission denied (publickey) after the installLog in as cipi, not root or ubuntu, with the key you pasted in the installer
Certificate failsPort 80 closed in the provider firewall, or DNS not pointing at the server yet
Site unreachable on 443Add 443 to the provider firewall (IPv4 and IPv6)
Notification e-mail never arrivesPort 25 is blocked by most providers: use an SMTP service on 587

Questions

Which instance size?

Start with 2 GB of RAM (for example a t3.small) for one or two apps; add RAM before CPU when you add Octane, Meilisearch or more apps.

Can I use RDS or S3?

Yes. Point an app's DB_* variables at RDS if you prefer a managed database, and use S3 as the destination for cipi backup.

Why can't I send e-mail from the instance?

AWS restricts outbound port 25 by default. Use SES (or another SMTP provider) on port 587 for the app and for Cipi's notifications.

Can I use Graviton (ARM) instances?

Choose x86 to be safe: parts of the stack, such as the AWS CLI used for S3 backups, are installed as x86_64 builds.

Does Cipi need root?

Only to install. The installer runs as root (or with sudo -i), then disables root login; you work as cipi with sudo cipi ….

Can I resize the server later?

Yes. Resizing at the provider keeps the disk; Cipi adapts. To change provider or region, move apps with cipi sync.

What if a step fails?

Read the troubleshooting table above first. Then check the matching docs page, open a GitHub issue, or ask in the community. Most commands print the fix when they refuse something.

Try it on your own server

Free and open source. One command on a fresh Ubuntu 24.04 or 26.04 VPS.

wget -O - https://cipi.sh/setup.sh | bash
Read the quickstart