Skip to content
Follow
CMS

How to Install LimeSurvey with Apache on Ubuntu 24.04

Richard
Written by
Richard
Feb 17, 2025 Updated Sep 15, 2026 6 min read
How to Install LimeSurvey with Apache on Ubuntu 24.04
How to Install LimeSurvey with Apache on Ubuntu 24.04

LimeSurvey on Ubuntu 24.04 with Apache is a self-hosted survey platform that lets you build and run online questionnaires on your own web server. Apache acts as the web server to handle incoming browser traffic, while Ubuntu 24.04 provides the underlying Linux operating system for the installation. Setting up this environment requires downloading the LimeSurvey package, configuring an Apache virtual host, and completing the web-based installer in your browser.

Advertisement
⚡ Quick Answer

Install Apache and MariaDB, then create a LimeSurvey database. Download LimeSurvey’s files and place them in your Apache web root directory. Configure Apache to serve the LimeSurvey files.

Advertisement

Install Apache HTTP server on Ubuntu

To install Apache HTTP server on Ubuntu 24.04 for your LimeSurvey setup, open your terminal and run sudo apt update followed by sudo apt install apache2. This downloads and sets up the Apache web server so your system can serve web pages.

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

🐧Bash / Shell
sudo apt update
sudo apt install apache2

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

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

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

http://localhost

Advertisement
Apache2 default landing page confirming successful installation on Ubuntu 24.04
Apache2 default landing page confirming successful installation on Ubuntu 24.04

When you see the Apache2 Default Page, it means the Apache HTTP server is successfully installed.

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

How to install Apache on Ubuntu

Install the MariaDB database server on Ubuntu

To install the MariaDB database server on Ubuntu 24.04, open your terminal and run sudo apt install mariadb-server. This sets up the database engine required to store all your LimeSurvey survey questions, responses, and user accounts securely.

Advertisement

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.

Advertisement
🐧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 LimeSurvey database

To create a LimeSurvey database in MariaDB, log in to the database console using sudo mysql and run the SQL commands to create a dedicated database and user account. This gives LimeSurvey its own secure storage space for all your survey data.

Advertisement

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

The limesurveydbuser gains complete access privileges to the limesurveydb database, a necessary step for LimeSurvey to manage survey data and configurations without encountering permission errors during operation.

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

But first, log on to the MariaDB database server:

Advertisement
🐧Bash / Shell
sudo mariadb

Then run the commands below to complete the steps:

💻Code
CREATE DATABASE limesurveydb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER limesurveydbuser@localhost IDENTIFIED BY 'type_your_password_here';
GRANT ALL ON limesurveydb.* TO limesurveydbuser@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
⚠️WarningEnsure to replace ‘type_your_password_here ‘with your password.

Install PHP on Ubuntu Linux

To install PHP on Ubuntu 24.04 for LimeSurvey, run sudo apt install php and include the required modules that the application needs to run properly. PHP processes the application code and connects your web server to the database.

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

Advertisement
🐧Bash / Shell
sudo apt install php libapache2-mod-php 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 php-ldap php-imap

Additional help on installing PHP

How to install PHP on Ubuntu Linux

Download LimeSurvey files

To download LimeSurvey files on your Ubuntu server, grab the latest archive link from the official website and use the wget command in your terminal. This downloads the source code directly to your machine so you can extract and configure it.

To always install the latest version, check the download page for LimeSurvey. Get the download link and download the archived package to your computer. Then, extract it.

⚠️WarningFirst, navigate to the /tmp/ directory and download the LimeSurvey files.

Next, extract the content into the LimeSurvey folder in the Apache root directory.

The final step is to change the permissions. This will allow the Apache web server to interact safely with the files, ensuring a secure environment for your LimeSurvey installation.

To ensure the LimeSurvey application functions correctly, you must change Apache's root folder permissions. Run the following commands in your terminal to grant the necessary access to the web server, allowing LimeSurvey to write and manage its files effectively within the designated directory.

⬛Command Prompt
cd /tmp
wget https://download.limesurvey.org/latest-5.x/limesurvey5.6.68+240625.zip
sudo unzip limesurvey*.zip -d /var/www/
sudo chown -R www-data:www-data /var/www/limesurvey/

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

Run the commands below to create an Apache virtual host file for LimeSurvey.

🐧Bash / Shell
sudo nano /etc/apache2/sites-available/limesurvey.conf

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

💻Code
<VirtualHost *:80>
ServerName limesurvey.example.com
ServerAdmin admin@example.com
DocumentRoot /var/www/limesurvey

<Directory /var/www/limesurvey/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save the file.

To make LimeSurvey accessible, run these commands: `sudo a2ensite limesurvey.conf` turns on the virtual host file, and `sudo systemctl restart apache2` restarts the Apache web server, allowing LimeSurvey to be viewed in your browser.

🐧Bash / Shell
sudo a2ensite limesurvey.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Setup Let’s Encrypt SSL/TLS for LimeSurvey

To setup Let's Encrypt SSL/TLS for LimeSurvey on Apache, install Certbot and run the apache plugin command to generate a free security certificate. This encrypts all traffic between your users and your survey forms using HTTPS.

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

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

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

💻Code
http://limesurvey.example.com

The LimeSurvey installation wizard should appear.

Select the installation language and start the installation.

LimeSurvey Installation wizard
LimeSurvey Installation wizard

Type in the database name and password, then click Next.

LimeSurvey Installation wizard database
LimeSurvey Installation wizard database

Create an admin account and continue.

LimeSurvey Installation wizard admin
LimeSurvey Installation wizard admin

LimeSurvey should be ready to use.

LimeSurvey Installation portal
LimeSurvey Installation portal

That should do it!

Conclusion:

In summary, installing LimeSurvey with Apache on Ubuntu 24.04 involves several key steps:

  • Apache Installation: Successfully set up the Apache webserver to handle HTTP requests.
  • MariaDB Setup: Installed MariaDB and created a dedicated database for LimeSurvey.
  • PHP Installation: Ensured PHP is installed with all necessary extensions to support LimeSurvey functionality.
  • LimeSurvey Files: Downloaded and configured the LimeSurvey application in the Apache root directory.
  • Apache Configuration: Created a virtual host for LimeSurvey to ensure it runs smoothly on the server.
  • SSL Security: Enhanced security for LimeSurvey using Let’s Encrypt for HTTPS support.

Installing LimeSurvey with Apache on Ubuntu 24.04 deploys survey software for stable and efficient management of your surveys. This installation process ensures your survey projects launch and are managed without technical issues, allowing you to handle your survey data effectively.

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 Apache on Ubuntu Linux
Ubuntu Linux How to Install Apache on Ubuntu Linux
Install MySQL and MariaDB on Ubuntu: A Step-by-Step Guide
Ubuntu Linux Install MySQL and MariaDB on Ubuntu: A Step-by-Step Guide
How to Change Screen Brightness in Ubuntu Linux
Ubuntu Linux How to Change Screen Brightness in Ubuntu Linux
How to Install PHP on Ubuntu Linux
Ubuntu Linux How to Install PHP 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 *