Deployment
Cloud Providers
AWS EC2

Step 1 — Launch an EC2 instance

  1. Go to EC2 Console (opens in a new tab)InstancesLaunch instances
  2. Fill in the form:
FieldRecommended value
Namertsurvey-prod
AMIUbuntu Server 22.04 LTS (HVM)
Instance typet3.medium (2 vCPU / 4 GB RAM)
Key pairSelect or create a key pair for SSH access
Security groupCreate new — see Security group rules below
  1. Expand Advanced details → scroll to User data
  2. Paste the full contents of aws-ec2.sh into the User data field
  3. Click Launch instance

No configuration needed. The script uses safe defaults and starts in HTTP mode. You configure the domain and SSL from the app UI after the server is running — the same flow as Linode.

Download script: aws-ec2.sh

Recommended instance types

Instance typeRAM~$/monthNotes
t3.medium4 GB~$30Minimum for Keycloak
t3.large8 GB~$60Recommended for production

Step 2 — Configure security group rules

Create a new security group with these inbound rules:

TypeProtocolPortSourceNotes
SSHTCP22Your IPAdmin access
HTTPTCP800.0.0.0/0Nginx + ACME challenge
HTTPSTCP4430.0.0.0/0Nginx after SSL setup
Custom TCPTCP38380.0.0.0/0Shiny Server (R analytics)

Outbound: Allow all (required for Docker image pulls and Let's Encrypt).


Step 3 — Wait for setup to complete

The script runs automatically on first boot. It installs Docker, pulls the rtCloud image, initialises the database, and starts all services. This takes 5–10 minutes.

No console access needed. Open your browser and go to http://<instance-public-ip>. You will see a loading page while the app finishes starting up. It refreshes automatically every 5 seconds and loads the app once ready.

The instance public IP is shown in the EC2 → Instances list. If you assigned an Elastic IP, use that instead.

To watch the log directly:

ssh ubuntu@<instance-public-ip>
sudo tail -f /var/log/rtcloud-setup.log

Step 4 — Set up SSL

Once the app is running, follow the Set Up SSL guide → to configure HTTPS. The free rtsurvey.com subdomain is the fastest option — no DNS setup needed.


Step 5 — Change the default password

All passwords default to admin. Change them immediately after your first login:

  • App admin password — account settings inside the app
  • Keycloak admin — accessible at https://your-domain.com/auth/admin (login: admin / admin)

Security group rules (reference)

Inbound

TypeProtocolPortSourceNotes
SSHTCP22Your IPSSH access
HTTPTCP800.0.0.0/0Nginx HTTP + ACME challenge
HTTPSTCP4430.0.0.0/0Nginx HTTPS after SSL setup
Custom TCPTCP38380.0.0.0/0Shiny Server (R analytics)

Outbound

TypeProtocolPortDestinationNotes
All trafficAllAll0.0.0.0/0Docker pulls, certbot, etc.

Ports NOT needed externally

PortServiceReason
8080App containerNginx proxies to it internally
8090Keycloak containerNginx proxies to it internally
3306MySQLInternal Docker network only

Troubleshooting

Check the setup log

sudo tail -200 /var/log/rtcloud-setup.log

Check the SSL log

sudo tail -200 /var/log/rtcloud-ssl.log

View container status

docker compose -f /opt/rtcloud/docker-compose.production.yml ps