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.
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.
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.
- 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.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search the app catalog for LimeSurvey and click Install app.
- 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. - Open App configuration and check two fields:
TZis set toEurope/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 exampleEurope/London.LIMESURVEY_ADMIN_EMAILis set toadmin@example.com. Enter your own email address.
LIMESURVEY_ADMIN_USERsets the admin account username; the default isadmin.MYSQL_DATABASEis the database name. You can leave theLIMESURVEY_SMTP_*andLIMESURVEY_FROM_EMAILfields empty and set up email delivery later in LimeSurvey itself.- 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.
LimeSurvey is installed with a ready-to-use admin account; there’s no open installation wizard. The password is generated automatically:
- Click the gear icon on the app card and open App environment.
- 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 ofLIMESURVEY_ADMIN_USER, which isadminif you haven’t changed it. - Open your app using the Access link and add
/adminto the end of the address, for examplehttps://limesurvey.example.com/admin. Without this suffix, you’ll land on the public home page for participants. - Sign in with your username and password. LimeSurvey will greet you with the “Welcome to LimeSurvey!” window.
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.
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:
- In LimeSurvey, open Configuration > Global settings and go to the Email settings tab.
- Under Default site admin email, enter the sender address. Under Administrator name, enter the sender name.
- 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). - 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.
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.
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.
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.
- 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 --versionanddocker 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.
| Hardware | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU core | 2 vCPU cores |
| RAM | 1 GB | 2 GB |
| Storage | 10 GB | 20 GB |
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:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
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.
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:
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:
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:
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 matchMARIADB_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. Thezz-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 forTZ.volumes: Plugins, uploaded files, configuration, and the database are stored in subfolders of/opt/limesurveyand 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:
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:
docker compose exec limesurvey php -r 'echo date_default_timezone_get(), PHP_EOL;'
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.
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:
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.
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:
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.
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:
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.
Once setup is complete, you can create your first survey, share it, and analyze the responses. These sections apply to both installation methods.
- In the administration interface, click Create survey. LimeSurvey creates a new survey and opens the editor.
- In the Welcome screen section, click the “Untitled survey” title and name your survey. Below it, enter a description and welcome text for participants.
- 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.
- Click the eye icon at the top right to preview the survey as participants will see it.
- Click Activate when everything is ready. The survey won’t accept responses until you do.
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.
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.”
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.
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.
- 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.
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! 🙂
