diff --git a/run/scripts/run b/run/scripts/run
index 93a7f8dd93d6031963f897b9972a0e2e7ef4b0e9..85d89f77fcaf488733e0bf24a31dcf83a21b8a78 100755
--- a/run/scripts/run
+++ b/run/scripts/run
@@ -9,6 +9,19 @@ if [[ "$L3D_CONFIG" != "[]" ]]; then
     export PHP_VERSION=$V
   fi
 fi
+if [[ "$L3D_COMPOSE" != "[]" ]]; then
+  V=$(yq .name $L3D_COMPOSE)
+  if [[ "$V" != "null" ]]; then
+    export COMPOSE_PROJECT_NAME=$V
+  fi
+  if [[ ! -n ${PHP_VERSION} ]]; then
+    V=$(yq .services.php.image $L3D_COMPOSE | cut -d':' -f 2)
+    if [[ "$V" != "null" ]]; then
+      export PHP_VERSION=$V
+    fi
+  fi
+  rm "$L3D_COMPOSE"
+fi
 
 COMMAND=start
 if [[ -n "$1" ]]; then
diff --git a/run/scripts/start b/run/scripts/start
index 8a9039e0e507dd2681ff93ef6129af7e779fdd3f..66768e8d1e5f38e072def48927266b9aac733220 100755
--- a/run/scripts/start
+++ b/run/scripts/start
@@ -1,17 +1,6 @@
 #!/bin/bash
 
 function getConfig() {
-  if [[ "$L3D_COMPOSE" != "[]" ]]; then
-    V=$(yq .name $L3D_COMPOSE)
-    if [[ "$V" != "null" ]]; then
-      COMPOSE_PROJECT_NAME=$V
-    fi
-    V=$(yq .services.php.image $L3D_COMPOSE | cut -d':' -f 2)
-    if [[ "$V" != "null" ]]; then
-      PHP_VERSION=$V
-    fi
-    rm "$L3D_COMPOSE"
-  fi
   if [[ ! -n ${PHP_VERSION} ]]; then
     while true; do
       DEFAULT=8.2
@@ -71,6 +60,7 @@ function startContainer() {
         --env L3DSHELL=${L3DSHELL}
         --env L3D_ALWAYS_CLEANUP=${L3D_ALWAYS_CLEANUP}
         --env HOME=/home/${USERNAME}
+        --env USERNAME=${USERNAME}
         --env COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME}
         --env COMPOSER_DOWNGRADE=${COMPOSER_DOWNGRADE}
         --env PHP_VERSION=${PHP_VERSION}