Skip to content
Follow
CMS

How to Install TYPO3 with Nginx on Ubuntu 24.04

Richard
Written by
Richard
Jun 3, 2024 Updated Sep 15, 2026 7 min read
TYPO3 featured image
TYPO3 featured image

Installing TYPO3 with Nginx on Ubuntu 24.04 sets up a fast web hosting environment for your site. TYPO3 is a free content management system (software that lets you build and run websites), and Nginx is a web server that loads pages quickly for visitors.

Advertisement

Ubuntu 24.04 gives you full control over your server stack so you can run your new website smoothly. Follow these steps to get both tools ready on your server.

⚡ Quick Answer

Install Nginx and PHP-FPM via `apt install nginx php-fpm php-intl php-mysql php-curl php-cli php-zip php-xml php-gd php-common php-mbstring php-xmlrpc php-json php-sqlite3 php-soap php-zip`. Then, set up MariaDB and create a `typo3db` database with user `typo3dbuser`.

Advertisement

Install Nginx HTTP server on Ubuntu

To install Nginx on Ubuntu 24.04 for your TYPO3 server, open your terminal and run the commands sudo apt update followed by sudo apt install nginx. This sets up the Nginx HTTP server to deliver your website files to visitors over the internet and keeps your web traffic running smoothly.

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.

Advertisement

http://localhost

Default Nginx welcome page displayed after installation on Ubuntu 24.04
Default Nginx welcome page displayed after installation on Ubuntu 24.04

When you see "Welcome to nginx!" the Nginx HTTP server has been installed.

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

How to install Nginx on Ubuntu

Advertisement

Install MariaDB database server on Ubuntu Linux

To install MariaDB database server on Ubuntu Linux for your TYPO3 site, open your terminal and run the standard package manager installation commands. MariaDB acts as the secure relational database system that stores all your website content, user accounts, and configuration settings in one reliable place.

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.

Advertisement
🐧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.

Advertisement

Create a TYPO3 database

To create a TYPO3 database in MariaDB, log into your database console and run the SQL commands to make a new database named typo3db along with a dedicated user. This gives TYPO3 its own isolated storage space and user account with full permissions to manage website data securely.

As part of the setup, we will create a database named 'typo3db' and a corresponding user account called 'typo3dbuser.'

The typo3dbuser now receives full access to the typo3db database, which is necessary for TYPO3 to store and retrieve website content and settings.

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

Advertisement

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 typo3db CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER typo3dbuser@localhost IDENTIFIED BY 'type_your_password_here';
GRANT ALL ON typo3db.* TO typo3dbuser@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
⚠️WarningEnsure to replace 'type_your_password_here 'with your password.

Install PHP-FPM on Ubuntu Linux

To install PHP-FPM on Ubuntu Linux for TYPO3, run the apt install command with the required PHP extensions like mysql, curl, and mbstring. TYPO3 requires PHP-FPM and these specific modules to process dynamic scripts and run the content management system without errors.

Advertisement

Run the commands below to install PHP-FPM.

🐧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-json php-sqlite3 php-soap php-zip

Additional help on installing PHP

How to install PHP on Ubuntu Linux

Download TYPO3 files

To download TYPO3 files to your Ubuntu server, grab the latest stable archive directly from the official website and extract it into your web root directory. Getting the most recent release ensures your content management system includes all current security patches and core features.

⚠️WarningAlways check the download page for the latest release.

Replace the download link below with the current so you have the latest version.

You may want to use the GitHub repository to get TYPO3's latest release. Install Composer, Curl, and other dependencies to get started.

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

After installing curl and Composer above, change the directory to the Nginx root directory and download the TYPO3 packages from Github. Always replace the release number with the latest release.

⬛Command Prompt
cd /var/www/
sudo composer create-project typo3/cms-base-distribution typo3 ^13
sudo touch /var/www/typo3/public/FIRST_INSTALL
sudo chown -R www-data:www-data /var/www/typo3

Once all the steps are done, configure the Nginx webserver to serve the TYPO3 content.

Run the commands below to create a Nginx server block file for TYPO3.

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

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

🐘PHP
server
{
listen 80;
listen [::]:80;
server_name typo3.example.com;

root /var/www/typo3/public;
index index.php;

error_log /var/log/nginx/typo3.error;
access_log /var/log/nginx/typo3.access;

location /
{
try_files $uri $uri/ @sfc;
}

# Special root site case. prevent "try_files $uri/" + "index" from skipping the cache
# by accessing /index.php directly
location =/
{
recursive_error_pages on;
error_page 405 = @sfc;
return 405;
}

location @t3frontend
{
# Using try_files for ease of configuration demonstration here,
# you can also fastcgi_pass directly to php here
try_files $uri /index.php$is_args$args;
}

location @sfc
{
# Perform an internal redirect to TYPO3 if any of the required
# conditions for StaticFileCache don't match
error_page 405 = @t3frontend;

# Query String needs to be empty
if ($args != '')
{
return 405;
}

# We can't serve static files for logged-in BE/FE users
if ($cookie_staticfilecache = 'typo_user_logged_in')
{
return 405;
}

if ($cookie_be_typo_user != '')
{
return 405;
}

# Ensure we redirect to TYPO3 for non GET/HEAD requests
if ($request_method !~ ^(GET|HEAD)$ )
{
return 405;
}

# Disable cache for EXT:solr indexing requests
if ($http_x_tx_solr_iq)
{
return 405;
}

charset utf-8;
default_type text/html;
try_files /typo3temp/assets/tx_staticfilecache/${scheme}_${host}_${server_port}${uri}/index
/typo3temp/assets/tx_staticfilecache/${scheme}_${host}_${server_port}${uri}
=405;
}

location /typo3temp/assets/tx_staticfilecache
{
deny all;
}

location ~ .php$
{
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
}
}

Save the file.

The TYPO3 virtual host configuration uses the `sudo systemctl enable typo3.conf` command, and you restart the Nginx web server with `sudo systemctl restart nginx`. These commands make the Nginx web server aware of the TYPO3 site's location, allowing Nginx to serve your TYPO3 website to visitors.

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

Setup Let's Encrypt SSL/TLS for TYPO3

To set up Let's Encrypt SSL/TLS for TYPO3 on Nginx, install Certbot and request a free security certificate for your domain name. This encrypts all traffic between your visitors and your server, changing your website address from HTTP to secure HTTPS.

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://typo3.example.com

A TYPO3 installation wizard page should appear. Click the continue button if all requirements are met.

TYPO3 install wizard
TYPO3 install wizard

Run the command below to fix some of the problems detected.

🐧Bash / Shell
sudo sed -i "s/;max_input_vars = .*/max_input_vars = 1500/" /etc/php/8.3/fpm/php.ini
sudo sed -i "s/max_execution_time = .*/max_execution_time = 240/" /etc/php/8.3/fpm/php.ini
sudo systemctl reload php8.3-fpm

Next, enter the database username and password created above and click continue.

TYPO3 install database connection
TYPO3 install database connection

Then, select the database on the next page.

TYPO3 install database
TYPO3 install database

Next, create an administrator account and click continue.

TYPO3 install admin account
TYPO3 install admin account

Your TYPO3 site should be ready to use.

TYPO3 install wizard complete
TYPO3 install wizard complete

That should do it!

Conclusion:

  • In this guide, we have successfully set up TYPO3 with Nginx support on Ubuntu 24.04, leveraging Nginx's high performance and stability along with TYPO3's flexibility as a content management system.
  • The installation involved setting up Nginx, installing MariaDB for database support, configuring a TYPO3 database, installing PHP-FPM, and downloading and configuring TYPO3 files on Ubuntu Linux.
  • To enhance security, we also explored setting up an SSL/TLS certificate for TYPO3 using Let's Encrypt, which ensures a secure browsing experience for site visitors.
  • By following these comprehensive steps, users can seamlessly establish a robust web hosting environment for TYPO3 powered by Nginx on Ubuntu, providing optimal performance and security for their web content.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

📚 Related Tutorials

How to Install Nginx on Ubuntu Linux
Ubuntu Linux How to Install Nginx on Ubuntu Linux
How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Install TYPO3 with Apache on Ubuntu 24.04
CMS How to Install TYPO3 with Apache on Ubuntu 24.04
How to Install Drupal with OpenLiteSpeed on Ubuntu Linux
CMS How to Install Drupal with OpenLiteSpeed on Ubuntu Linux

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

Leave a Comment

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