==================
LimeSurvey version: LimeSurvey Community Edition Version 6.10.0+250106 
Own server, Ubuntu 24.04 LTS, MariaDB
==================
Hi all,
I want to share some findings I made recently when setting up LimeSurvey on a VPS which might be helpful for some of you...
I made very positive experience with Caddy in the past. It is a high performance, multiplatform webserver written in Go. By default, Caddy automatically obtains and renews TLS certificates for all your sites.
Best of all: it is free and open source: https://caddyserver.com/features

As it is able to connect to a PHP FastCGI server, I wanted to give it a try. Set setup is very easy and the performance is spectacular :-)

Here is a short description how to do the setup on Ubuntu 24.04 LTS

1. Set up the database of your choice - MySQL or Postgres (I used MariaDB)
sudo apt install mariadb-server -y
sudo systemctl status mariadb 
sudo systemctl enable mariadb 
sudo systemctl restart mariadb 
sudo mysql_secure_installation

sudo mariadb
> CREATE DATABASE lime;
> CREATE USER 'lime'@'localhost' IDENTIFIED BY 'mypassword';
> GRANT ALL PRIVILEGES ON lime.* TO 'lime'@'localhost';
> FLUSH PRIVILEGES;
> SHOW DATABASES;

2. Install PHP
sudo apt-get install php8.3-fpm -y
sudo apt-get install  php8.3-cli php8.3-common php8.3-mbstring php8.3-xml php8.3-pgsql php8.3-gd php8.3-zip php8.3-ldap php8.3-imap -y
sudo apt-get install php8.3-intl -y
sudo apt-get install php8.3-mysql -y
sudo systemctl stop php8.3-fpm
sudo vi /etc/php/8.3/fpm/pool.d/www.conf
Btw: you can use nano or the editor of you choice instead of "vi"
change this line:
pm.max_children = 15
sudo systemctl start php8.3-fpm
sudo systemctl status php8.3-fpm

Notice: do NOT install "php8.3", because it assumes, that a Apache server is already installed - the installation script will throw errors...

3. Download LimeSurvey:
Download the current version of Limesurvey from https://community.limesurvey.org/downloads/
Unzip the file and move the directory "limesurvey" to /var/www/html
sudo mkdir -p /var/www/html
sudo mv limesurvey /var/www/html/
sudo chown www-data:www-data -R /var/www/html/limesurvey/

4. Install Caddy:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -y
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy -y
Caddy should run now on port 80 showing a Testpage.

sudo systemctl stop caddy
Change the config file.
sudo vi /etc/caddy/Caddyfile
:80 {
        root * /var/www/html/limesurvey
        php_fastcgi unix//run/php/php8.3-fpm.sock
        file_server
}
sudo systemctl start caddy
sudo systemctl status caddy

Caddy now connects via Unix-sockets to PHP FastCGI serving the LimeSurvey App.
Caddy can do a lot more - you find the details in the Caddy docs.

If your server is reachable on the internet you can replace ":80" with mysurvey.myserver.org. You have to set up a CN entry on your DNS before.
No you can start to set up Limesurvey on http://localhost:80 or https://mysurvey.myserver.org/





