Question

How do I upgrade openssl version in my digital ocean droplet?

I am using openssl in a Codeigniter 4 project (php-7.4) running on apache server. The project requires the system to have openssl version v3.2.0. When I check the installed openssl version in the droplet I see v3.0.2. How do I upgrade the version of openssl working on digital ocean droplet.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
December 14, 2024

Heya,

Confirm the version of OpenSSL installed:

openssl version

Update your system to ensure all dependencies are up-to-date:

sudo apt update && sudo apt upgrade -y

That should do it for you. If it doesn’t update it means that’s the newest one for your Distro:

https://launchpad.net/ubuntu/jammy/+source/openssl

The above states that the latest official openssl version that is supported is 3.0.2.

alexdo
Site Moderator
Site Moderator badge
December 29, 2024

Heya, @mdhabiburrahmantalukdershamim

  1. Visit the OpenSSL downloads page to get the latest stable version (3.4.0 at this time).
  2. Download the tarball:
wget https://www.openssl.org/source/openssl-3.4.0.tar.gz
  1. Extract the tarball:
tar -xvzf openssl-3.4.0.tar.gz 
cd openssl-3.4.0
  1. Configure and build OpenSSL:
make 
sudo make install
  1. Verify the installation path: The new OpenSSL binary should be installed in /usr/local/bin. To ensure the new version is used, update the symbolic link:
sudo ln -sf /usr/local/bin/openssl /usr/bin/openssl
  1. Update the library paths: Add /usr/local/lib to your library path:
echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/openssl-3.4.0.conf 
sudo ldconfig

Check the OpenSSL version again:

openssl version

It should now show OpenSSL 3.4.0

Regards

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.