Running Akeneo Community Edition (CE) on DigitalOcean involves deploying a Virtual Private Server (Droplet) and installing the necessary stack (PHP, MySQL/MariaDB, Elasticsearch, Apache/Nginx). While Docker is often recommended for modern Akeneo versions, a manual LAMP/LEMP stack installation on Ubuntu 22.04 or 24.04 is a reliable approach.
1. Create a DigitalOcean Droplet
- This step are very easy and not scope of this post, just create a regular Ubuntu Droplet.
2. Prepare the Server (Pre-installation)
apt update
apt upgrade -y
apt dist-upgrade
apt install apache2 -y
sudo systemctl enable apache2
sudo systemctl start apache2
sudo apt-get install -y apt-transport-https
sudo apt install php8.3 libapache2-mod-php8.3 php8.3-cli php8.3-mysql php8.3-curl php8.3-xml php8.3-mbstring php8.3-zip php8.3-gd php8.3-intl -y
sudo apt install aspell aspell-en
sudo a2enmod rewrite
sudo systemctl restart apache2
# Install Elastic Search
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" \
| sudo tee /etc/apt/sources.list.d/elastic-8.x.list
sudo apt-get update
sudo apt-get install elasticsearch=8.17.0
sudo apt-mark hold elasticsearch
sudo systemctl daemon-reload
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch
# edit the config
vim /etc/elasticsearch/elasticsearch.yml
replaces the content with:
---
cluster.name: akeneo-cluster
node.name: akeneo-node
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 127.0.0.1
http.port: 9200
discovery.type: single-node
xpack.security.enabled: false
---
sudo chown -R elasticsearch:elasticsearch /var/lib/elasticsearch
sudo chown -R elasticsearch:elasticsearch /var/log/elasticsearch
sudo systemctl daemon-reload
sudo systemctl restart elasticsearch
Then test it with:
curl localhost:9200
# install composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c8b085408188070d5f52bcfe4ecfbee5f727afa458b2573b8eaaf77b3419b0bf2768dc67c86944da1544f06fa544fd47') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
3. Install and Configure Akeneo
cd /var/www
git clone https://github.com/akeneo/pim-community-dev.git
mv pim-community-dev html
cd html
sudo -u www-data composer install
bin/console pim:installer:check-requirements
php bin/console pim:install –env=dev –force
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash –
sudo apt install -y nodejs
4. Configure Web Server (Apache HTTPS)
sudo apt install certbot python3-certbot-apache
sudo certbot –apache
5. Optional: DigitalOcean Managed Database (MySQL)
6. Install Superviser
apt install supervisor
Add a config with the following:
[program:akeneo_queue_daemon]
command=/usr/bin/php /var/www/html/bin/console messenger:consume ui_job import_export_job data_maintenance_job –env=prod -vv
autostart=true
autorestart=true
stderr_logfile=/var/log/akeneo_daemon.err.log
stdout_logfile=/var/log/akeneo_daemon.out.log
user=my_user
stopasgroup=true
Key Considerations
- Elasticsearch: Akeneo will not run without a properly configured, active Elasticsearch instance.
- Cron Jobs: Set up the required cron jobs for indexation and data maintenance.
- Performance: For a better experience, consider Docker-based installation if you are familiar with containerisation.
Leave a Reply