diff --git a/software/theia/buildout.hash.cfg b/software/theia/buildout.hash.cfg
index f6402e83e68f197428dbdd7aa266f58f6cb79cf3..3f4e6ab93ce1f017d345cfc8f65960ca77802a41 100644
--- a/software/theia/buildout.hash.cfg
+++ b/software/theia/buildout.hash.cfg
@@ -15,7 +15,7 @@
 
 [instance]
 filename = instance.cfg.in
-md5sum = e56a6722e4f0bc958f6b61f13174e852
+md5sum = ab61eeb45300a91c0c4fb42bd5c52c9f
 
 [yarn.lock]
 filename = yarn.lock
diff --git a/software/theia/instance.cfg.in b/software/theia/instance.cfg.in
index 1e6aa42900bca0f3d0c66af8e332396e3f022f83..fb1b221364216d698136b130ddda41719d1d9860 100644
--- a/software/theia/instance.cfg.in
+++ b/software/theia/instance.cfg.in
@@ -279,6 +279,23 @@ location = $${directory:frontend-static}/$${:filename}
 filename = $${:_buildout_section_name_}
 
 
+# Common Environment
+# ------------------
+
+[common-environment]
+recipe = slapos.recipe.template:jinja2
+rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
+mode = 0777
+template =
+  inline:
+  #!/bin/sh
+  . ${gowork:env.sh}
+  # reset PS1 from gowork
+  export PS1='$ '
+  export HOME=$${buildout:directory}
+  export PATH=${python-language-server:location}/bin:${java-jdk:location}/bin:${cli-utilities:PATH}:$HOME/.cargo/bin:$PATH
+
+
 # Theia Backend
 # -------------
 
@@ -300,12 +317,13 @@ template =
   export THEIA_OPEN_EDITOR_TOKEN=$(${openssl:location}/bin/openssl rand -hex 32)
   export THEIA_URL=$${:base-url}
   export THEIA_SHELL=$${theia-shell:rendered}
-  export HOME=$${buildout:directory}
   export TMP=$${directory:tmp}
   export TEMP=$TMP
   export LC_ALL=C.UTF-8
   export TERMINFO=${ncurses:location}/lib/terminfo/
   export EDITOR="${python-language-server:location}/bin/python -m theia_open --wait"
+  export THEIA_DEFAULT_PLUGINS="local-dir:${theia-plugins:location}"
+  . $${common-environment:rendered}
   exec ${theia-wrapper:rendered} $@
 ip =  $${theia-service-port:ip}
 port = $${theia-service-port:port}
@@ -392,7 +410,9 @@ rendered = $${directory:bin}/$${:_buildout_section_name_}
 mode = 0700
 template =
   inline:#!/bin/sh
-  export PATH=${buildout:bin-directory}:$PATH
+  . $${common-environment:rendered}
+  export PATH=${nodejs:location}/bin/:$PATH
+  . $${slapos-standalone-activate:rendered}
   exec ${slapos-standalone:script-path} \
       $${directory:runner} \
       $${slapos-standalone-config:ipv4} \
diff --git a/software/theia/software.cfg b/software/theia/software.cfg
index 0d41ac20037ecb7e93f5287b42d5950cd2577c90..75f7ab25b814e6d663b261e2f515363179dbd19a 100644
--- a/software/theia/software.cfg
+++ b/software/theia/software.cfg
@@ -299,7 +299,8 @@ install +=
 
 
 [cli-utilities]
-PATH = ${nodejs:location}/bin/:${bash:location}/bin/:${fish-shell:location}/bin/:${tig:location}/bin/:${vim:location}/bin/:${tmux:location}/bin/:${git:location}/bin/:${curl:location}/bin:${python2.7:location}/bin/:${buildout:bin-directory}
+PATH = ${nodejs:location}/bin:${bash:location}/bin:${fish-shell:location}/bin:${tig:location}/bin:${vim:location}/bin:${tmux:location}/bin:${git:location}/bin:${curl:location}/bin:${python2.7:location}/bin:${buildout:bin-directory}
+
 
 [theia-wrapper]
 recipe = slapos.recipe.template:jinja2
@@ -307,12 +308,7 @@ rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
 mode = 0777
 template =
   inline:
-  #!/bin/bash
-  . ${gowork:env.sh}
-  export PATH=${python-language-server:location}/bin/:${java-jdk:location}/bin/:${cli-utilities:PATH}:$HOME/.cargo/bin:$PATH
-  export THEIA_DEFAULT_PLUGINS="local-dir:${theia-plugins:location}"
-  # reset PS1 from gowork
-  export PS1='$ '
+  #!/bin/sh
   cd ${theia:location}
   exec ${yarn:location}/bin/yarn theia start $@