Odoo Nginx Reverse Proxy

How to Configure Odoo with Nginx as Reverse Proxy on Debian 13

If you are planning to deploy Odoo in a production environment, configuring it behind a reverse proxy like Nginx is highly recommended. Odoo’s built-in server is sufficient for development but not optimized for handling SSL encryption, load balancing, URL routing, and performance tuning. Nginx acts as a powerful reverse proxy that enhances reliability, security, and performance, making your Odoo installation production-ready.

In this tutorial, you will learn step-by-step how to configure Odoo with Nginx as a reverse proxy on Debian 13, including SSL setup.

Step 1: Update Operating System

Update your Debian 13 operating system to the latest version with the following command:

# apt update && apt upgrade

Step 2: Install Nginx Web Server

To install Nginx web server, run the following command:

Cloud server hosting
# apt install nginx

You can start the Nginx service and configure it to run on startup by entering the following commands:

# systemctl start nginx
# systemctl enable nginx

Verify the status of the Nginx service using systemctl status command:

# systemctl status nginx

Step 3: Configure Odoo for Reverse Proxy

Make sure that Odoo is configured to work behind a proxy. In the Odoo configuration file (/etc/odoo.conf), you need to set the proxy_mode parameter to True:

proxy_mode = True

After making the changes, it’s important to restart the Odoo service to ensure the changes take effect:

# systemctl restart odoo

Step 4: Configure Nginx for Odoo

Now we set up the Nginx configuration to route traffic to Odoo.

Create a new configuration file:

# /etc/nginx/conf.d/odoo.conf

Paste the following configuration (replace erp.example.com with your real domain):

upstream odoo {
server 127.0.0.1:8069;
}

upstream odoo-chat {
server 127.0.0.1:8072;
}

server {
listen 80;
server_name erp.example.com;

access_log /var/log/nginx/odoo_access.log;
error_log /var/log/nginx/odoo_error.log;

proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;

proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;

location / {
proxy_pass http://odoo;
}

location /websocket {
proxy_pass http://odoo-chat;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

Save the file and Exit.

Check Nginx syntax:

# /usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

To implement the changes, restart Nginx webserver:

# systemctl restart nginx

You can now open your Odoo at:

http://erp.your-domain.com

However, this is still not secure because we are using HTTP.

Step 5: Install free Let’s Encrypt SSL certificate (Optional)

First you need to install the Certbot client which is used to create Let’s Encrypt certificates:

# apt install certbot python3-certbot-nginx

Then to get the SSL certificate using the Certbot, type the following command:

# certbot --nginx -d erp.your-domain.com

If the SSL certificate is successfully obtained, certbot displays a message to show the configuration was successful:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for erp.your-domain.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/erp.your-domain.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/erp.your-domain.com/privkey.pem
This certificate expires on 2026-02-16.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for erp.your-domain.com to /etc/nginx/conf.d/odoo.conf
Congratulations! You have successfully enabled HTTPS on https://erp.your-domain.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Now, you have successfully installed SSL on your website.

Step 6: Access Odoo server

Open your web browser and type the URL https://erp.your-domain.com.

You should now see your Odoo login page loading securely via Nginx.

Comments and Conclusion

Configuring Nginx as a reverse proxy for Odoo enhances security, performance, and scalability.

It allows you to run Odoo in a professional production environment with HTTPS, HTTP/2, caching, and better resource usage.

If you have any questions please leave a comment below.

 

How to Install ERPNext v15 on Debian 13

ERPNext is one of the most powerful open-source ERP systems available today. Built on the Frappe Framework, it provides modules for Accounting, HR, CRM, Projects, Inventory, Sales, POS, Manufacturing, and much more. With the release of ERPNext 15, users get improved UI, faster performance, and more stable backend architecture.

In this tutorial, you’ll learn how to install ERPNext 15 on Debian 13 from scratch including all dependencies, system configuration, database tuning, production setup and install an SSL certificate.

Step 1: Update Operating System

First check the server’s current time zone with the following command:

# date

Then Set correct time zone as per your region with the following command:

# timedatectl set-timezone "America/Chicago"

This is a important step as it impacts the ERPNext usage.

Then update your Debian 13 operating system to the latest version with the following command:

# apt update && apt upgrade

This ensures all dependencies are up-to-date and prevents conflicts later.

Step 2: Install Required Dependencies

In this step we will install the required system-level packages for the system to work correctly.

# apt install -y git curl wget sudo certbot

Also, ERPNext needs several Python packages to build Python modules and run Frappe.

# apt install -y python3 python3-dev python3-setuptools python3-pip python3-venv libffi-dev libssl-dev libsasl2-dev

These libraries allow Frappe to compile PDF rendering, image processing, database drivers, and more.

Step 3: Add a new user

Now we will create a dedicated user for your ERP application. This user will be assigned admin permissions and will be used as the main Frappe Bench user:

# /sbin/adduser erpnext

To add the user to the sudo group, use the usermod command as follows:

# /sbin/usermod -aG sudo erpnext

Then log in as the new user:

# su - erpnext

Step 4: Install MariaDB

You can install the MariaDB server with the following command:

$ sudo apt install -y mariadb-server mariadb-client

Start the database server daemon, and also enable it to start automatically at the next boot with the following commands:

$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb

Verify the status of the MariaDB service using systemctl status command:

$ sudo systemctl status mariadb

By default, MariaDB is not hardened. You can secure MariaDB using the mariadb-secure-installation script.

$ sudo mariadb-secure-installation

Configure it like this:

- Set root password? [Y/n] Y
- Remove anonymous users? [Y/n] Y
- Disallow root login remotely? [Y/n] Y
- Remove test database and access to it? [Y/n] Y
- Reload privilege tables now? [Y/n] Y

Step 5: Install Node.js

Run the following command to install Node.js:

$ sudo apt install nodejs npm

You can verify the installation by running the following command:

$ node --version

You should see the version number of Node.js installed on your system:

v20.19.2

Then verify the npm version with the following command:

$ npm --version

You should get the following output:

9.2.0

ERPNext uses Yarn for building frontend assets.

$ sudo npm install -g yarn

Step 6: Install Redis Server

Redis handles caching and web socket communication for real-time features.

$ sudo apt install -y redis-server
$ sudo systemctl enable --now redis-server

Step 7: Install Frappe Bench

Bench is the command-line tool used to manage ERPNext installations. Use the following commands to install the Bench CLI:

$ sudo apt remove python3-requests
$ sudo python3 -m pip config set global.break-system-packages true 
$ sudo pip3 install frappe-bench 

Confirm installation:

 $ bench --version

You should get the following output:

5.27.0

Now initialize a new Bench directory:

$ bench init frappe-bench --frappe-branch version-15
$ cd frappe-bench

This creates a full environment with Python virtualenv and node tools.

Now change user directory permissions. This will allow execution permission to the home directory of the frappe user.

chmod -R o+rx /home/erpnext/

Create a new Frappe site with the following command:

$ bench new-site erp.yourdomain.com

You will be prompted for:

  • MySQL root password
  • ERPNext administrator password

Step 8: Install ERPNext and other Apps

Finally, we’re at the last stage of the installation process!

Download the payments apps . This app is required during ERPNext installation

 $ bench get-app payments

Download the main ERPNext app with the following command:

$ bench get-app --branch version-15 erpnext

Download the HR & Payroll app (optional)

$ bench get-app hrms

Check if all the apps are correctly downloaded by running:

$ bench version --format table

Now install it on your site:

$ bench --site erp.yourdomain.com install-app erpnext

Install the HR & Payroll app (optional)

$ bench --site erp.yourdomain.com install-app hrms

Step 9: Test ERPNext in Development Mode (Optional)

You can launch a development server with the following command:

$ bench start

You can access ERPNext at:

http://YOUR_SERVER_IP:8000

Step 10: Setting ERPNext in Production Mode

For the production environment, we need to configure Nginx and Supervisor to keep application running in background.

You can install them with the following command:

$ sudo apt install nginx supervisor

Enable scheduler service

$ bench --site erp.yourdomain.com enable-scheduler

Disable maintenance mode

bench --site erp.yourdomain.com set-maintenance-mode off

Setup production config

$ sudo bench setup production erpnext

Restart Supervisor

$ sudo supervisorctl restart all

Step 11: Custom Domain & SSL Setup

For SSL configuration, you can run the following commands:

$ bench config dns_multitenant on
$ sudo bench setup lets-encrypt erp.yourdomain.com

Step 12: Access your ERPNext Application

Open your browser and type your domain e.g https://erp.yourdomain.com

Comments and Conclusion

Installing ERPNext 15 on Debian 13 is straightforward when following the official bench method.

This tutorial covered everything from installing dependencies and configuring MariaDB to setting up NGINX, Supervisor, and full production deployment.

ERPNext 15 provides excellent performance, modularity, and flexibility. With this setup, your business now has a powerful ERP ready to use.

For additional help or useful information, we recommend you to check the official ERPNext documentation.

If you have any questions please leave a comment below.

How to Install Python 3.14 on Ubuntu 24.04

Python is one of the most popular programming languages in the world, widely used for web development, data science, automation, and DevOps. With every new release, Python introduces performance improvements, security patches, and modern syntax features that make development smoother and faster.

This tutorial illustrates two methods of how to install it on your Ubuntu 24.04 OS.

  • Install Python 3.14 from the Deadsnakes PPA
  • Manually build Python 3.14 from the source code

Why Upgrade to Python 3.14?

Before diving into the commands, it’s worth understanding why upgrading to Python 3.14 is beneficial.

Some of the expected improvements in Python 3.14 include:

  • Performance boosts: Faster startup times and optimized memory usage.
  • Enhanced syntax features: Cleaner pattern matching and new language constructs.
  • Improved error messages: More readable and beginner-friendly tracebacks.
  • Security updates: Stronger hashing algorithms and better sandboxing support.

Python 3.14 is fully backward compatible with most 3.x scripts, but testing your projects in a virtual environment is still recommended before full migration.

Update and Upgrade Your System

Start by updating your Ubuntu 24.04 system to avoid package conflicts:

# apt update && sudo apt upgrade -y

Method 1: Install Python 3.14 Using Deadsnakes PPA (Recommended)

This method makes it easy to install Python 3.14 on Ubuntu 24.04 and be able to receive continued updates, bug fixes, and security updates.

The Deadsnakes PPA is a trusted third-party repository that provides newer versions of Python for Ubuntu systems.

First Add the Deadsnakes PPA to the APT package manager sources list:

# add-apt-repository ppa:deadsnakes/ppa -y

Press Enter to continue.

Once the repository has been installed, run an APT update to ensure that the newly imported PPA is reflected.

# apt update

Now you can  install Python 3.14 with the following command:

# apt install python3.14 -y

Then verify the installation with the following command:

# python3.14 --version

You should see output similar to:

Python 3.14.0

If you have installed Python 3.14 using the APT package manager, the PIP will not be installed by default. To install pip3.14, run the following command:

# curl -sS https://bootstrap.pypa.io/get-pip.py | python3.14 

You can check PIP for the Python 3.14 version using the following command:

# pip3.14 -V

pip 25.3 from /usr/local/lib/python3.14/site-packages/pip (python 3.14)

Method 2: Build Python 3.14 from Source

Also, you can compile Python 3.14 manually from the official source code. With this installation method, the main issue is that you cannot quickly update like the APT package manager and will need to recompile for any changes.

First, install the required prerequisite packages for the compilation of the Python 3.10 source code.

# apt install -y build-essential libssl-dev zlib1g-dev \
libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev \
libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev \
tk-dev libffi-dev uuid-dev wget

Now proceed and download the latest release version of Python from the Python official release page.

Alternatively, copy the download link for Python 3.14 gzipped tarball and use wget to pull it with the following command:

# cd /usr/src && wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz

Once done, extract the archive:

# tar -xf Python-3.14.0.tgz

Now navigate into the extracted directory and run the configure script to check the required dependencies.

# cd Python-3.14.0
# ./configure --enable-optimizations --enable-shared

You can speed up the build process by using all CPU cores:

 make -j 6

Remember, the (-j) corresponds to the number of cores in your system to speed up the build time.

To find out how many cores you have on your system, execute the following code:

# nproc

Output:

6

We have six cores, so in the (make) command, we used (-j 6).

Once the build process has been completed, run the following command to complete the Python installation. Instead of overwriting the system version, we’ll install Python 3.14 as an alternative:

# make altinstall

The altinstall target prevents replacing /usr/bin/python3 and keeps your default Python intact.

Verify your installation:

# python3.14 --version

If everything went smoothly, you’ll see:

Python 3.14.0

Install Python Modules|Extensions

Modules and extensions can be installed using the Python Package manager (PIP).

Use the syntax below to install a Python module of choice.

# pip3.14 install module-name

In this tutorial, We will show you how to install a Python module plotly.

# pip3.14 install plotly

Output:

Collecting plotly
  Downloading plotly-6.4.0-py3-none-any.whl.metadata (8.5 kB)
Collecting narwhals>=1.15.1 (from plotly)
  Downloading narwhals-2.10.2-py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: packaging in /usr/lib/python3/dist-packages (from plotly) (24.0)
Downloading plotly-6.4.0-py3-none-any.whl (9.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.9/9.9 MB 11.3 MB/s  0:00:00
Downloading narwhals-2.10.2-py3-none-any.whl (419 kB)
Installing collected packages: narwhals, plotly
Successfully installed narwhals-2.10.2 plotly-6.4.0

You can verify your module installation using the following command:

# pip3.14 list | grep plotly
Package                Version             
---------------------- --------------------
..............
plotly 6.4.0
..............

Create a Virtual Environment

After successfully installing Python 3.14, it’s a best practice to create a virtual environment before installing any packages. Virtual environments allow you to isolate dependencies for each project preventing conflicts between system-wide and project-specific Python libraries.

The venv module is not included by default with the Python 3.14 installation, but you can install it manually:

# apt install python3.14-venv -y

This package provides the necessary tools to create and manage virtual environments.

You can create a virtual environment in your project directory. Navigate to your desired location and run:

# python3.14 -m venv myenv

Note: myenv is the name of your virtual environment (you can rename it).

To start using your isolated Python environment, activate it with the following command:

# source myenv/bin/activate

Once activated, your shell prompt should change to show the environment name, similar like this:

(myenv) root@linuxtuto:~#

To deactivate the virtual environment run the following command:

# deactivate

While the environment is active:

    • All installed Python packages will stay local to the project.
    • The global Python installation remains unaffected.

Optional: Set Python 3.14 as Default

Ubuntu 24.04 still ships with Python 3.12 by default. You can switch to Python 3.14 using update-alternatives safely:

# update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
# update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.14 2
# update-alternatives --config python3

And choose which one to use as Python3 via command:

# update-alternatives --config python3

Select Python 3.14 when prompted, then verify:

# python3 --version

Expected output:

Python 3.14.0

Conclusion

Installing Python 3.14 on Ubuntu 24.04 is simple using the Deadsnakes PPA or by compiling from source. The new release delivers performance improvements, better syntax, and modern features that make development faster and safer.

With Python 3.14 installed, you’re ready to build powerful applications, automate workflows, or explore AI projects with the latest language tools.

For additional help or useful information, we recommend you to check  the official Python documentation.

How to Install OpenSearch 3.x on Ubuntu 24.04

OpenSearch is an open-source search and analytics engine developed as a fork of Elasticsearch and Kibana by AWS. It provides powerful search capabilities, log analytics, real-time monitoring, and observability, all built on Apache Lucene. OpenSearch 3.x is the latest major release, offering enhanced features, improved performance, and better scalability.

If you’re looking to set up OpenSearch 3.x on your Ubuntu 24.04 server, this step-by-step guide will walk you through the process.

Why Choose OpenSearch 3.x?

OpenSearch 3.x introduces several new features and improvements, including:

    • Improved Performance: Enhanced query execution and indexing capabilities.
    • Advanced Security Features: Built-in authentication, authorization, and encryption.
    • Enhanced Observability: Improved monitoring and alerting features.
    • Compatibility with OpenSearch Dashboards: Seamless integration for data visualization.

These features make OpenSearch 3.x a compelling choice for building scalable and secure search and analytics solutions.

Prerequisites

Before you begin, ensure your system meets the following requirements:

    • Ubuntu 24.04 server with at least 8GB of RAM (16GB recommended for production environments).
    • Root or sudo privileges.
    • Java OpenJDK 17 installed (OpenSearch 3.x requires Java 17).
    • Firewall configured to allow necessary ports.

Step 1: Update Your System

Start by updating your system’s package list and upgrading existing packages:

$ sudo apt update && sudo apt upgrade -y

This ensures all packages are up-to-date and reduces the risk of compatibility issues.

Step 2: Add the OpenSearch 3.x APT Repository

To install OpenSearch 3.x, you need to add its APT repository. First, install the necessary dependencies:

$ sudo apt install lsb-release ca-certificates curl gnupg2 -y

Download and add the OpenSearch GPG key:

$ sudo curl -o- https://artifacts.opensearch.org/publickeys/opensearch-release.pgp | sudo gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-release-keyring

Add the OpenSearch 3.x repository:

$ echo "deb [signed-by=/usr/share/keyrings/opensearch-release-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt stable main" | sudo tee /etc/apt/sources.list.d/opensearch-3.x.list

Update your package list:

$ sudo apt update

With the repository information added, list all available versions of OpenSearch:

$ sudo apt list -a opensearch

Output:

Listing... Done
opensearch/stable 3.2.0 amd64
opensearch/stable 3.1.0 amd64
opensearch/stable 3.0.0 amd64

Step 3: Install OpenSearch 3.x

Before installation, yo need to set a new custom admin password  using the following command:

$ export OPENSEARCH_INITIAL_ADMIN_PASSWORD=<custom-admin-password>

To install the latest version of OpenSearch run the following command:

$ sudo apt install opensearch -y

After installation, OpenSearch is set up as a systemd service and is ready to be started.

Step 4: Configure OpenSearch

Edit the main configuration file:

$ sudo nano /etc/opensearch/opensearch.yml

For a basic single-node setup, modify the following settings:

cluster.name: lonuxtuto-app
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
discovery.type: single-node
    • cluster.name: Name of your OpenSearch cluster.
    • node.name: Unique name for this node.
    • network.host: Set to 0.0.0.0 to allow external connections (use a private IP for production).
    • http.port: Default HTTP port (9200).
    • discovery.type: Set to single-node for a single-node setup.

Save and exit the editor.

Step 5: Start and Enable OpenSearch

Start the OpenSearch service:

$ sudo systemctl start opensearch

Enable OpenSearch to start on boot:

$ sudo systemctl enable opensearch

Check the status of the service:

$ sudo systemctl status opensearch

You should see that the service is active and running.

● opensearch.service - OpenSearch
Loaded: loaded (/usr/lib/systemd/system/opensearch.service; enabled; preset: enabled)
Active: active (running)
Docs: https://opensearch.org/
Main PID: 3425 (java)
Tasks: 55 (limit: 4548)
Memory: 1.3G (peak: 1.3G)
CPU: 1min 5.442s
CGroup: /system.slice/opensearch.service

Step 6: Test OpenSearch

Verify that OpenSearch is working by sending a request to the HTTP API:

$ curl -X GET https://localhost:9200 -u 'admin:<custom-admin-password>' --insecure 

Note that you need to use --insecure flag, which is required because the TLS certificates are self-signed.

You should receive a JSON response with information about your OpenSearch node, including its name, cluster name, and version.

{
"name" : "node-1",
"cluster_name" : "linuxtuto-app",
"cluster_uuid" : "pXKj1z87S3SnuJ7fjVs-TQ",
"version" : {
"distribution" : "opensearch",
"number" : "3.2.0",
"build_type" : "deb",
"build_hash" : "6adc0bf476e1624190564d7fbe4aba00ccf49ad8",
"build_date" : "2025-08-12T03:54:00.119899934Z",
"build_snapshot" : false,
"lucene_version" : "10.2.2",
"minimum_wire_compatibility_version" : "2.19.0",
"minimum_index_compatibility_version" : "2.0.0"
},
"tagline" : "The OpenSearch Project: https://opensearch.org/"
}

Step 7: Install OpenSearch Dashboards (Optional)

For a web-based interface to visualize your data, you can install OpenSearch Dashboards:

First create an APT repository for OpenSearch with the following command:

$ echo "deb [signed-by=/usr/share/keyrings/opensearch-release-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/apt stable main" | sudo tee /etc/apt/sources.list.d/opensearch-dashboards-3.x.list

Verify that the repository was created successfully.

$ sudo apt-get update

Now install OpenSearch Dashboards with the following command:

$ sudo apt install opensearch-dashboards -y

Configure the dashboards:

$ sudo nano /etc/opensearch-dashboards/opensearch_dashboards.yml

Set the following parameters:

server.host: "0.0.0.0"
opensearch.hosts: ["http://localhost:9200"]

Start and enable the dashboards service:

$ sudo systemctl start opensearch-dashboards
$ sudo systemctl enable opensearch-dashboards

Access OpenSearch Dashboards by navigating to http://<your-server-ip>:5601 in your web browser.

Step 8: Configure Firewall

If you’re using UFW to manage your firewall, allow traffic on the necessary ports:

$ sudo ufw allow 9200/tcp
$ sudo ufw allow 5601/tcp
$ sudo ufw enable

Verify the firewall status:

sudo ufw status

Step 9: Secure OpenSearch (Optional)

For production environments, it’s crucial to secure your OpenSearch installation. Consider the following:

    • Enable TLS: Configure SSL/TLS to encrypt communication.
    • Set up Authentication: Use built-in security features to require authentication.
    • Configure User Roles: Define roles and permissions to control access.

Refer to the OpenSearch Security Documentation for detailed instructions on securing your OpenSearch cluster.

Conclusion

You’ve successfully installed OpenSearch 3.x on your Ubuntu 24.04 server. This setup provides a powerful, scalable, and secure platform for search and analytics. For more advanced configurations, such as setting up a multi-node cluster or integrating with other services, refer to the OpenSearch Documentation.

If you need assistance with securing your OpenSearch installation, configuring advanced features, or integrating with other tools, feel free to ask!

How to Install MySQL 8.4 on Ubuntu 24.04

MySQL is a fast, open-source relational database system used to store, manage, and retrieve structured data developed by Oracle. It stores data in tables organized by rows and columns and uses Structured Query Language (SQL) to manage and access that data.

MySQL is known for being fast, reliable, and easy to use, making it one of the most popular databases for web applications, mobile apps, and enterprise software. It supports a variety of storage engines, offers replication features for scaling and high availability, and ensures data integrity with ACID-compliant transactions.

In this tutorial, we will show you how to install MySQL 8.4 on a Ubuntu 24.04 OS.

Update Operating System

Update your Ubuntu 24.04 operating system to make sure all existing packages are up to date:

# apt update && apt upgrade -y

Add MySQL 8.4 Repository

MySQL 8.0 is the currently available version on the default Ubuntu 24.04 repositories.

Go to the download page for the MySQL 8.4 APT repository.

Also you can run the following command to download it to your Ubuntu 24.04 system:

# wget https://dev.mysql.com/get/mysql-apt-config_0.8.34-1_all.deb

Now install the downloaded .deb package with the following command:

# dpkg -i mysql-apt-config_0.8.34-1_all.deb

During the installation of the package, you will be asked to choose the versions of the MySQL server and other components that you want to install. Choose Ok to finish the configuration and installation of the release package.

Once you are done, update the repository with the following command:

# apt-get update

To check if MySQL 8.4 repo has been successfully installed run the following command:

# apt-cache policy mysql-server

Output:

mysql-server:
  Installed: (none)
  Candidate: 8.4.5-1ubuntu24.04
  Version table:
     8.4.5-1ubuntu24.04 500
        500 http://repo.mysql.com/apt/ubuntu noble/mysql-8.4-lts amd64 Packages
     8.0.41-0ubuntu0.24.04.1 500
        500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages
     8.0.36-2ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages

Install MySQL 8.4 on Ubuntu 24.04

Now you are ready to install MySQL 8.4 with the following command:

# apt install mysql-server

You will be asked to set root password, you may go ahead and set one.

Then you can verify the installed version of MySQL with the following command:

# mysql --version

Output:

mysql  Ver 8.4.5 for Linux on x86_64 (MySQL Community Server - GPL)

Start the database server daemon, and also enable it to start automatically at the next boot with the following commands:

# systemctl start mysql
# systemctl enable mysql

Check the status of the service:

# systemctl status mysql

Example output:

 ● mysql.service - MySQL Community Server
     Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; preset: enabled)
     Active: active (running)
       Docs: man:mysqld(8)
             http://dev.mysql.com/doc/refman/en/using-systemd.html
   Main PID: 5331 (mysqld)
     Status: "Server is operational"
      Tasks: 35 (limit: 2217)
     Memory: 433.7M (peak: 449.8M)
        CPU: 2.315s
     CGroup: /system.slice/mysql.service
             └─5331 /usr/sbin/mysqld

MySQL Create Database

We need to login to MySQL shell with the following command:

# mysql -u root -p

To create a database in MySQL you need to run the following command:

mysql> CREATE DATABASE your_db;

View the new database:

SHOW DATABASES;

To create a new MySQL user, run the following command:

mysql> CREATE USER 'your_user'@localhost IDENTIFIED BY 'password';

Note: You should replace password with a secure password.

Give the user full rights to the new database:

GRANT ALL PRIVILEGES ON your_db.* TO 'your_user'@'localhost';

Refresh privileges so they take effect:

FLUSH PRIVILEGES;

Exit the MySQL shell:

mysql> exit

Comments and Conclusion

That’s it. You have successfully installed MySQL 8.4 on Ubuntu 24.04.

For additional help or useful information, we recommend you to check the official MySQL documentation.

If you have any questions please leave a comment below.

How to Install Apache Kafka on Ubuntu 24.04

Apache Kafka is an open-source distributed event streaming platform used for building real-time data pipelines and applications. Originally developed by LinkedIn and now part of the Apache Software Foundation, Kafka is designed for high-throughput, low-latency, and fault-tolerant data processing across systems.

In this tutorial, we will show you the complete steps to install Apache Kafka on Ubuntu 24.04 OS.

Step 1: Update Operating System

Update your Debian 12 operating system to make sure all existing packages are up to date:

# apt update && apt upgrade

Step 2: Install Java (OpenJDK) on Ubuntu 24.04

Java packages are available on Ubuntu 24.04 repositories and you can install it with the following command:

# apt install default-jdk

Check Java version after installation:

# java -version
openjdk version "21.0.6" 2025-01-21
OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)

Step 3: Download Apache Kafka

Check the official Apache Kafka Download page to locate the latest version of the software.

The latest version at the moment is 4.0.0. You can download it with the following command:

# wget https://downloads.apache.org/kafka/4.0.0/kafka_2.13-4.0.0.tgz

Once that downloads, unpack the tarball file using the following command:

# tar xvf kafka_2.13-4.0.0.tgz

Then move this directory into the /usr/local/ directory and rename it kafka:

# mv kafka_2.13-4.0.0 /usr/local/kafka

Step 4: Create a systemd file for Apache Kafka

First navigate to Kafka’s directory:

# cd /usr/local/kafka

Then you need to generate a Cluster UUID:

# KAFKA_CLUSTER_ID="$(bin/kafka-storage.sh random-uuid)"

Format Log Directories:

# bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/server.properties

Now create a systemd file so you can control the Kafka service. Create the file with the following command:

# nano /etc/systemd/system/kafka.service

In that file, paste the following content:

[Unit]
Description=Apache Kafka Server
Documentation=http://kafka.apache.org/documentation.html
Requires=zookeeper.service

[Service]
Type=simple
Environment="JAVA_HOME=/usr/lib/jvm/java-1.21.0-openjdk-amd64"
ExecStart=/usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties
ExecStop=/usr/local/kafka/bin/kafka-server-stop.sh

[Install]
WantedBy=multi-user.target

Save the changes and exit.

Reload system daemon and start the services:

# systemctl daemon-reload
# systemctl start kafka
# systemctl enable kafka

To confirm everything is working normally, check the status of service:

# systemctl status kafka

Output:

● kafka.service - Apache Kafka Server
     Loaded: loaded (/etc/systemd/system/kafka.service; enabled; preset: enabled)
     Active: active (running)
       Docs: http://kafka.apache.org/documentation.html
   Main PID: 11915 (java)
      Tasks: 99 (limit: 2217)
     Memory: 365.1M (peak: 365.4M)
        CPU: 16.435s
     CGroup: /system.slice/kafka.service

Step 5: Create a Kafka Topic

So before you can write your first events, you must create a topic. Create a topic named “my-events” with the following command:

# usr/local/kafka
# bin/kafka-topics.sh --create --topic my-events --bootstrap-server localhost:9092

Created topic my-events.

To verify the topic list run the following command:

# bin/kafka-topics.sh --list --bootstrap-server localhost:9092
my-events

The Kafka comes with a command-line client that will take input from a file or from standard input and send it out as events to the Kafka cluster.

By default, each line you enter will result in a separate event being written to the topic.

# bin/kafka-console-producer.sh --topic my-events --bootstrap-server localhost:9092

>Hello World!
>This is my first topic

You can stop the consumer client with Ctrl-C at any time.

If you also want to delete any data of your local Kafka environment including any events you have created along the way, run the command:

# rm -rf /tmp/kafka-logs /tmp/kraft-combined-logs

Comments and Conclusion

That’s it! You have now installed and started Apache Kafka on your Ubuntu 24.04 system.

Remember that this guide assumes you have administrative privileges on your system.

Always check the official Apache Kafka documentation for the most up-to-date installation instructions and any specific considerations related to your system configuration.

If you have any questions please leave a comment below.

How to Install Node.js on Ubuntu 24.04

Node.js is a fast, open-source JavaScript runtime that lets you build scalable server-side and network applications.

It is known for its non-blocking, event-driven architecture, making it ideal for building scalable network applications like APIs, chat apps, and real-time services.

Ubuntu 24.04 offers several ways to install Node.js depending on your needs, whether you prefer stability or the latest features.

This blog post will guide you through three reliable methods to install Node.js on Ubuntu 24.04.

Method 1: Installing Node.js Using apt (Default Repository)

Ubuntu provides Node.js in its default repositories, but it may not be the latest version.

First, update the package list to ensure you have the latest repositories:

# apt update && sudo apt upgrade -y

Run the following command to install Node.js and npm:

# apt install nodejs npm -y

Verify the installed version of Node.js running the following command:

# node --version

You should see the following output:

v18.19.1

Verify the NPM version with the following command:

# npm --version

You should get the following output:

9.2.0

Method 2: Install Latest Node.js Using NodeSource

This method gives you access to the most recent versions of Node.js.

First, add the Node.js repository running the following command:

# curl -sL https://deb.nodesource.com/setup_22.x | bash -

Once added, install the Node.js with the following command:

# apt-get install nodejs

Verify the installed version of Node.js running the following command:

# node --version

You should see the following output:

v22.14.0

Verify the NPM version with the following command:

# npm --version

You should get the following output:

10.9.2

Method 3: Install Node.js Using NVM (Node Version Manager)

Use this method if you want to install and manage multiple Node.js versions easily.

# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
# source ~/.bashrc

To install the latest LTS version:

# nvm install --lts

To install a specific version you can use the following command:

# nvm install 20

Replace “20″ with the version number of Node.js you want to install.

Comments and Conclusion

Installing Node.js on Ubuntu 24.04 is straightforward with multiple flexible options:

  • Use apt for a quick setup
  • Use NodeSource for the latest stable versions
  • Use NVM for full control over Node.js versions

Now that Node.js is installed, you’re ready to start building apps and tools in JavaScript.

For additional help or useful information, we recommend you to check  the official Node.js documentation.

If you have any questions please leave a comment below.

How to Install PostgreSQL 17 on AlmaLinux 9

PostgreSQL (often called Postgres) is a powerful, open-source relational database management system (RDBMS). It is known for its scalability, extensibility, and strong compliance with SQL standards.

If you’re running AlmaLinux 9 and need to set up PostgreSQL, you’re in the right place.

In this guide, I’ll walk you through the installation process step by step no stress, just what you need to get it up and running.

Step 1: Update Your System

Before installing anything, let’s make sure your system is up to date. Open a terminal and run:

dnf update & dnf upgrade

This ensures you have the latest security patches and software versions. It’s always a good habit to update before installing new software.

Step 2: Check Available PostgreSQL Versions

AlmaLinux ships with multiple versions of PostgreSQL. To see what’s available, run:

dnf module list postgresql

You’ll get a list of PostgreSQL versions that you can install.

PostgreSQL server 15 and 16 are included in the AppStream components.

So to install PostgreSQL 17 we will need to add the following official repositories:

dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Disable the default PostgreSQL module once the repository has been added:

dnf -qy module disable postgresql

Step 3: Install PostgreSQL 17

Now, let’s install the PostgreSQL 17 server and some extra tools:

dnf install postgresql17-server postgresql17-contrib

This will pull in all the necessary packages.

Step 4: Initialize the Database

Before we can use PostgreSQL, we need to initialize the database.

Run this command:

/usr/pgsql-17/bin/postgresql-17-setup initdb

This sets up the default database files and configurations as well as the main configuration file /var/lib/pgsql/17/data/postgresql.conf.

Step 5: Start and Enable PostgreSQL 17

Now, let’s start the PostgreSQL 17 service and make sure it runs automatically on system boot:

systemctl enable --now postgresql-17

To check if PostgreSQL is running, use:

systemctl status postgresql-17

If everything is working, you should see a message saying PostgreSQL is “active (running).”

● postgresql-17.service - PostgreSQL 17 database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql-17.service; enabled; preset: disabled)
     Active: active (running)
       Docs: https://www.postgresql.org/docs/17/static/
    Process: 104278 ExecStartPre=/usr/pgsql-17/bin/postgresql-17-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
   Main PID: 104283 (postgres)
      Tasks: 7 (limit: 14115)
     Memory: 17.7M
        CPU: 659ms
     CGroup: /system.slice/postgresql-17.service
             ├─104283 /usr/pgsql-17/bin/postgres -D /var/lib/pgsql/17/data/
             ├─104284 "postgres: logger "
             ├─104285 "postgres: checkpointer "
             ├─104286 "postgres: background writer "
             ├─104288 "postgres: walwriter "
             ├─104289 "postgres: autovacuum launcher "
             └─104290 "postgres: logical replication launcher "

Step 6: Set a Password for the PostgreSQL 17

User By default, PostgreSQL creates a user called postgres. You’ll want to set a password for it.

Switch to the postgres user with:

su postgres

Then, enter the PostgreSQL shell:

psql

Set a new password by running:

ALTER USER postgres WITH PASSWORD 'your_secure_password';

Replace ‘your_secure_password’ with something strong! Once done, type \q to exit, then exit to return to your regular user.

Step 7: Backup and Restore a Single Database

You can back up and restore a single database using the pg_dump utility.

For example, to back up a single database named db and generate a backup file named db_backup.sql, run the following command:

su - postgres
pg_dump -d db -f db_backup.sql

You can also restore a single database using psql command.

For example, to restore a single database named db from a backup file named db_backup.sql, run the following command:

su - postgres
psql -d db -f db_backup.sql

Step 8: Allow Remote Connections (Optional)

By default, PostgreSQL only allows local connections. If you need remote access, edit the config file:

nano /var/lib/pgsql/17/data/postgresql.conf

Find this line:

#listen_addresses = 'localhost'

Uncomment it and change it to:

listen_addresses = '*'

Then, edit the authentication settings:

nano /var/lib/pgsql/17/data/pg_hba.conf

Add this line at the bottom (replace 192.168.1.0/24 with your network range):

host all all 192.168.1.0/24 md5

Restart PostgreSQL for changes to take effect:

sudo systemctl restart postgresql

Comments and Conclusion

You’re Done! That’s it. You now have PostgreSQL 17 server running on AlmaLinux 9!

You can start creating databases and working with your applications. If you have any issues, check the logs with:

journalctl -u postgresql-17 --no-pager | tail -50

For additional help or useful information, we recommend you to check  the official PostgreSQL 17 documentation.

If you have any questions please leave a comment below.