Deploying QST
Introduction
QST is a self-hosted questionnaire and survey tool designed for organizations that need complete control over their survey data. Built with simplicity in mind, QST allows you to create custom questionnaires, distribute them to respondents, and collect answers in a secure, private environment.
Key features of QST include:
- Custom Survey Creation: Build questionnaires with various question types including multiple choice, text input, and rating scales
- Response Collection: Gather responses from participants through shareable links
- Data Privacy: Keep all survey data on your own infrastructure without third-party access
- Simple Interface: Clean, intuitive design for both survey creators and respondents
- Export Capabilities: Download response data for further analysis
- Lightweight Deployment: Minimal resource requirements for easy hosting
This guide walks through deploying QST on Klutch.sh using Docker, configuring persistent storage for your survey data, and setting up the application for production use.
Prerequisites
Before deploying QST on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your QST configuration
- Basic familiarity with Docker and containerization concepts
Deploying QST on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3000
Create Your Dockerfile
Create a Dockerfile in your repository with the following content:
FROM node:18-alpine
WORKDIR /app
# Install dependenciesRUN apk add --no-cache git
# Clone QST repositoryRUN git clone https://github.com/qst-project/qst.git .
# Install application dependenciesRUN npm install
# Build the applicationRUN npm run build
# Expose the application portEXPOSE 3000
# Set environment variablesENV NODE_ENV=productionENV PORT=3000
# Start the applicationCMD ["npm", "start"]Push Your Repository to GitHub
Commit and push your Dockerfile to your GitHub repository.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “qst-surveys”.
Create a New App
Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your QST Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
NODE_ENV | production |
PORT | 3000 |
DATABASE_URL | Your database connection string (if using external database) |
Attach Persistent Volumes
Add persistent storage for your survey data:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/data | 5 GB | Survey data and responses |
/app/uploads | 10 GB | File uploads and attachments |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will build the container image, attach persistent volumes, and start your QST instance.
Access QST
Once deployment completes, access your QST instance at https://your-app-name.klutch.sh.
Additional Resources
Conclusion
Deploying QST on Klutch.sh provides a private, self-hosted survey solution with automatic builds, persistent storage, and secure HTTPS access. Create custom questionnaires, collect responses, and maintain complete control over your survey data without relying on third-party services.