Skip to content

Production Backend

Stage 2 of this documentation showed you how to run a PDK server on your own machine using Docker Desktop. That setup is fine for testing, but not suitable for a live study: it requires your laptop to stay on and connected, and it is not accessible to participants’ extensions over the internet.

For a production study, you need PDK running on a server with a public domain name.

This page is a high-level sketch of what that involves, not a step-by-step tutorial. Production server setup depends heavily on your institution’s infrastructure and IT policies.


  • A Linux server with a public domain name: a cloud VM (AWS, DigitalOcean, Google Cloud, etc.) or a server provided by your institution
  • HTTPS configured on that domain (Let’s Encrypt is free and works well)
  • Docker and Docker Compose installed on the server
  • Ports 80 and 443 open in the firewall

  1. Clone rex-dev-infrastructure on your server:

    Terminal window
    git clone https://github.com/bric-digital/rex-dev-infrastructure.git
    cd rex-dev-infrastructure
  2. Edit the Docker configuration to set your domain name and HTTPS certificate paths. The docker-compose.yml file in that repo has placeholder values for these settings.

  3. Start the server:

    Terminal window
    docker compose up -d
  4. Point your extension at the server. In your extension’s config.json, update configuration_url and the PDK server URL to your domain:

    "configuration_url": "https://yourdomain.com/config.json",
    "rex_passive_data_kit": {
    "enabled": true,
    "data_server": "https://yourdomain.com"
    }
  5. Rebuild and test with a small number of participants before full deployment.


This sketch covers the common case. Production server setup for a real study depends on your institution’s infrastructure, IT policies, data governance requirements, and security review processes. We recommend involving your institution’s IT department early: many universities have research computing resources or cloud environments with existing security controls that are appropriate for human subjects data.


Managing your own server infrastructure takes time and technical expertise, and that time is often better spent on your research.

BRIC offers hosted PDK servers for researchers who would rather focus on their study than their server. We handle the infrastructure, uptime, and security so you can focus on data collection and analysis.

REX is free and open source. BRIC is a 501(c)(3) nonprofit. If our hosted service helps your research, a donation is always appreciated but never required.

Contact us at info@bric.digital to learn more.