How to Install LimeSurvey

Updated June 2026
Installing LimeSurvey Community Edition on a Linux server requires Apache or Nginx, PHP 8.1+, and MySQL or PostgreSQL. The entire process takes a fresh Ubuntu server from zero to a working survey platform through six straightforward steps: installing the web stack, creating the database, deploying the application files, setting permissions, running the web installer, and securing the deployment.

LimeSurvey is built on PHP and runs on any standard LAMP or LEMP stack. This guide covers both the traditional server installation on Ubuntu and the Docker-based alternative for teams that prefer containerized deployments. Both methods produce a fully functional LimeSurvey instance ready for creating and distributing surveys.

Prerequisites

Before starting, you need a server running Ubuntu 22.04 or 24.04 (Debian 12 also works with identical commands), SSH access with root or sudo privileges, and a domain name pointed at the server's IP address. The minimum hardware requirements are 1 CPU core and 1 GB of RAM for small deployments, though 2 GB of RAM is recommended for production use with concurrent respondents.

Step 1: Install Apache, PHP, and MySQL

Start by updating the package index and installing the full LAMP stack. LimeSurvey requires PHP 8.1 or higher, and Ubuntu 22.04 ships with PHP 8.1 by default. The PHP extensions you need are: php-mysql for database connectivity, php-gd for image manipulation in surveys, php-mbstring for multi-byte string handling (required for multilingual surveys), php-xml for survey import and export, php-zip for archive handling, php-curl for external API calls, and php-imap if you plan to use email bounce tracking.

After installing Apache, enable the mod_rewrite module, which LimeSurvey uses for clean URLs. Restart Apache after enabling the module. Verify PHP is working by creating a phpinfo test page and loading it in your browser, then delete the test page after confirming the installation works.

During MySQL installation, the server will prompt you to set a root password. Choose a strong password and record it securely. You can also run the mysql_secure_installation script to remove test databases, disable remote root login, and remove anonymous user accounts.

Step 2: Create the MySQL Database

Log into the MySQL console as root and create a dedicated database for LimeSurvey. Use utf8mb4 as the character set and utf8mb4_unicode_ci as the collation to ensure full Unicode support, which is essential for multilingual surveys. Create a dedicated MySQL user for LimeSurvey and grant it all privileges on the LimeSurvey database only, not on any other databases. This follows the principle of least privilege, limiting damage if the survey application's database credentials are ever compromised.

Flush privileges after creating the user and test the new credentials by logging into MySQL with the LimeSurvey user account. Verify you can see only the LimeSurvey database with the SHOW DATABASES command.

Step 3: Download and Extract LimeSurvey

Download the latest stable release of LimeSurvey Community Edition from the official website. The download is a compressed archive (tar.gz or zip) containing the complete application. Extract it to your Apache document root, typically /var/www/html/ on Ubuntu. You can also extract it to a subdirectory if you want LimeSurvey accessible at a URL path like /surveys/ rather than the domain root.

Alternatively, you can clone the LimeSurvey repository directly from GitHub if you want to track development more closely or contribute changes. The GitHub repository includes the latest development code and tagged releases. For production use, check out the latest stable release tag rather than the development branch.

After extraction, verify the directory structure. You should see directories including application, assets, framework, installer, themes, tmp, and upload, along with the index.php entry point in the root of the LimeSurvey directory.

Step 4: Set File Permissions

LimeSurvey needs the web server to own and write to specific directories. Set the owner of the entire LimeSurvey directory to the Apache user (www-data on Ubuntu). The critical writable directories are: tmp/ for session data and temporary files, upload/ for respondent file uploads and survey resources, application/config/ for the configuration file that the installer creates, and themes/ if you want to edit themes through the admin interface.

Set directory permissions to 755 (owner can read, write, and execute; group and others can read and execute) and file permissions to 644 (owner can read and write; group and others can read only). The tmp and upload directories need 775 permissions to allow the web server to create subdirectories within them.

If you are running LimeSurvey under SELinux (common on Red Hat-based distributions), you also need to set the appropriate SELinux context on writable directories so that the httpd process can write to them.

Step 5: Run the Web Installer

Open your browser and navigate to your LimeSurvey URL. The installer starts automatically and walks you through the configuration in several screens.

The first screen checks prerequisites: PHP version, required extensions, and writable directories. If any checks fail, the installer tells you exactly what is missing. Fix any issues before proceeding.

The database configuration screen asks for the database type (MySQL), hostname (localhost if the database runs on the same server), database name, username, and password. Enter the credentials you created in Step 2. The installer creates all necessary tables automatically.

The admin account screen lets you set the administrator username, password, email address, and site name. Choose a strong password for the admin account since this account has full control over all surveys and data. The site name appears in the admin panel header and can be changed later.

After completion, the installer displays a success message and links to the admin panel. Log in with your new admin credentials to verify everything works.

Step 6: Secure the Installation

The most important post-installation step is removing or renaming the installer directory. As long as the installer directory exists, anyone who accesses it could potentially reconfigure LimeSurvey. Delete the /application/installer/ directory entirely, or rename it to something that will not be discovered accidentally.

Configure SSL using Let's Encrypt and Certbot. Install Certbot with the Apache plugin, and run it specifying your domain name. Certbot automatically obtains a certificate, configures Apache to use it, and sets up automatic renewal. After SSL is active, configure LimeSurvey to force HTTPS by setting the forceSSL option to "on" in Global Settings under Security.

In LimeSurvey's Global Settings, review the security options: enable CSRF validation, set the session lifetime to a reasonable duration (60 minutes is a common default), and configure IP filtering for admin panel access if your team connects from known IP ranges. Disable the ComfortUpdate feature if you do not plan to use it, as it requires an external connection to the LimeSurvey update server.

Alternative: Docker Installation

For teams that prefer containerized deployments, several community-maintained Docker images are available for LimeSurvey. The most popular images use Apache with PHP inside the container and connect to an external MySQL or PostgreSQL database, either running as a separate container or as a managed database service.

A typical Docker Compose setup defines two services: the LimeSurvey application container and a MySQL container. Environment variables configure the database connection, including DB_TYPE, DB_HOST, DB_PORT, DB_NAME, DB_USERNAME, and DB_PASSWORD. The LimeSurvey container exposes port 80 (or 8080), which you place behind a reverse proxy like Traefik or Nginx for SSL termination.

Persistent data is stored in Docker volumes for the database files, the upload directory (respondent file uploads), and the config directory. Backing up these volumes regularly is essential since they contain all your survey data and configuration.

The Docker approach eliminates the need to install PHP extensions manually and provides a repeatable, version-controlled deployment. Upgrading LimeSurvey involves pulling a newer image tag and restarting the container, with the application automatically running any necessary database migrations on startup.

Post-Installation Configuration

After installation, configure email settings in Global Settings under Email Settings. Enter your SMTP server details, authentication credentials, and sender address. Test email delivery by sending a test message. Without working email, LimeSurvey cannot send survey invitations, reminders, or registration confirmations.

Create a custom survey theme that matches your organization's branding. LimeSurvey includes a theme editor in the admin panel that lets you modify colors, fonts, logos, and layout without touching the underlying template files. You can also create themes from scratch using Bootstrap-based templates.

Review the default survey settings under Global Settings to set organization-wide defaults for new surveys, including language, template, date format, and anonymization settings. These defaults can be overridden per survey, but setting sensible defaults saves time when creating new surveys.

Key Takeaway

LimeSurvey installation on a standard Linux server is straightforward for anyone comfortable with LAMP stack administration. The critical steps are ensuring all PHP extensions are installed, setting correct file permissions, and securing the installation by removing the installer directory and enabling SSL. For teams that prefer containers, Docker deployment simplifies the process further and makes upgrades nearly effortless.