Skip to content
CMS

How to install Pimcore with Nginx on Ubuntu 24.04

Richard
Written by
Richard
Nov 7, 2024 Updated Jun 20, 2026 8 min read
How to install Pimcore with Nginx on Ubuntu 24.04

You install Pimcore with Nginx on Ubuntu 24.04 to create a powerful platform for integrating Product Information Management (PIM), Master Data Management (MDM), Content Management System (CMS), and eCommerce.

Pimcore is a flexible open-source platform that centralizes your digital assets and business data, making it easier to manage. This tutorial focuses on setting it up on Ubuntu 24.04 LTS.

We’ll use Nginx as the web server, renowned for its speed and efficiency in handling high traffic, which is perfect for demanding applications like Pimcore.

⚡ Quick Answer

Install Nginx via `sudo apt install nginx`, then MariaDB with `sudo apt install mariadb-server`. Create a Pimcore database using `CREATE DATABASE pimcoredb`. Finally, install PHP with `sudo apt install php-fpm` and its required extensions.

Install Nginx HTTP server on Ubuntu

To get Pimcore running, you first need a web server, and Nginx is a great choice for your Ubuntu system. Installing Nginx on Ubuntu is simple using the terminal; you’ll just update your package list and then install the Nginx software.

To do that, open the Ubuntu terminal and run the commands below to install the Nginx web server.

🐧Bash / Shell
sudo apt update
sudo apt install nginx

Once Nginx is installed, the commands below can start, stop, and enable the Nginx web server to start automatically when your server boots up.

🐧Bash / Shell
sudo systemctl stop nginx
sudo systemctl start nginx
sudo systemctl enable nginx

You can test the Nginx web server by opening your web browser and browsing to the server’s localhost or IP address.

http://localhost

Default Nginx welcome page confirming successful installation on Ubuntu 24.04

When you see the Welcome to nginx!, it means the Nginx HTTP server is successfully installed.

Additional help on installing Nginx on Ubuntu is in the link below.

How to install Nginx on Ubuntu

Install the MariaDB database server on Ubuntu

Pimcore needs a database to keep all its information safe, and MariaDB is a popular option for this. To get MariaDB running on your Ubuntu system, open your terminal and use the package manager commands to update and then install the MariaDB server.

To install and use the MariaDB database server, use the instructions below.

Open the Ubuntu terminal and run the commands below to install the MariaDB database server.

🐧Bash / Shell
sudo apt update
sudo apt install mariadb-server

Once the MariaDB database server is installed, use the commands below to stop, start, and enable the MariaDB server to start automatically when the server boots.

🐧Bash / Shell
sudo systemctl stop mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

Run the following commands to validate and test if the MariaDB database server is installed successfully.

🐧Bash / Shell
sudo mariadb

Once you run the commands above, it will log you onto the MariaDB console and display a message similar to the one below.

💻Code
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 32
Server version: 10.11.2-MariaDB-1 Ubuntu 23.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> 

The message tells you that the server is installed successfully.

Additional help on installing MariaDB.

Create a Pimcore database

Once MariaDB is set up, you need to create a specific database for Pimcore to store its data. This involves creating a new database, setting up a user for it, and giving that user the right permissions to manage Pimcore’s information.

As part of the setup, we will create a pimcoredb database and a user account called pimcoredbuser.

Finally, we’ll grant the pimcoredbuser full access to the pimcoredb database.

All the database steps above can be done using the commands below:

But first, log on to the MariaDB database server:

🐧Bash / Shell
sudo mariadb

Then run the commands below to complete the steps:

💻Code
CREATE DATABASE pimcoredb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER pimcoredbuser@localhost IDENTIFIED BY 'type_your_password_here';
GRANT ALL ON pimcoredb.* TO pimcoredbuser@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit

Ensure to replace ‘type_your_password_here ‘with your password.

Install PHP on Ubuntu Linux

Pimcore is built with PHP, so you’ll need to install it on your Ubuntu system to make it work. The commands below will install PHP’s FastCGI Process Manager (php-fpm) and all the necessary PHP extensions that Pimcore needs to run smoothly.

Then, run the commands below to install the latest PHP version.

🐧Bash / Shell
sudo apt install php-fpm php-intl php-mysql php-curl php-cli php-zip php-xml php-gd php-common php-mbstring php-xmlrpc php-bcmath php-json php-sqlite3 php-soap php-zip

Additional help on installing PHP

How to install PHP on Ubuntu Linux

Get Pimcore files

Now it’s time to download the Pimcore application files onto your Ubuntu server. For the free version, using Composer is the best way; you’ll first need to install Git and Composer, then you can run the command to download Pimcore.

There are multiple ways to get Pimcore installed. For the free community version, the composer installer is the right choice.

First, install git, Composer, and other dependencies.

🐧Bash / Shell
sudo apt install curl git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Next, change to the Nginx web server directory and clone Pimcore files. The last command allows the Nginx web server to interact safely with the files, ensuring a secure environment for your Pimcore installation.

Command Prompt
cd /var/www/
sudo COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo pimcore
sudo chown www-data:www-data -R /var/www/pimcore/

Note: Alternatively, install the skeleton copy if you do not want to install Pimcore with demo content.

🐧Bash / Shell
sudo COMPOSER_MEMORY_LIMIT=-1 composer --ignore-platform-req=ext-amqp create-project pimcore/skeleton pimcore

After that, run the command below to install Pimcore.

Command Prompt
cd /var/www/pimcore
sudo -u www-data ./vendor/bin/pimcore-install

Once you have completed all the above steps, continue configuring the Nginx web server below to serve the Pimcore content.

You will be prompted to create an admin account, type the database and account created above to complete the installation.

💻Code
Admin username:
> superadmin

Admin password (input will be hidden):
>

MySQL username:
> pimcoredbuser

MySQL password (input will be hidden):
>

MySQL database:
> pimcoredb

This will install Pimcore with the given settings. Do you want to continue? (yes/no) [yes]:
>

Running installation. You can find a detailed install log in var/installer/log/dev.log

Install complete!

11/11 [============================] 100%

Trying to install assets as relative symbolic links.

--- ------------------------------------------ ------------------
Bundle Method / Error
--- ------------------------------------------ ------------------
✔ FOSJsRoutingBundle relative symlink
✔ PimcoreAdminBundle relative symlink
✔ PimcoreCustomReportsBundle relative symlink
✔ PimcorePersonalizationBundle relative symlink
✔ PimcoreEcommerceFrameworkBundle relative symlink
✔ PimcoreApplicationLoggerBundle relative symlink
✔ PimcoreGoogleMarketingBundle relative symlink
✔ PimcoreCustomerManagementFrameworkBundle relative symlink
✔ PimcoreNewsletterBundle relative symlink
✔ PimcoreGlossaryBundle relative symlink
✔ PimcoreSeoBundle relative symlink
✔ PimcoreSimpleBackendSearchBundle relative symlink
✔ PimcoreDataHubBundle relative symlink
✔ OutputDataConfigToolkitBundle relative symlink
✔ Web2PrintToolsBundle relative symlink
✔ ObjectMergerBundle relative symlink
✔ PimcoreWebToPrintBundle relative symlink
✔ PimcoreTinymceBundle relative symlink
✔ PimcoreStaticRoutesBundle relative symlink
✔ PimcoreWordExportBundle relative symlink
✔ PimcoreXliffBundle relative symlink
✔ PimcoreCoreBundle relative symlink
--- ------------------------------------------ ------------------
[OK] All assets were successfully installed.
[OK] Pimcore was successfully installed

After Pimcore installation, continue below to set up Nginx to serve Pimcore’s content.

Run the commands below to create a Nginx virtual host file for Pimcore.

🐧Bash / Shell
sudo nano /etc/nginx/sites-available/pimcore.conf

Then, copy and paste the content block below into the Nginx server block.

🐘PHP
upstream php-pimcore {
server unix:/var/run/php/php8.3-fpm.sock;
}

map $args $static_page_root {
default /var/tmp/pages;
"~*(^|&)pimcore_editmode=true(&|$)" /var/nonexistent;
"~*(^|&)pimcore_preview=true(&|$)" /var/nonexistent;
"~*(^|&)pimcore_version=[^&]+(&|$)" /var/nonexistent;
}

map $uri $static_page_uri {
default $uri;
"/" /%home;
}

server {
listen 80;
listen [::]:80;
server_name pimcore.example.com;
root /var/www/pimcore/public;
index index.php;

access_log /var/log/nginx/forums-access.log;
error_log /var/log/nginx/forums-error.log;

location ~* ^/admin/external {
rewrite .* /index.php$is_args$args last;
}

location / {
error_page 404 /meta/404;
try_files $static_page_root$static_page_uri.html $uri /index.php$is_args$args;
}

location ~ ^/index.php(/|$) {
fastcgi_split_path_info ^(.+.php)(/.+)$;
try_files $fastcgi_script_name =404;
include fastcgi.conf;
set $path_info $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_pass php-pimcore;
internal;
}
}

Save the file.

Then, run the commands below to enable the virtual host and restart the Nginx server.

🐧Bash / Shell
sudo ln -s /etc/nginx/sites-available/pimcore.conf /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Setup Let’s Encrypt SSL/TLS for Pimcore

To keep your Pimcore site secure, you should add an SSL/TLS certificate using Let’s Encrypt. This encrypts the connection between visitors and your server, protecting data privacy, and we’ll show you how to set this up for Nginx.

Please read the post below for additional resources on installing and creating Let’s Encrypt SSL certificates for Nginx.

How to set up Let’s Encrypt SSL certificate for Nginx on Ubuntu Linux

Once you have restarted the Nginx web server, open your browser and browse to the server hostname or IP address defined in the Nginx server block.

💻Code
http://pimcore.example.com/

A Pimcore web portal page should appear.

Pimcore portal
Pimcore portal

To log on to the backend admin page, use the URL below.

💻Code
http://pimcore.example.com/admin

That should do it!

Conclusion:

Setting up Pimcore on Ubuntu with Nginx is a streamlined process that equips businesses with a powerful content management system. To summarize:

  • Robust Platform: Pimcore integrates essential components like PIM, MDM, CMS, and eCommerce, offering a comprehensive solution for content management.
  • High Performance with Nginx: Utilizing Nginx enhances performance, allowing for high levels of concurrent connections and efficient resource management.
  • Easy Database Setup: Installing MariaDB and creating a dedicated database simplifies data management for Pimcore.
  • PHP Compatibility: Ensuring the latest version of PHP is installed guarantees optimal performance and support for the Pimcore application.
  • Secure Hosting: Implementing a virtual host and securing the installation with Let’s Encrypt SSL certificates ensures safety and reliability for users.

By following these guidelines, businesses can effectively manage their content and enhance their online presence with Pimcore.

Does nginx run on Ubuntu?

Nginx is available in Ubuntu's default repositories. Install it using the apt packaging system. First, update the local package index to access the most recent package listings, then install nginx : sudo apt update.

How do I know if nginx is installed on Ubuntu?

You can verify that nginx is running via this command: $ sudo systemctl status nginx ● nginx. service – A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *

Exit mobile version