diff --git a/components/lua/lua-5.3/lua.c b/components/lua/lua-5.3/lua.c
index f1eb1687..c06fcc35 100644
--- a/components/lua/lua-5.3/lua.c
+++ b/components/lua/lua-5.3/lua.c
@@ -30,7 +30,11 @@
 #endif
 
 #ifndef LUA_INIT_STRING
-#define LUA_INIT_STRING "@init.lua"
+# if defined(CONFIG_NODEMCU_EMBED_LFS)
+#  define LUA_INIT_STRING "node.LFS.get('init')()"
+# else
+#  define LUA_INIT_STRING "@init.lua"
+# endif
 #endif
 
 #if !defined(STARTUP_COUNT)