diff --git a/containers/eic/profile.d/z21_epic_main.sh b/containers/eic/profile.d/z21_epic_main.sh
new file mode 100644
index 0000000000000000000000000000000000000000..b7ba7454da40665b441fb99a787861de90de8eab
--- /dev/null
+++ b/containers/eic/profile.d/z21_epic_main.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# This script auto-loads epic-main configuration iff:
+# - no $DETECTOR_PATH or $DETECTOR_CONFIG is set
+# - /opt/detector/epic-main/bin/thisepic.sh exists
+
+thisepic=/opt/detector/epic-main/bin/thisepic.sh
+if test -z "$DETECTOR_PATH" -a -z "$DETECTOR_CONFIG" ; then
+  if test -f $thisepic ; then
+    source $thisepic
+  fi
+fi