Tutorial9 min readMay 3, 2025

Install FreeScout on AWS EC2 — Complete Guide (2025)

Step-by-step guide to deploy FreeScout on AWS EC2. Covers instance setup, security groups, RDS, Elastic IP, and AWS-specific best practices.

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

  1. Go to https://aws.amazon.com
  2. Click "Create account"
  3. Add payment method (required)
  4. Verify identity (phone call or SMS)
  5. Create AWS account

Enable MFA (Security Best Practice)

  1. Go to AWS Console → IAM
  2. Click your username (top right) → Security credentials
  3. Enable MFA (use Google Authenticator or Authy)

Step 2: Launch EC2 Instance

  1. Go to EC2 → Instances → Launch instances
  2. Name: freescout
  3. AMI (Image): Search for "Ubuntu 22.04 LTS"
  4. Instance type: t3.medium (2GB RAM, 2 vCPU) — $30/month
  5. Key pair: Create new
    • Name: freescout-key
    • Type: RSA
    • Format: .pem
    • Download the file (save to ~/.ssh/freescout-key.pem)
  6. Network settings: Create new security group (next step)
  7. Storage: 50GB (gp3 SSD)
  8. Click "Launch instance"

Wait 2–3 minutes for the instance to boot.


Step 3: Configure Security Group

A security group is AWS's firewall.

  1. Go to EC2 → Security Groups
  2. Find the security group created in Step 2
  3. 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).

  1. Go to EC2 → Network & Security → Elastic IPs
  2. Click "Allocate Elastic IP address"
  3. Choose your region
  4. Click "Allocate"
  5. Select the IP → Actions → Associate Elastic IP
  6. Select your instance → Associate

Now your instance has a permanent IP address.


Step 5: Point Domain to AWS

  1. Go to your domain registrar
  2. Update the A record to point to your Elastic IP
  3. 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

  1. Go to RDS → Databases → Create database
  2. Engine: MySQL 8.0
  3. Instance class: db.t3.micro ($30/month)
  4. Storage: 50GB gp3
  5. DB identifier: freescout-db
  6. Master username: admin
  7. Master password: [strong password]
  8. VPC: Same as your EC2 instance
  9. Publicly accessible: No (EC2 only)
  10. Backup retention: 7 days (default)
  11. 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:

  1. Go to EC2 → Auto Scaling Groups → Create Auto Scaling Group
  2. Set min: 1, desired: 2, max: 4
  3. AWS automatically scales based on CPU/memory

CloudFront (CDN)

For faster content delivery:

  1. Go to CloudFront → Create distribution
  2. Origin: Your Elastic IP
  3. 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

  1. Monitor: Set up CloudWatch alerts for high CPU/memory
  2. Backup: Enable automated RDS backups (default: 7 days)
  3. Scale: Consider Auto Scaling Groups if traffic grows
  4. Cost: Set up AWS Budgets to alert if spending exceeds threshold
  5. 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

Need FreeScout Installed Professionally?

Skip the complexity. We install and configure FreeScout on your server in 24 hours — SSL, email, security, and a full onboarding call included.

Get It Done for $100

One-time fee · 30-day support · Money-back guarantee

Related Articles