AWS is powerful but complex. This guide shows you how to deploy FreeScout on AWS EC2 in under 2 hours, with managed RDS for the database.
Why AWS?
Pros:
- ✅ Global infrastructure (datacenters everywhere)
- ✅ Auto-scaling (grow without downtime)
- ✅ Managed database (RDS) — backups, failover, security
- ✅ Elastic IP (static IP that won't change)
- ✅ Free tier (eligible accounts)
Cons:
- ❌ More complex than DigitalOcean
- ❌ Pricing is harder to predict
- ❌ Steeper learning curve
Best for: Large deployments, teams already on AWS, enterprises needing auto-scaling.
Cost Estimate (Monthly)
For a small FreeScout setup:
| Service | Type | Cost | |---|---|---| | EC2 | t3.medium (2GB RAM, 2 vCPU) | ~$30 | | RDS | db.t3.micro (MySQL 8.0) | ~$30 | | Elastic IP | Static IP | Free (if in use) | | Data transfer | Outbound bandwidth | ~$5 | | Total | | ~$65/month |
Step 1: Create AWS Account & Set Up
- Go to https://aws.amazon.com
- Click "Create account"
- Add payment method (required)
- Verify identity (phone call or SMS)
- Create AWS account
Enable MFA (Security Best Practice)
- Go to AWS Console → IAM
- Click your username (top right) → Security credentials
- Enable MFA (use Google Authenticator or Authy)
Step 2: Launch EC2 Instance
- Go to EC2 → Instances → Launch instances
- Name:
freescout - AMI (Image): Search for "Ubuntu 22.04 LTS"
- Instance type:
t3.medium(2GB RAM, 2 vCPU) — $30/month - Key pair: Create new
- Name:
freescout-key - Type: RSA
- Format: .pem
- Download the file (save to
~/.ssh/freescout-key.pem)
- Name:
- Network settings: Create new security group (next step)
- Storage: 50GB (gp3 SSD)
- Click "Launch instance"
Wait 2–3 minutes for the instance to boot.
Step 3: Configure Security Group
A security group is AWS's firewall.
- Go to EC2 → Security Groups
- Find the security group created in Step 2
- Add Inbound Rules:
| Type | Protocol | Port | Source | |---|---|---|---| | SSH | TCP | 22 | 0.0.0.0/0 (your IP is better) | | HTTP | TCP | 80 | 0.0.0.0/0 | | HTTPS | TCP | 443 | 0.0.0.0/0 |
(Replace 0.0.0.0/0 with your IP for SSH if you want tighter security)
Step 4: Allocate Elastic IP
An Elastic IP is a static IP that won't change (unlike instance IP).
- Go to EC2 → Network & Security → Elastic IPs
- Click "Allocate Elastic IP address"
- Choose your region
- Click "Allocate"
- Select the IP → Actions → Associate Elastic IP
- Select your instance → Associate
Now your instance has a permanent IP address.
Step 5: Point Domain to AWS
- Go to your domain registrar
- Update the A record to point to your Elastic IP
- Wait 15–30 minutes for DNS propagation
Step 6: SSH into Your Instance
chmod 600 ~/.ssh/freescout-key.pem
ssh -i ~/.ssh/freescout-key.pem ubuntu@your-elastic-ip
You're now connected to your EC2 instance.
Step 7: Set Up RDS (Managed MySQL Database)
Using RDS means AWS manages backups, failover, and updates for you.
Create RDS Instance
- Go to RDS → Databases → Create database
- Engine: MySQL 8.0
- Instance class:
db.t3.micro($30/month) - Storage: 50GB gp3
- DB identifier:
freescout-db - Master username:
admin - Master password: [strong password]
- VPC: Same as your EC2 instance
- Publicly accessible: No (EC2 only)
- Backup retention: 7 days (default)
- Click "Create database"
Wait 5–10 minutes for the database to be ready.
Create Database & User
Once RDS is running:
# From your EC2 instance, connect to RDS
mysql -h freescout-db.xxxxx.us-east-1.rds.amazonaws.com -u admin -p
CREATE DATABASE freescout CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'freescout'@'%' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON freescout.* TO 'freescout'@'%';
FLUSH PRIVILEGES;
EXIT;
Step 8: Initial Server Setup (on EC2)
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git unzip supervisor
Create non-root user:
sudo adduser freescout
sudo usermod -aG sudo freescout
su - freescout
Step 9: Install PHP 8.2 & NGINX
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install -y php8.2 php8.2-fpm php8.2-mysql php8.2-mbstring \
php8.2-xml php8.2-curl php8.2-imap php8.2-zip php8.2-gd \
php8.2-bcmath php8.2-intl nginx
Step 10: Download FreeScout
cd /var/www
sudo git clone https://github.com/freescout-helpdesk/freescout.git
sudo chown -R www-data:www-data /var/www/freescout
cd /var/www/freescout
Install Composer dependencies:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo -u www-data composer install --no-dev --optimize-autoloader
Step 11: Configure Environment
sudo cp .env.example .env
sudo nano .env
Update:
APP_URL=https://your-domain.com
APP_KEY= # Leave blank, auto-generated
DB_HOST=freescout-db.xxxxx.us-east-1.rds.amazonaws.com
DB_PORT=3306
DB_DATABASE=freescout
DB_USERNAME=freescout
DB_PASSWORD=your_strong_password
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=your-sendgrid-api-key
Step 12: Laravel Setup
sudo -u www-data php8.2 artisan key:generate
sudo -u www-data php8.2 artisan migrate --force
sudo -u www-data php8.2 artisan freescout:after-app-update
sudo -u www-data php8.2 artisan storage:link
Step 13: Configure NGINX
Create /etc/nginx/sites-available/freescout:
server {
listen 80;
server_name your-domain.com www.your-domain.com;
root /var/www/freescout/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Enable:
sudo ln -s /etc/nginx/sites-available/freescout /etc/nginx/sites-enabled/
sudo systemctl enable nginx
sudo systemctl reload nginx
Step 14: Install SSL
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com -d www.your-domain.com
Step 15: Queue Workers
Create /etc/supervisor/conf.d/freescout.conf:
[program:freescout-worker]
process_name=%(program_name)s_%(process_num)02d
command=php8.2 /var/www/freescout/artisan queue:work database --sleep=3 --tries=3 --timeout=60
autostart=true
autorestart=true
user=www-data
numprocs=1
stdout_logfile=/var/www/freescout/storage/logs/worker.log
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start freescout-worker:*
Step 16: Cron Job
sudo crontab -u www-data -e
Add:
* * * * * /usr/bin/php8.2 /var/www/freescout/artisan schedule:run >> /dev/null 2>&1
AWS-Specific Features
Auto-Scaling
If traffic grows, AWS can automatically launch more EC2 instances:
- Go to EC2 → Auto Scaling Groups → Create Auto Scaling Group
- Set min: 1, desired: 2, max: 4
- AWS automatically scales based on CPU/memory
CloudFront (CDN)
For faster content delivery:
- Go to CloudFront → Create distribution
- Origin: Your Elastic IP
- Enable caching for static files (CSS, JS, images)
RDS Backup & Failover
AWS automatically handles:
- Daily backups (7-day retention)
- Multi-AZ failover (if one datacenter fails, auto-failover to another)
- Point-in-time recovery (restore to any point in the last 7 days)
AWS vs DigitalOcean vs Hetzner
| | AWS | DigitalOcean | Hetzner | |---|---|---|---| | Cost (2GB) | ~$65/mo | $6/mo | €2.99/mo | | Setup complexity | High | Low | Low | | Auto-scaling | Easy | Hard | Not available | | RDS (managed DB) | ✅ Included | ❌ Add-on | ❌ Add-on | | Global reach | ✅ Best | Good | Good | | 24/7 support | ✅ Yes (paid) | Standard | Community |
Choose AWS if: You need auto-scaling, managed database, or are already on AWS. Choose DigitalOcean if: You want simplicity without complexity. Choose Hetzner if: You're in Europe and budget is priority.
Troubleshooting
| Issue | Cause | Fix | |---|---|---| | Can't SSH | Security group wrong | Check inbound rule for SSH (port 22) | | Can't reach database | RDS not in same VPC | Move RDS to same VPC as EC2 | | Emails not sending | SMTP blocked | Check security group, allow port 587 outbound | | Instance slow | EC2 CPU maxed out | Check EC2 → Monitoring, upgrade instance size |
Want FreeScout deployed and optimized on AWS by experts?
We handle the full FreeScout installation on your server — SSL, email, security hardening, and a 1-hour onboarding call. Done in 24 hours.
One-time fee · 30-day support · Money-back guarantee
Next Steps
- Monitor: Set up CloudWatch alerts for high CPU/memory
- Backup: Enable automated RDS backups (default: 7 days)
- Scale: Consider Auto Scaling Groups if traffic grows
- Cost: Set up AWS Budgets to alert if spending exceeds threshold
- SSL: Enable AWS Certificate Manager for certificate management (optional)
AWS is complex but powerful. This guide gets you running; the rest is optimization based on your traffic patterns.
Resources
- AWS EC2 Documentation — official EC2 guide
- AWS Lightsail — simpler AWS VPS option
- FreeScout GitHub — source code and releases
- Certbot on Ubuntu — SSL setup guide