Skip to content
🧮 Is Lifetime with ZapX Pass worth it? Work it out for your own servers in 30 seconds. Open the Lifetime calculator →

Set Up LimeSurvey on a Linux Server – Online Surveys with Your Own Data

Run LimeSurvey on a Linux server as a One-Click App or with Docker Compose. Set up admin access, SMTP invitations, results exports, and backups.

2 December 202614 min read4 Views0 helpful

Introduction

LimeSurvey is open-source software for online surveys. You can build questionnaires with question groups, conditions, and many question types, share them via a link or QR code, or send personal invitations by email. Then you can review responses directly in your browser or export them for Excel, SPSS, or R. LimeSurvey is written in PHP and stores everything in a database. When you run it on your own VPS, all your survey data stays with you instead of being stored by a third-party survey service. In this guide, we’ll show you two ways to install it: the easy way, as a One-Click App that makes LimeSurvey available over HTTPS in just a few clicks, and a manual installation with Docker Compose. Then you’ll create your first survey, invite participants, and export the results.

When LimeSurvey makes sense on a VPS

LimeSurvey is a good choice if you regularly run surveys and want full control over your data. LimeSurvey is a good fit for a VPS if:

  • You want responses stored on your own server, for example for employee surveys, customer feedback, or surveys for clubs, schools, and universities.
  • You don’t want limits on surveys or responses. The self-hosted Community Edition has no limit on the number of surveys, questions, or responses.
  • You need sophisticated questionnaires, with conditions, branching, required questions, quotas, and multiple languages in a single survey.
  • You want to invite participants individually, with personal links, reminders, and an overview of who has already responded.
  • You want to analyze results for research, since LimeSurvey can export directly to SPSS, R, and Stata.

LimeSurvey is less suitable if you only need a short form with three questions every now and then. The interface is powerful and has a learning curve. A simpler tool is often enough for basic forms.

Easy option: LimeSurvey as a One-Click App

The quickest way to get LimeSurvey is through your VPS’s One-Click Apps. The app is available directly over HTTPS with a domain, sets up the database and admin account on first launch, and generates the password automatically. You don’t need to set up a reverse proxy, certificate, or firewall rules.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set up One-Click Apps for instructions.
  • At least 1 GB of RAM; 2 GB is recommended. The One-Click App consists of three containers (LimeSurvey, MariaDB, and Redis for sessions) and uses around 0.4 GB of RAM in total right after startup.

Install

  1. Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
  2. Search the app catalog for LimeSurvey and click Install app.
  3. Use a custom subdomain or zap.cloud is already selected, with a randomly generated name. Leave this option enabled or enter your own name, for example survey. With a domain, your participants can access the surveys over HTTPS.
  4. Open App configuration and check two fields:
    • TZ is set to Europe/Berlin. Survey start and end times and response timestamps follow this time zone. If you’re in a different time zone, enter it here, for example Europe/London.
    • LIMESURVEY_ADMIN_EMAIL is set to admin@example.com. Enter your own email address.
  5. LIMESURVEY_ADMIN_USER sets the admin account username; the default is admin. MYSQL_DATABASE is the database name. You can leave the LIMESURVEY_SMTP_* and LIMESURVEY_FROM_EMAIL fields empty and set up email delivery later in LimeSurvey itself.
  6. Click Queue installation.

The installation takes a few minutes. On first launch, LimeSurvey creates its database tables and admin account. If the address still shows an error page, try reloading it after a short wait.

First login: Find your credentials

LimeSurvey is installed with a ready-to-use admin account; there’s no open installation wizard. The password is generated automatically:

  1. Click the gear icon on the app card and open App environment.
  2. Under Automatically generated values, find SERVICE_PASSWORD_ADMIN. This is your admin account password. Click the eye icon to show it, or the icon next to it to copy it. The username is the value of LIMESURVEY_ADMIN_USER, which is admin if you haven’t changed it.
  3. Open your app using the Access link and add /admin to the end of the address, for example https://limesurvey.example.com/admin. Without this suffix, you’ll land on the public home page for participants.
  4. Sign in with your username and password. LimeSurvey will greet you with the “Welcome to LimeSurvey!” window.
Warning: Locked out for 10 minutes after three failed attempts

LimeSurvey locks you out for 10 minutes after three incorrect passwords and displays “You have exceeded the number of maximum login attempts.” To avoid this, copy the password using the copy icon instead of typing it out. Change it after your first login from your account in the user menu at the top right.

The other generated values (SERVICE_USER_MYSQL, SERVICE_PASSWORD_MYSQL, SERVICE_PASSWORD_MYSQLROOT) are the database credentials. You won’t need them for everyday use.

Set up email delivery

LimeSurvey needs an SMTP server for invitations, reminders, and notifications. There’s no mail server running in the container, so LimeSurvey won’t send emails without SMTP. Set up email delivery as follows:

  1. In LimeSurvey, open Configuration > Global settings and go to the Email settings tab.
  2. Under Default site admin email, enter the sender address. Under Administrator name, enter the sender name.
  3. For Email method, select SMTP. Enter your email provider’s SMTP server and port as smtp.example.com:587, along with the username, password, and encryption method (TLS on port 587, SSL on port 465).
  4. Click Save and check the settings with Send test email.

Alternatively, you can enter the SMTP details during installation in the LIMESURVEY_SMTP_HOST, LIMESURVEY_SMTP_USER, LIMESURVEY_SMTP_PASSWORD, LIMESURVEY_SMTP_SSL, and LIMESURVEY_FROM_EMAIL fields. Afterward, manage the settings in only one place—LimeSurvey itself is the easiest option. The Email batch size and Email sending rate values determine how many emails LimeSurvey sends at a time. Follow your email provider’s sending limits.

Updates and backups

Update LimeSurvey from the app settings (gear icon) under App update. Click Check for updates and install a new version with Apply update. If the page says “The app is already up to date,” there isn’t a newer version in the app catalog yet. When a new version starts, LimeSurvey automatically updates the database.

Info: Don’t use ComfortUpdate

LimeSurvey displays notices in the interface such as “A security update is available,” with a link to ComfortUpdate. ComfortUpdate replaces program files inside the container. These changes disappear at the next restart because the program files come from the image. If you see this notice, check under App update instead to see whether a new version is available.

Surveys, responses, and settings are stored in the app’s MariaDB database. Uploaded files, plugins, and configuration are stored in their own volumes. All of this is preserved during updates. Back up your VPS before every update, for example using Backups in the dashboard. After the database has been updated, you can only return to the old version by restoring a backup.

Manual installation

The rest of this guide covers a manual installation of LimeSurvey with Docker Compose on your VPS. For example, you might use this option if you don’t use One-Click Apps on your server or want to run LimeSurvey behind your own reverse proxy. We’ll use the same Docker image as the One-Click App (adamzammit/limesurvey) with a MariaDB database.

Requirements

  • A Linux VPS running Debian or Ubuntu, with SSH access. See First access via SSH.
  • Docker and Docker Compose (Compose v2). See Install Docker. Check the installation with docker --version and docker compose version.
  • A domain or subdomain whose A record points to your VPS’s IP address (e.g. limesurvey.example.com).

The values below are guidelines. LimeSurvey itself uses few resources; resource usage increases with the number of concurrent participants and uploaded files.

HardwareMinimumRecommended
CPU1 vCPU core2 vCPU cores
RAM1 GB2 GB
Storage10 GB20 GB

Prepare the firewall

In this guide, LimeSurvey only listens locally on port 8080. You don’t need to open this port if you use a reverse proxy as described below. With ufw, allow only SSH and the ports required for the reverse proxy:

Code
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Warning: Docker bypasses ufw

Ports published by Docker with ports: are accessible from outside even if ufw blocks them. Docker adds its own rules ahead of those from ufw. For this reason, bind LimeSurvey to 127.0.0.1 as described below. Learn more about the firewall in Managing the firewall on Linux.

Install with Docker Compose

Create a directory for LimeSurvey and generate passwords for the database and admin account. These commands write the passwords directly to the .env file without displaying them:

Code
mkdir -p /opt/limesurvey
cd /opt/limesurvey
echo "DB_PASSWORD=$(openssl rand -hex 24)" >> .env
echo "DB_ROOT_PASSWORD=$(openssl rand -hex 24)" >> .env
echo "ADMIN_PASSWORD=$(openssl rand -hex 16)" >> .env
chmod 600 .env

LimeSurvey uses PHP’s time zone to calculate survey start and end times and response timestamps. The image sets it to UTC, and the TZ variable doesn’t change this. So create a file with your time zone, which you’ll mount in the container shortly:

Code
echo "date.timezone = Europe/Berlin" > /opt/limesurvey/php-timezone.ini

Next, create the docker-compose.yml file, for example with nano docker-compose.yml, and add the following contents. Replace admin@example.com with your email address:

Code
services:
  limesurvey:
    image: adamzammit/limesurvey:7.12.1
    restart: unless-stopped
    depends_on:
      mariadb:
        condition: service_healthy
    environment:
      LIMESURVEY_DB_HOST: mariadb
      LIMESURVEY_DB_NAME: limesurvey
      LIMESURVEY_DB_USER: limesurvey
      LIMESURVEY_DB_PASSWORD: ${DB_PASSWORD}
      LIMESURVEY_ADMIN_USER: admin
      LIMESURVEY_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
      LIMESURVEY_ADMIN_NAME: Admin
      LIMESURVEY_ADMIN_EMAIL: admin@example.com
      TZ: Europe/Berlin
    volumes:
      - ./plugins:/var/www/html/plugins
      - ./upload:/var/www/html/upload
      - ./config:/var/www/html/application/config
      - ./php-timezone.ini:/usr/local/etc/php/conf.d/zz-timezone.ini:ro
    ports:
      - "127.0.0.1:8080:80"

  mariadb:
    image: mariadb:11
    restart: unless-stopped
    environment:
      MARIADB_DATABASE: limesurvey
      MARIADB_USER: limesurvey
      MARIADB_PASSWORD: ${DB_PASSWORD}
      MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
    volumes:
      - ./mysql:/var/lib/mysql
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      interval: 10s
      timeout: 5s
      retries: 10

Here’s what the important lines mean:

  • image: adamzammit/limesurvey:7.12.1: a fixed LimeSurvey version. You can find the latest version number on Docker Hub.
  • LIMESURVEY_DB_*: The connection to the MariaDB database. The password must match MARIADB_PASSWORD; both read it from .env.
  • LIMESURVEY_ADMIN_*: Creates the admin account on first launch. If the database has already been set up, these values won’t change anything.
  • TZ: the time zone of the system clock in the container, for example, for timestamps in the log. It doesn’t affect the times in LimeSurvey.
  • php-timezone.ini: sets PHP’s time zone, which determines survey start and end times and response timestamps. The zz- in the file name makes PHP read this file after the image’s settings and apply your time zone. Enter the same time zone here and for TZ.
  • volumes: Plugins, uploaded files, configuration, and the database are stored in subfolders of /opt/limesurvey and persist through every restart and update.
  • 127.0.0.1:8080:80: LimeSurvey is only accessible from the server itself; from outside, it’s accessible only through the reverse proxy.

Pull the images and start LimeSurvey:

Code
docker compose pull
docker compose up -d
docker compose logs -f limesurvey

On first launch, LimeSurvey waits for the database, creates the tables, and sets up the admin account. It’s ready when the log contains a line with resuming normal operations. The “Nevermind the stack trace” message on first launch is normal; LimeSurvey is just checking whether the database has already been set up. Exit the log view with Ctrl+C.

Then check whether LimeSurvey is using the correct time zone. The output shows your time zone, which is Europe/Berlin in this example:

Code
docker compose exec limesurvey php -r 'echo date_default_timezone_get(), PHP_EOL;'

First access

Set up the reverse proxy in the next section first. Then open https://limesurvey.example.com/admin and sign in as the admin user. To view the password on the server, run grep ADMIN_PASSWORD /opt/limesurvey/.env. The same rule applies here: after three incorrect passwords, LimeSurvey locks you out for 10 minutes.

To quickly test LimeSurvey before setting up a domain, open an SSH tunnel from your computer with ssh -L 8080:127.0.0.1:8080 root@SERVER_IP and visit http://localhost:8080/admin. You’ll need HTTPS for real surveys.

Access via HTTPS through a reverse proxy

To access LimeSurvey from outside, put a reverse proxy with a valid certificate in front of it. For the basics, see Set up a reverse proxy with nginx and Create an SSL certificate (Let's Encrypt). Here’s a server block for nginx:

Code
server {
    listen 80;
    server_name limesurvey.example.com;
    client_max_body_size 64m;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Then get the certificate with certbot --nginx -d limesurvey.example.com. Certbot adds HTTPS and HTTP redirection to the block. The X-Forwarded-Proto line is important: it lets LimeSurvey know that the connection is using HTTPS and ensures all survey links and redirects use https://. client_max_body_size allows larger uploads, for example for questions with file uploads or importing surveys.

Find more tips for securing your server in Linux security tips.

Back up your data

The most important data is in the MariaDB database: all surveys, responses, participant lists, and settings are stored there. Back it up with mariadb-dump:

Code
cd /opt/limesurvey
docker compose exec -T mariadb sh -c 'mariadb-dump -u root -p"$MARIADB_ROOT_PASSWORD" limesurvey' > limesurvey-db-$(date +%F).sql

Also back up the upload, plugins, and config directories, as well as the .env, docker-compose.yml, and php-timezone.ini files. Don’t store the backup only on the VPS itself.

Update LimeSurvey

First, back up the database and read the new version’s release notes. Then enter the new version number in the image field in docker-compose.yml—you can find it on Docker Hub—and restart LimeSurvey:

Code
cd /opt/limesurvey
docker compose pull
docker compose up -d

On startup, LimeSurvey automatically updates the database to the new version. You can find the installed version at the bottom right of the administration interface. You don’t need ComfortUpdate here either; updating the image replaces it.

Create and analyze your first survey

Once setup is complete, you can create your first survey, share it, and analyze the responses. These sections apply to both installation methods.

Create a survey

  1. In the administration interface, click Create survey. LimeSurvey creates a new survey and opens the editor.
  2. In the Welcome screen section, click the “Untitled survey” title and name your survey. Below it, enter a description and welcome text for participants.
  3. The survey already contains a question group called “My first question group” with a sample question. Click the question to change its text and answer options. Add questions and question groups with the plus icon.
  4. Click the eye icon at the top right to preview the survey as participants will see it.
  5. Click Activate when everything is ready. The survey won’t accept responses until you do.
Warning: Only limited changes are possible after activation

You can still edit text in an active survey, but you can’t add or delete questions because LimeSurvey has created a separate response table for it. Make sure to test your survey in the preview first. If you later deactivate it to change its structure, LimeSurvey archives the existing responses in a separate table.

Share your survey and invite participants

After activation, LimeSurvey displays the Share section. Under “Select how you want to share your survey,” choose who can participate:

  • Anyone with link: Anyone with the link can participate. Click Copy to copy the link, or download it as a QR code with Download QR code, for example to put on posters or use in presentations.
  • Link with access code: Only participants with a personal link or access code can enter the survey. This lets each person respond only once and lets you see who has already participated.

To send personal invitations, create a participant list under Participant lists by clicking Create participant list. Add participants individually or import them from a CSV file containing first name, last name, and email address. LimeSurvey can then send invitations with personal links and, if you want, reminders to everyone who hasn’t responded yet. Email delivery must be set up first, as described above in “Set up email delivery.”

View and export results

Click Results at the top of the editor. Under Results overview, you can see the number of complete and incomplete responses and activity over the past few days. Responses list shows individual responses, while Statistics provides charts and analysis.

Use Export results to download the responses. Available formats include CSV, Microsoft Excel, PDF, HTML, JSON, and Microsoft Word, as well as formats for SPSS (.sav), R, and Stata. You can choose whether to export only complete responses or all responses, and whether LimeSurvey should include response codes or the full response text.

Privacy for surveys

When you run LimeSurvey on your VPS, all responses stay on your server. However, as the operator, you’re responsible for complying with privacy regulations. Here are a few things to keep in mind (this is not legal advice):

  • Privacy notice: Tell participants in the survey who is collecting the data, why, and how long it will be stored. LimeSurvey can display a privacy notice before the survey starts, which participants must agree to. You can find it in the survey settings.
  • Anonymous responses: You can anonymize responses in surveys that use participant lists. This makes it impossible to link a response to a person on the list.
  • Only collect necessary data: LimeSurvey only stores IP addresses and referrers if you enable this in the survey. Only ask for information you actually need for your analysis.
  • Deletion: Delete responses and participant lists when you no longer need them, and remember that they’re also included in your backups.

Limitations

  • No built-in mail server: Invitations and reminders require an external SMTP server. For large participant lists, your email provider’s sending limits may slow things down.
  • Structure of active surveys: You can’t add or delete questions while a survey is running. Plan and complete the questionnaire beforehand.
  • Learning curve: Conditions, quotas, and ExpressionScript logic are powerful, but take time to learn. The official documentation explains each feature.
  • No real-time collaboration: Multiple people can work on surveys using their own user accounts and permissions, but they can’t work on the same question at the same time as they could in an online document.

Conclusion

With LimeSurvey, you now create your own online surveys, invite participants by email, and export the results, while all responses stay on your own server. If you also want to analyze your website visitors without third-party services, the guide Set Up Matomo on a Linux Server shows you how.

If you have any other questions or need help, our support team is available every day! 🙂

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the quickest option: LimeSurvey is available over HTTPS on your domain within minutes, the database and admin account are set up on first launch, and the password is generated automatically. You can install updates from App update in the dashboard. A manual Docker Compose installation is a good choice if you don’t use One-Click Apps on your server, want to run LimeSurvey behind your own reverse proxy, or prefer to choose the version yourself.
For the One-Click App, click the gear icon on the app card and open App environment. Under Automatically generated values, you’ll find SERVICE_PASSWORD_ADMIN, the admin account password. The username is the value of LIMESURVEY_ADMIN_USER, which is admin by default. Sign in at your app address with /admin at the end, for example https://survey.example.com/admin.
After three incorrect passwords, LimeSurvey locks you out for 10 minutes and displays “You have exceeded the number of maximum login attempts.” Wait 10 minutes, then copy the password using the copy icon in App environment instead of typing it. Also make sure you’re using the address with /admin at the end.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.