diff --git a/build-env.Dockerfile b/build-env.Dockerfile
index a58e771d627eb8fc4403589fb5c381c0ba5bd82f..901f66ab703bdf40f221ec6195184ea1950f30ec 100644
--- a/build-env.Dockerfile
+++ b/build-env.Dockerfile
@@ -10,7 +10,7 @@ RUN sh -c 'apt-get update \
     && apt-get install -y --no-install-recommends openjdk-11-jdk-headless python3 ruby ruby-dev \
             build-essential libicu67 libicu-dev zlib1g zlib1g-dev cmake pkg-config libssl1.1 \
             libssl-dev git python3-pip curl \
-    && curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
+    && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
     && apt-get install -y nodejs \
     && pip3 install profanity-check pylint==2.14.5 \
     && gem install -N github-linguist \
diff --git a/core/build.gradle b/core/build.gradle
index a5f16220567dc5f254623e50aeddab8496d408ef..0d6f1aed468ca72776bfeafb46f3d5f83dd17ba5 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -67,6 +67,7 @@ task initUi(type: Exec) {
 
     workingDir "${rootProject.projectDir}/ui"
 
+    environment 'NODE_OPTIONS', '--openssl-legacy-provider'
     commandLine 'npm', 'install'
 
     outputs.file("${uiRoot}/package-lock.json")
@@ -77,6 +78,7 @@ task buildUi(type: Exec) {
 
     workingDir "${rootProject.projectDir}/ui"
 
+    environment 'NODE_OPTIONS', '--openssl-legacy-provider'
     commandLine 'npm', 'run', 'build'
 
     outputs.dir("${rootProject.projectDir}/ui/dist/")