Skip to main content

What you’ll need

  • An AWS account
  • A domain name (optional, but recommended for HTTPS)
  • AWS CLI installed locally (optional)

1. Launch an EC2 instance

  1. Open the EC2 Console and click Launch Instance
  2. Give it a name (e.g. fleet)
  3. Select Ubuntu Server 24.04 LTS as the AMI
  4. Choose t3.micro (free tier eligible) or t3.small for more headroom
  5. Create or select a key pair for SSH access
  6. Under Network settings, create a security group with these inbound rules:
TypeProtocolPortSource
SSHTCP22Your IP
HTTPTCP800.0.0.0/0
HTTPSTCP4430.0.0.0/0
  1. Leave storage at the default 8 GB gp3
  2. Click Launch Instance

2. SSH into the instance

ssh -i your-key.pem ubuntu@YOUR_INSTANCE_IP

3. Install Docker

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker ubuntu
newgrp docker

4. Clone and start Fleet

git clone https://github.com/aayushxr/fleet.git
cd fleet
docker compose up -d
Fleet is now running on port 3000. By default, EC2 instances get a new public IP on every restart. To keep a stable IP:
  1. Go to EC2 → Elastic IPs → Allocate Elastic IP
  2. Click Associate Elastic IP and select your instance

6. Point a domain (optional)

Create an A record in Route 53 (or your DNS provider) pointing to the Elastic IP.

7. Add HTTPS with nginx + Certbot

sudo apt install -y nginx certbot python3-certbot-nginx
Create /etc/nginx/sites-available/fleet:
server {
    listen 80;
    server_name fleet.yourdomain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
sudo ln -s /etc/nginx/sites-available/fleet /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
Then obtain a free TLS certificate:
sudo certbot --nginx -d fleet.yourdomain.com
Make sure ports 80 and 443 are open in your EC2 security group — Certbot needs port 80 to complete the ACME HTTP challenge for TLS certificate provisioning.

Updating Fleet

cd fleet
git pull
docker compose up -d --build