MageBooster
Get installation help
Magento 2.4.9, Mage-OS or Hyvä, on your server or on ours. We reply within one working day with a plan.
✓ Server set-up and tuning✓ Installation and extensions✓ Türkiye, Germany, UK and Europe
From an empty Ubuntu server to a running Magento 2.4.9 store: server choice, Linux setup, tuned-adm, nginx, PHP 8.5, MariaDB, OpenSearch 3, Valkey and Varnish, then Magento itself by Composer, from GitHub or from a ready package.
These are the versions Adobe lists for Magento Open Source and Adobe Commerce 2.4.9 on your own servers. They changed a lot compared with 2.4.8: PHP 8.2, MariaDB 10.6, Elasticsearch and OpenSearch 2 are no longer supported.
| Component | Supported for 2.4.9 |
|---|---|
| PHP | 8.5 |
| Composer | 2.10 |
| MariaDB / MySQL | MariaDB 12.3 or MySQL 8.4 |
| Search | OpenSearch 3 |
| Cache and sessions | Valkey 9 |
| Full page cache | Varnish 8 |
| Web server | nginx 1.30 |
| Message queue (optional) | RabbitMQ 4.3 |
Size the server for search, indexing and checkout, not for the homepage. A catalogue of 50,000 products needs memory for OpenSearch and the database long before the storefront feels slow.
Up to about 5,000 products and a few hundred orders a month. Everything on one server.
Larger catalogues, several store views, Varnish in front. Still one server.
Database and OpenSearch on their own servers, heavy traffic or many integrations.
These steps assume a fresh Ubuntu 24.04 LTS server and a user with sudo rights. Replace example names and passwords with your own.
# a separate user for the shop adduser magento usermod -aG sudo magento # updates, time zone, swap apt update && apt upgrade -y timedatectl set-timezone Europe/Berlin fallocate -l 4G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile echo '/swapfile none swap sw 0 0' >> /etc/fstab # firewall: SSH, HTTP and HTTPS only ufw default deny incoming ufw allow OpenSSH ufw allow 80,443/tcp ufw enable # brute-force protection and automatic security updates apt install -y fail2ban unattended-upgrades
/etc/ssh/sshd_config (PasswordAuthentication no).127.0.0.1 only. They never need an open port.tuned is a Linux service that applies a set of kernel and system settings for a type of workload: CPU frequency behaviour, disk scheduling, memory and network parameters. You pick one profile, tuned applies it and keeps it after a reboot.
apt install -y tuned
systemctl enable --now tuned
tuned-adm recommend # what tuned suggests for this machine
tuned-adm profile virtual-guest
tuned-adm active
tuned-adm verify| Profile | Use it when |
|---|---|
| virtual-guest | The server is a VPS or cloud instance. This is the usual case and what we run. |
| throughput-performance | Dedicated hardware where the total amount of work matters most. |
| latency-performance | Dedicated hardware where every millisecond of response time counts. |
Ubuntu's own nginx is older than 1.30. Use the nginx.org repository:
curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx.gpg echo "deb [signed-by=/usr/share/keyrings/nginx.gpg] http://nginx.org/packages/ubuntu noble nginx" > /etc/apt/sources.list.d/nginx.list apt update && apt install -y nginx
add-apt-repository -y ppa:ondrej/php apt install -y php8.5-fpm php8.5-cli php8.5-bcmath php8.5-curl php8.5-gd php8.5-intl \ php8.5-mbstring php8.5-mysql php8.5-soap php8.5-xml php8.5-xsl php8.5-zip php8.5-sockets
Set these in /etc/php/8.5/fpm/php.ini and in the CLI php.ini:
memory_limit = 2G
max_execution_time = 1800
realpath_cache_size = 10M
realpath_cache_ttl = 7200
opcache.memory_consumption = 512
opcache.max_accelerated_files = 130000
opcache.validate_timestamps = 0 # production: reload PHP-FPM after every deployGive the shop its own PHP-FPM pool running as the magento user, and size pm.max_children to the memory you have: roughly free RAM divided by 150 MB.
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash -s -- --mariadb-server-version="mariadb-12.3" apt install -y mariadb-server mariadb-secure-installation mariadb -e "CREATE DATABASE magento; CREATE USER 'magento'@'localhost' IDENTIFIED BY 'change-this-password'; GRANT ALL ON magento.* TO 'magento'@'localhost';"
In /etc/mysql/mariadb.conf.d/90-magento.cnf start with:
[mysqld] innodb_buffer_pool_size = 4G # about half the RAM on a single-server setup tmpdir = /dev/shm # temporary tables in memory log_bin_trust_function_creators = 1 # Magento creates triggers
curl -fsSL https://artifacts.opensearch.org/publickeys/opensearch-release.pgp | gpg --dearmor -o /usr/share/keyrings/opensearch.gpg echo "deb [signed-by=/usr/share/keyrings/opensearch.gpg] https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt stable main" > /etc/apt/sources.list.d/opensearch-3.x.list apt update && OPENSEARCH_INITIAL_ADMIN_PASSWORD='Change-This-1!' apt install -y opensearch
In /etc/opensearch/opensearch.yml set network.host: 127.0.0.1 and discovery.type: single-node. Set the Java heap in jvm.options to 1–4 GB depending on catalogue size, then systemctl enable --now opensearch.
Valkey replaces Redis for cache and sessions in 2.4.9 and uses the same Magento settings. Ubuntu 24.04 only packages Valkey 7.2, so install version 9 from the official release on valkey.io (build from source) or run it as a container. Ubuntu 26.04 includes Valkey 9 in apt. Bind it to 127.0.0.1 and use separate database numbers for cache, page cache and sessions.
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish80/script.deb.sh | bash apt install -y varnish
Varnish listens on port 80 behind your TLS termination (nginx or Cloudflare) and talks to nginx on an internal port such as 8080. After Magento is installed, generate the VCL with bin/magento varnish:vcl:generate.
curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer composer --version
There are three ways to get the code. For a live store use Composer: it is the only way that gives you clean upgrades and security patches later.
Create a free Adobe account, open Commerce Marketplace › My profile › Access keys and create a key pair. The public key is the username, the private key the password.
cd /var/www composer create-project \ --repository-url=https://repo.magento.com/ \ magento/project-community-edition=2.4.9 magento
The full source code with history. Good for reading the code and contributing, not for a live store.
git clone --branch 2.4.9 --depth 1 \ https://github.com/magento/magento2.git magento cd magento && composer install
The 2.4.9 source archive from GitHub. Download, unpack, then let Composer fetch the libraries.
curl -LO https://github.com/magento/magento2/archive/refs/tags/2.4.9.tar.gz tar xzf 2.4.9.tar.gz && mv magento2-2.4.9 magento cd magento && composer install --no-dev
Set the file owner first, then run the installer as the magento user:
cd /var/www/magento
chown -R magento:www-data .
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
bin/magento setup:install \
--base-url=https://www.example.com/ \
--db-host=localhost --db-name=magento --db-user=magento --db-password='change-this-password' \
--admin-firstname=Admin --admin-lastname=Store --admin-email=you@example.com \
--admin-user=youradmin --admin-password='a-long-unique-password' \
--backend-frontname=a-private-admin-path \
--language=en_US --currency=EUR --timezone=Europe/Berlin --use-rewrites=1 \
--search-engine=opensearch --opensearch-host=127.0.0.1 --opensearch-port=9200 \
--opensearch-enable-auth=1 --opensearch-username=admin --opensearch-password='Change-This-1!' \
--session-save=redis --session-save-redis-host=127.0.0.1 --session-save-redis-db=2 \
--cache-backend=redis --cache-backend-redis-server=127.0.0.1 --cache-backend-redis-db=0 \
--page-cache=redis --page-cache-redis-server=127.0.0.1 --page-cache-redis-db=1The redis options work with Valkey. Then switch to production mode and set up cron and indexers:
bin/magento deploy:mode:set production bin/magento cron:install bin/magento indexer:set-mode schedule bin/magento indexer:reindex
'disable_locking' => '1' under session › redis in app/etc/env.php. On one of our servers this took the customer data requests after page load from 2.2 s to 0.6 s.| Symptom | Cause and fix |
|---|---|
| Changes do not show after a deploy | Old layout or static files in cache. Clean the cache, and if the layout still does not change, flush the Valkey database that holds Magento's cache (never the session database). |
| The store is slow for an hour after every deploy | Cleaning the full page cache empties all of Varnish. Warm the most visited pages straight after the deploy. |
| First requests after a PHP reload take 2–3 seconds | OPcache was emptied. Expected; send a few requests yourself before customers do. |
| Locked out of SSH | A firewall rate limit on the SSH port. Allow your own IP address before enabling limits. |
| Search returns nothing | OpenSearch is not reachable or the index is empty. Check curl 127.0.0.1:9200 and run bin/magento indexer:reindex catalogsearch_fulltext. |
MageBooster installs and looks after Magento, Mage-OS and Hyvä stores in Türkiye, Germany, the UK and across Europe. We can do the whole installation for you, or check yours.
Tell us which sentence is wrong and what it should say. Thank you!
Thank you! We have received your report.
Something went wrong. Please try again or message us on WhatsApp.
Send your store details. We check speed, security and extensions, then reply with three quick wins within 3 working days.
Tell us about your store and we’ll reply within one working day. Prefer to chat? Say hello from WhatsApp
Step 1 of 4
You can change this per project later.
Choose one option to continue.
Step 2 of 4
So we know who we are talking to.
Please fill in your name, company and a valid email.
Step 3 of 4
Helps us prepare the first call.
What best describes you? *
Team size
Which platforms do you work with today?
Choose what best describes you.
Step 4 of 4
Check your details. You can go back to change anything.
Please tick the box to send your application.
Something went wrong. Please try again or message us on WhatsApp.
We have sent you a confirmation email. What happens next:
We usually reply within one business day.