Nextcloud on AWS - simple EC2 instance with S3 storage, MariaDB and local Redis cache

Опубликовано: 02 Июнь 2026
на канале: Shiunbird
6,894
59

Today I'm setting up a quick and easy single EC2 instance (VM) installation of Nextcloud in the AWS, using a S3 bucket for storage.

WARNING: This setup is a proof-of-concept. PHP could see more tweaks. Access rights to the S3 bucket NEED adjustment, and maybe your own encryption configuration. Optional PHP modules would need to be decided based on your own requirements. I am not responsible for any issues you may face. I'm not covering HTTPS configuration, certificates or Apache hardening options. This is not the configuration I use for my own installation (I host mine at home).

Using S3 as a backend for Nextcloud requires careful planning. Tweaking the Nextcloud settings will reduce the number of API calls from Nextcloud against S3.

I make a few mistakes during the configuration, so please watch all the way till the end if you wish to try this yourself.

Episode index:
00:04 - Preparing the EC2 instance.
04:32 - Installing the required packages.
05:16 - Basic PHP configuration.
07:31 - Creating the database.
09:26 - Downloading and installing Nextcloud.
11:48 - Creating a site in Apache.
13:51 - First run.
15:19 - Creating a data directory.
18:04 - Installing extra PHP modules.
19:42 - Installing Redis.
25:29 - Troubleshooting Redis.
26:00 - Using S3 for storage.
32:31 - Troubleshooting another configuration typo and final commentary.

List of required packages:
wget unzip apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip

List of optional packages:
php-intl php-bcmath php-gmp php-imagick
I ended up installing the whole imagemagick for SVG support.

Logos are propriety of their respect owners and I believe the usage here constitutes fair use.