How to deploy Matomo in AWS Cloud?
You can follow this guide to deploy Matomo in AWS or any other Cloud provider. But on AWS for example, you would typically use the following services:
-
EC2 instances for the web application servers running PHP and the web server:
- The default “
aws linux ami"
can be used. -
PHP Can be installed with a command such as:
amazon-linux-extras install -y php8 yum install -y php-gd php-xml php-mbstring php-opcache php-soap
- The default “
- RDS for database, using either:
- MySQL (eg. db.t3.xlarge for a few million pageviews per month)
- or Aurora (eg. db.m5.xlarge for a few million pageviews per month)
- EFS to synchronise the following files and folders (Only needed if you run Matomo on multiple servers – High Availability):
/config/*
– the folder that includes theconfig.ini.php
file/misc/user/*
– stores custom logo and favicon that may be uploaded/js/*
– stores the JS tracker files and also the tag manager container files- Also backup your EFS content by following the guide.
- Cloudwatch & Log rotate:
- Cloudwatch can be configured to receive all your log files.
- A retention date can also be configured for each logs.
- Then you must still setup log rotate on the servers to rotate the logs and delete these logs eventually from the servers.
Next FAQ: Is Matomo compatible with Nginx?
Previous FAQ: Is it possible to use Docker containers to setup and run the Matomo Analytics application?