Set up your own SMARTRIQS server

Before you begin setting up a custom server, please consider using the default SMARTRIQS server. A custom server has several disadvantages: it takes time and effort to set up, maintaining it will cost you money, and you will have to update the source code manually if there is a new update or a bug fix. The only real advantage of having a custom server is that it allows the collection and storage of sensitive data (e.g., personal identifiers), which is prohibited when using the default SMARTRIQS server (see the Data Submission Policy Agreement). So unless you do not intend to collect such sensitive data, it is strongly recommended to use the default SMARTRIQS server.

This tutorial will show you how to set up an an SSL-encrypted PHP web-server from scratch (Part I), and then how to set up SMARTRIQS on this custom server (Part II). If you already have access to a server that can run PHP scripts and is SSL-encrypted (for example, your lab has a server), go to Part II.

Part I

If you have decided to set up a custom SMARTRIQS server, and you don’t have a server yet, there are two ways to do it, depending on whether you prefer 1) a quick and easy (but relatively expensive), or 2) a cost-efficient (but more difficult) method.

1) The quick but expensive way

The main advantages of this method are that it is much quicker and easier than the other method: you don’t have know anything about the technical details of web hosting. The main disadvantages are that it’s certainly more expensive and there is less room for customization.

2) The cost-efficient but more difficult way

The main advantages of this method are that it is much cheaper than the other method, and you will have full control over your server and customize it however you want. The main disadvantages are that you have to be comfortable with some web hosting concepts (SSH, DNS, shell, etc.).

Part II

For this part we assume that you already have a custom domain and a working PHP server that is SSL-encrypted.

STEP 1. Download the six server-side PHP scripts from GitHub.

STEP 2. Upload the six server-side PHP scripts to your server. You can copy these files into any folder, but make sure that they are all in the same folder. For example, a convenient way is to create a new folder named ‘smartriqs’ in the root directory of your server, so that it will have the following address:

STEP 3. Create one or more folders for researchers within the smartriqs folder. The names of these folders will be the researcherID of the researchers. For example, if you create two folders named ‘researcher1’ and ‘researcher2’ in the smartriqs directory ( and, the two corresponding researcherIDs will be ‘researcher1’ and ‘researcher2’.

STEP 4. Import the survey templates to your Qualtrics account. In each of your studies that use your custom server, you have to add a new embedded data to the top of the Survey Flow: serverURL. The value of this embedded data should be the URL address of the folder on your server that contains the PHP scripts and the researchers’ folders.

For example,: serverURL =

STEP 5. Define the researcher ID and study name in the Survey Flow.

You are done! You can already run interactive studies and collect data.