# Install a DataSHIELD server (\<1hour) \[Tutorial\]

**URL:** <https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712>\
**Category:** Beginner Support\
**Created:** [12 February 2023 20:01 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712 "2023-02-12T20:01:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilmar.igl](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@wilmar.igl](https://datashield.discourse.group/u/wilmar.igl)\
**Post date:** [12 February 2023 20:01 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/1 "2023-02-12T20:01:48Z")

</div>

Dear all,

I have written a tutorial [1] on how to install a Federated Analysis server in the cloud using the DataSHIELD software based on Docker technology.

I assume that the installation takes less than 1 hour if you follow the instructions closely. I have documented and tested all installation steps starting from a bare-bones Linux installation to avoid any pitfalls for less technical users.

Please let me know if you have any comments or suggestions for improvement.

Kr, Wilmar

Refs: [1] [Federated Analysis with R/DataSHIELD – Installation, Data Import, Data Analysis [Tutorial] – Wilmar Igl, PhD](https://wilmarigl.de/?p=424)

---

<div class="post-metadata">

**Author:** ![swheater](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/swheater/32/182_2.png) [@swheater](https://datashield.discourse.group/u/swheater)\
**Post date:** [13 February 2023 12:40 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/2 "2023-02-13T12:40:08Z")

</div>

Wilmar,

Thank you, I will try to find time this week to review your document.

Regards,

Stuart

---

<div class="post-metadata">

**Author:** ![wilmar.igl](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@wilmar.igl](https://datashield.discourse.group/u/wilmar.igl)\
**Post date:** [13 February 2023 17:42 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/3 "2023-02-13T17:42:20Z")

</div>

This would be wonderful, because I only almost know what I am doing 😉

---

<div class="post-metadata">

**Author:** ![swheater](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/swheater/32/182_2.png) [@swheater](https://datashield.discourse.group/u/swheater)\
**Post date:** [23 February 2023 01:02 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/4 "2023-02-23T01:02:41Z")

</div>

Wilmar,

Sorry for the delay. The document you have produced is very impressive. I would make sure the Community’s “Education Theme” (newly set-up) is aware of your Tutorial.

A few minor comments:

- The Puppet scripts used by the DataSHIELD team for VM creation are now rather out of date. Could be used as the basis of Puppet based deployment, but would require considerable effort.
- Currently DataSHIELD analysis can be access via two types of servers Opal and Armadillo.
- If feeling very bold could try the text editors _vi_ and _ed_
- In “Configuration of HETZNER” - 4GB Memory could a bit small for all but the initial investigations of DataSHIELD.

Thank you,

Stuart

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/yannick/32/19_2.png) [@yannick](https://datashield.discourse.group/u/yannick)\
**Post date:** [23 February 2023 08:37 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/5 "2023-02-23T08:37:39Z")

</div>

Hi,

Thanks for this document. I have some comments too.

### Configure Firewall

- As you will use a reverse proxy to access Opal (Apache or Nginx [as recommended](https://opaldoc.obiba.org/en/latest/admin/configuration.html#reverse-proxy-configuration)), then only configure firewall for 22 (ssh), 443 (https), 80 (http to be redirected to 443 by the reverse proxy)
- Rock is only to be accessed by Opal, then do not expose it!

### Install DataSHIELD as Docker containers

You do not need to have both Mysql and Mongodb databases. Choose Mongodb instead, as this is the most versatile one.

### Import Data

Please refer to

> **[Importing Data — Opal documentation](https://opaldoc.obiba.org/en/latest/cookbook/import-data.html)**

### Analyze Data

The [opal-demo server has a DataSHIELD user](https://www.obiba.org/pages/products/opal/#demo), you should use it instead in your examples.

It is highly recommended to use personal access tokens to authenticate from a script, see

> **[How to Manage Authentication and Authorizations — Opal documentation](https://opaldoc.obiba.org/en/latest/cookbook/r-datashield/authz.html)**

Regards  
Yannick

---

<div class="post-metadata">

**Author:** ![wilmar.igl](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@wilmar.igl](https://datashield.discourse.group/u/wilmar.igl)\
**Post date:** [23 February 2023 10:09 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/6 "2023-02-23T10:09:28Z")

</div>

Dear Stuart, dear Yannick,

thank you so much for your feedback! I will update the tutorial accordingly soon.

One thing I was uncertain about was, whether all passwords in the YAML Docker config file should be changed to secure the server or whether the OPAL administrator password is enough. My reasoning was that if the ports of the other applications (eg MySQL) are not opened, then the password can be kept at its default value, because attackers could not access MYSQL.

If the MYSQL password are changed, could this cause any trouble connecting MYSQL with OPAL?

What about the other passwords for MANGODB, ROCK etc which are not explicitly mentioned in the YAML file but probably also set at their default values? Should they be also be explicitly set to user-defined values in the Docker file to install a _secure_ server?

Kr, Wilmar

---

<div class="post-metadata">

**Author:** ![wilmar.igl](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@wilmar.igl](https://datashield.discourse.group/u/wilmar.igl)\
**Post date:** [3 March 2023 17:15 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/7 "2023-03-03T17:15:57Z")

</div>

Dear Stuart, I have updated now the blog accordingly. Where can I find the “Education Theme” forum?

Thank you very much, Wilmar

---

<div class="post-metadata">

**Author:** ![wilmar.igl](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@wilmar.igl](https://datashield.discourse.group/u/wilmar.igl)\
**Post date:** [3 March 2023 17:17 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/8 "2023-03-03T17:17:02Z")

</div>

Dear Yannick, I have updated now the blog accordingly.

Thank you so much, Wilmar

---

<div class="post-metadata">

**Author:** ![wilmar.igl](https://avatars.discourse-cdn.com/v4/letter/w/7993a0/32.png) [@wilmar.igl](https://datashield.discourse.group/u/wilmar.igl)\
**Post date:** [3 March 2023 17:18 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/9 "2023-03-03T17:18:16Z")

</div>

Dear @swheater , dear @yannick,

thank you so much for your feedback! I have updated the tutorial now.

One thing I was uncertain about was, whether all passwords in the YAML Docker config file should be changed to secure the server or whether the OPAL administrator password is enough. My reasoning was that if the ports of the other applications (eg MySQL) are not opened, then the password can be kept at its default value, because attackers could not access MYSQL.

If the MYSQL password are changed, could this cause any trouble connecting MYSQL with OPAL?

What about the other passwords for MANGODB, ROCK etc which are not explicitly mentioned in the YAML file but probably also set at their default values? Should they be also be explicitly set to user-defined values in the Docker file to install a _secure_ server?

Kr, Wilmar

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/yannick/32/19_2.png) [@yannick](https://datashield.discourse.group/u/yannick)\
**Post date:** [3 March 2023 17:43 UTC](https://datashield.discourse.group/t/install-a-datashield-server-1hour-tutorial/712/10 "2023-03-03T17:43:31Z")

</div>

Hi,

You should use environment variables with a `.env` file so that passwords do not appear in the docker compose’s YAML file. See [Docker Compose - Environment variables](https://docs.docker.com/compose/environment-variables/) documentation.

If you set rock/mysql/mongodb username/password in their respective container, you need to tell Opal which they are. See [Opal Docker env variables](https://opaldoc.obiba.org/en/latest/admin/installation.html#docker-image-installation) and [Rock Docker env variables](https://rockdoc.obiba.org/en/latest/admin/installation.html#docker-image-installation).

Regards  
Yannick
