Step-by-step guide to create cloud infrastructure for Relvy self-hosting
Field | Value |
---|---|
Name | relvy-alb-sg |
Description | Load balancer security group for Relvy App |
VPC | [Your VPC] |
Type | Protocol | Port | Source | Description |
---|---|---|---|---|
HTTP | TCP | 80 | 0.0.0.0/0 | HTTP redirect |
HTTPS | TCP | 443 | 0.0.0.0/0 | HTTPS from internet |
Type | Protocol | Port | Destination | Description |
---|---|---|---|---|
HTTP | TCP | 80 | [Will add app SG after creating] | To app instances |
Field | Value |
---|---|
Name | relvy-app-sg |
Description | Application server security group for Relvy App |
VPC | [Your VPC] |
Type | Protocol | Port | Source | Description |
---|---|---|---|---|
HTTP | TCP | 80 | relvy-alb-sg | From load balancer |
SSH | TCP | 22 | [Your IP]/32 | SSH access |
Type | Protocol | Port | Destination | Description |
---|---|---|---|---|
HTTPS | TCP | 443 | 0.0.0.0/0 | HTTPS outbound |
HTTP | TCP | 80 | 0.0.0.0/0 | Package downloads |
DNS | UDP | 53 | 0.0.0.0/0 | DNS resolution |
Field | Value |
---|---|
Name | relvy-db-sg |
Description | Database security group for Relvy |
VPC | [Your VPC] |
Type | Protocol | Port | Source | Description |
---|---|---|---|---|
PostgreSQL | TCP | 5432 | relvy-app-sg | Database access from application only |
relvy-alb-sg
relvy-app-sg
Field | Value |
---|---|
Name | relvy-alb |
Scheme | Internet-facing |
IP address type | IPv4 |
Field | Value |
---|---|
VPC | [Your VPC] |
Mappings | Select 2 public subnets in different AZs |
Security Groups | Remove default, Add relvy-alb-sg |
Field | Value |
---|---|
Target type | Instances |
Target group name | relvy-app-tg |
Protocol | HTTP, Port: 80 |
VPC | [Your VPC] |
Health check path | /health |
Field | Value |
---|---|
Listener | HTTP:80 |
Default action | Forward to relvy-app-tg |
relvy-app-alb-xxxxxxxxx.us-west-2.elb.amazonaws.com
Field | Value |
---|---|
Name and tags | Name: relvy-app-ec2 |
Application and OS Images (AMI) | Amazon Linux 2023 AMI (64-bit x86) |
Field | Value |
---|---|
Instance family | General purpose |
Instance type | t3.xlarge |
relvy-app-key
Field | Value |
---|---|
VPC | [Your VPC] |
Subnet | [Select a subnet in the same AZ as target group] |
Auto-assign public IP | Enable (for ssh) |
Firewall (Security groups) | Select existing security group relvy-app-sg |
Field | Value |
---|---|
Root volume (gp3) | Size: 100 GiB |
relvy-app-tg
)Field | Value |
---|---|
Engine type | PostgreSQL |
Version | PostgreSQL 17.4-R2 (or latest) |
Field | Value |
---|---|
DB instance identifier | relvy-app-db |
Master username | postgres |
Master password | [Generate strong password - save this securely] |
Field | Value |
---|---|
DB instance class | db.t3.medium (2 vCPU, 4 GB RAM) |
Storage type | General Purpose SSD (gp3) |
Allocated storage | 50 GB |
Storage autoscaling | Enable |
Maximum storage threshold | 200 GB |
Field | Value |
---|---|
Connect to EC2 Compute Resource | Select the EC2 instance we created (relvy-app-ec2) |
DB subnet group | Automatic setup |
Public access | No |
VPC security groups | Choose existing → relvy-db-sg |
Certificate authority | default |
Field | Value |
---|---|
Initial database name | relvydb |
Enable Performance Insights | Yes (optional) |
Deletion protection | Enable |
relvydb
for the Relvy application to work correctly.Component | Status Check |
---|---|
Security Groups | App and DB groups created with proper rules |
EC2 Instance | Instance running (and registered with target group if using ALB) |
RDS Database | Database available and accessible |
Load Balancer | ALB running with target group (if created) |