Bookmark

Self-Host LimeSurvey CE in Docker: MariaDB, Persistent Data, and Port 8080

LimeSurvey CE is an open-source survey platform. The i12bretro tutorial runs MariaDB and LimeSurvey on one Docker network, persists survey uploads on the host, and exposes the administration page on port 8080. I retain all five numbered actions from the page, but replace every sample password with [REDACTED] before putting commands in the repository.1

Youtube video player

The original video title and author were checked with YouTube oEmbed; the player remains an original embed and is not downloaded or rehosted.2

1. Install Docker on the Linux host

Step 1/5: Log into the Linux host and run the Docker installation sequence in a terminal:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# install prerequisites
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
# add docker software repository
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
# install docker
sudo apt install docker-ce docker-compose containerd.io -y
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER

I do not run the whole block as root beyond the commands that already use sudo; after su - $USER, verify that the new group membership is active.

2. Run MariaDB and LimeSurvey

Step 2/5: Continue in the terminal. Create the directories, network, and two containers following the source flow. The passwords must be new local secrets; do not reuse the source strings:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# create working directories
mkdir ~/docker/limesurvey -p && mkdir ~/docker/mariadb -p
# set owner of docker directory
sudo chown "$USER":"$USER" ~/docker -R
# allow the container to write to working directories
sudo chmod a+rwx -R ~/docker/limesurvey
# create containers network
docker network create containers
# run the mariadb docker container
docker run -d --name mariadb --network containers -e MYSQL_ROOT_PASSWORD='[REDACTED]' -e MYSQL_USER=limesurvey_rw -e MYSQL_PASSWORD='[REDACTED]' -e MYSQL_DATABASE=limesurvey -v ~/docker/mariadb:/var/lib/mysql -p 3306:3306 --restart=unless-stopped mariadb:latest
# run the limesurvey container
docker run -d --name limesurvey --network containers -e DB_TYPE=mysql -e DB_HOST=mariadb -e DB_PORT=3306 -e DB_USERNAME=limesurvey_rw -e DB_PASSWORD='[REDACTED]' -e DB_NAME=limesurvey -e DB_TABLE_PREFIX=" " -e ADMIN_USER=admin -e ADMIN_NAME=administrator -e ADMIN_EMAIL=admin@change.me -e ADMIN_PASSWORD='[REDACTED]' -v ~/docker/limesurvey:/var/www/html/upload/surveys -p 8080:8080 --restart=unless-stopped martialblog/limesurvey

The source uses chmod a+rwx to let the container write; on a public host I would tighten directory permissions and avoid exposing database port 3306 to the Internet. Back up the MariaDB and survey-upload volumes separately.

3. Open the administration page

Step 3/5: Open a browser and navigate to the exact path:

1
http://DNSorIP:8080/index.php/admin/

Replace DNSorIP with the Docker host's DNS name or address; keep /index.php/admin/ to reach administration.

Step 4/5: Log in with the admin values set in the container environment. Never put the real password in shell history or Markdown.

Step 5/5: After login, LimeSurvey displays its welcome page. I would change the administrator password, verify the upload volume, and create a test survey before using it in production.

4. Post-deployment checks

1
2
3
docker ps
docker logs mariadb
docker logs limesurvey

If LimeSurvey cannot connect to MariaDB, check that both containers share the containers network and that DB_HOST=mariadb, database, user, and password agree. The source also links Docker Hub martialblog/limesurvey and the martialblog/docker-limesurvey repository; read the current image/tag documentation before updating rather than blindly relying on latest.1

Conclusion

The five-step flow is enough to run LimeSurvey CE in a HomeLab: install Docker, create MariaDB and the application, open the admin URL, log in, and confirm the welcome page. Secret handling, volume backups, and a reverse proxy/authentication layer become the important work if the service leaves the LAN.

Sources


  1. i12bretro tutorial 1000 – Run LimeSurvey CE - Custom Survey Tool - in Docker , revised 2025-02-23. Independently edited from the numbered HTML page; sample passwords are replaced with [REDACTED]↩︎ ↩︎

  2. YouTube – Run LimeSurvey CE - Custom Survey Tool - in Docker — i12bretro video, validated with oEmbed. ↩︎


0 Bình luận

Góp Ý / Bình Luận / Đánh giá