Skip to content
Follow
CMS

How to install Pimcore with Nginx on Ubuntu 24.04

Richard
Written by
Richard
Nov 7, 2024 Updated Jul 11, 2026 9 min read
How to install Pimcore with Nginx on Ubuntu 24.04
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, a flexible open-source platform, centralizes your digital assets and business data to make management easier. This tutorial focuses on setting up Pimcore 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

Nginx is a fast and reliable web server that works well with Pimcore. To install Nginx on Ubuntu for your Pimcore Nginx Ubuntu installation, first update your system’s package list. Then, use a simple command in the Ubuntu terminal to download and set up Nginx.

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
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 store its content, and MariaDB is a great choice for Ubuntu. Installing MariaDB involves updating your system’s packages and then using a command to install the database server. This sets up the foundation for your Pimcore Nginx Ubuntu installation.

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

After installing MariaDB, you must create a specific database and a user account for your Pimcore Nginx Ubuntu installation. This involves logging into MariaDB, creating a new database named ‘pimcoredb’, and setting up a user ‘pimcoredbuser’ with the correct permissions to manage Pimcore’s data.

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 need to install PHP on your Ubuntu system for it to work. This installation includes php-fpm, which helps Pimcore run smoothly, along with other essential PHP extensions needed for your Pimcore Nginx Ubuntu installation. Run the commands below to install the latest PHP version.

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

To begin your Pimcore Nginx Ubuntu installation, you need to download the Pimcore application files to your Ubuntu server. For the free community version, the best way is to use Composer. This requires installing Git and Composer first before you can 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
⚠️Warning
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.

To activate the Pimcore website on Ubuntu 24.04, run the commands `sudo a2ensite pimcore.conf` to enable the virtual host configuration file and `sudo systemctl restart nginx` to restart the Nginx web server. This action makes Pimcore accessible through your web browser.

🐧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

Securing your Pimcore site with Nginx on Ubuntu is essential, and setting up a Let’s Encrypt SSL/TLS certificate is the way to do it. This encrypts the connection between visitors and your server, protecting sensitive data. You can find detailed steps in the linked guide on how to set up Let’s Encrypt 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.

Businesses can effectively manage their content and enhance their online presence with Pimcore by following installation guidelines that ensure proper setup of the software on Ubuntu 24.04.

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.

📚 Related Tutorials

How to Mount Windows 11 Shares on Ubuntu Linux
Ubuntu Linux How to Mount Windows 11 Shares on Ubuntu Linux
How to install Pimcore with Apache on Ubuntu 24.04
CMS How to install Pimcore with Apache on Ubuntu 24.04
How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Install KDE Desktop on Ubuntu 24.04
Ubuntu Linux How to Install KDE Desktop on Ubuntu 24.04

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

Leave a Comment

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