<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MM in Container config lost after Container Stop&#x2F;Start]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I sucessfully setup a container from<br />
<a href="https://github.com/bastilimbach/docker-MagicMirror" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/bastilimbach/docker-MagicMirror</a><br />
in server mode only.<br />
i put in my config, everything runs well.</p>
<p dir="auto">But: If i restart the container in portainer (click stop, click start), it starts, complains about config not to be found and restarts.<br />
If i take a look into my host data at /data/compose/mounts/config, everything is still there but log complains about not finding a config</p>
<p dir="auto">I have been running a MM installation on  a raspberry pi for years, so it seems to be somehow container related. I am new to virtualization things, so please forgive my ignorance.</p>
<p dir="auto">Anyone any Ideas?<br />
Thank you in advance</p>
<p dir="auto">log snippet:</p>
<pre><code>[14.02.2023 15:26.10.982] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Cannot read properties of undefined (reading 'module')

[14.02.2023 15:26.10.983] [ERROR] Whoops! There was an uncaught exception...

[14.02.2023 15:26.10.986] [ERROR] TypeError: Cannot read properties of undefined (reading 'module')

    at /opt/magic_mirror/js/app.js:220:34

    at loadConfig (/opt/magic_mirror/js/app.js:81:4)

    at App.start (/opt/magic_mirror/js/app.js:212:3)

    at Object.&lt;anonymous&gt; (/opt/magic_mirror/serveronly/index.js:4:5)

    at Module._compile (node:internal/modules/cjs/loader:1226:14)

    at Module._extensions..js (node:internal/modules/cjs/loader:1280:10)

    at Module.load (node:internal/modules/cjs/loader:1089:32)

    at Module._load (node:internal/modules/cjs/loader:930:12)

    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

    at node:internal/main/run_main_module:23:47

[14.02.2023 15:26.10.986] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?

[14.02.2023 15:26.10.986] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
</code></pre>
]]></description><link>https://forum.magicmirror.builders/topic/17626/mm-in-container-config-lost-after-container-stop-start</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 11:02:59 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/17626.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Feb 2023 14:44:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Tue, 21 Feb 2023 20:32:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a>  thanks a lot for your advice!<br />
finally, there was only one package missing</p>
<pre><code>npm install request
</code></pre>
<p dir="auto">did the job for me.</p>
<p dir="auto">:folded_hands_medium-light_skin_tone:</p>
]]></description><link>https://forum.magicmirror.builders/post/107983</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107983</guid><dc:creator><![CDATA[asdf303]]></dc:creator><pubDate>Tue, 21 Feb 2023 20:32:17 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Tue, 21 Feb 2023 19:03:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a> and note there are other libs as well</p>
]]></description><link>https://forum.magicmirror.builders/post/107980</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107980</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 21 Feb 2023 19:03:27 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Tue, 21 Feb 2023 18:50:13 GMT]]></title><description><![CDATA[<p dir="auto">as sam already said you can fix this, for more info see <a href="https://khassel.gitlab.io/magicmirror/faq/#error-cannot-find-module-request" target="_blank" rel="noopener noreferrer nofollow ugc">https://khassel.gitlab.io/magicmirror/faq/#error-cannot-find-module-request</a></p>
]]></description><link>https://forum.magicmirror.builders/post/107979</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107979</guid><dc:creator><![CDATA[karsten13]]></dc:creator><pubDate>Tue, 21 Feb 2023 18:50:13 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Tue, 21 Feb 2023 17:07:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asdf303" aria-label="Profile: asdf303">@<bdi>asdf303</bdi></a> just install the missing library</p>
]]></description><link>https://forum.magicmirror.builders/post/107977</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107977</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 21 Feb 2023 17:07:37 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Tue, 21 Feb 2023 16:54:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a> indeed, the installation has been running for ~5 years now.</p>
<p dir="auto">I know this is none of your business, but do you might have a recommendation for a up-to-date module where i can run the same features? (naming a start and destination bus stop in google maps and getting the next connections displayed?)</p>
<p dir="auto">i scrolled through all of the 3rd party modules and there are many many of them,  but none of them seems to be customizable to my home town. I live within VGN area in Germany, but there is no plugin really supporting this and i am definetly lacking the skills to create such a plugin by myself.</p>
]]></description><link>https://forum.magicmirror.builders/post/107976</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107976</guid><dc:creator><![CDATA[asdf303]]></dc:creator><pubDate>Tue, 21 Feb 2023 16:54:19 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Sun, 19 Feb 2023 21:31:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asdf303" aria-label="Profile: asdf303">@<bdi>asdf303</bdi></a></p>
<p dir="auto">this module is not really maintained, it relies on an outdated dependency (<code>request</code>) which was removed from mm core a long time ago.</p>
<p dir="auto">If it runs on your pi the mm installation there is very old or you installed <code>request</code> manually. See <a href="https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later">this topic</a> for more info.</p>
]]></description><link>https://forum.magicmirror.builders/post/107950</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107950</guid><dc:creator><![CDATA[karsten13]]></dc:creator><pubDate>Sun, 19 Feb 2023 21:31:48 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Sun, 19 Feb 2023 19:11:04 GMT]]></title><description><![CDATA[<p dir="auto">update: if the module: ‘MMM-LocalTransport’, module is disabled, it works.<br />
Strange thing:</p>
<ul>
<li>the module works on my raspi electron installation.</li>
<li>it does not in the container.<br />
I will keep you updated.</li>
</ul>
]]></description><link>https://forum.magicmirror.builders/post/107949</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107949</guid><dc:creator><![CDATA[asdf303]]></dc:creator><pubDate>Sun, 19 Feb 2023 19:11:04 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Sat, 18 Feb 2023 17:19:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a> thank you, i will try next time, will take 2…3 days, maybe</p>
]]></description><link>https://forum.magicmirror.builders/post/107941</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107941</guid><dc:creator><![CDATA[asdf303]]></dc:creator><pubDate>Sat, 18 Feb 2023 17:19:58 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Fri, 17 Feb 2023 18:41:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asdf303" aria-label="Profile: asdf303">@<bdi>asdf303</bdi></a></p>
<p dir="auto">must be something with the portainer setup.</p>
<p dir="auto">What is strange is the order in the log file, I would expect the last lines beginning with <code>copy default modules to host ...</code> at the top.</p>
<p dir="auto">One thing you can try is to change <code>restart: unless-stopped</code> to <code>restart: never</code> in the <code>docker-compose.yml</code>, may 2 containers are started when portainer stops the one running.</p>
]]></description><link>https://forum.magicmirror.builders/post/107916</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107916</guid><dc:creator><![CDATA[karsten13]]></dc:creator><pubDate>Fri, 17 Feb 2023 18:41:06 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Fri, 17 Feb 2023 12:45:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a> Thank you for asking.<br />
Please find all my stuff below</p>
<p dir="auto">As mentioned above, it loads correctly and runs the configuration correctly on the first start.<br />
Everything is fine.<br />
But if the container is started/stopped in Portainer, it seems to not be able to find a correct config.js, as you can see in the log.</p>
<p dir="auto">The only way to  get it running is, i stop the container, remove the stack in Portainer, then navigate to /data/compose in the host system, manually delete all the data there (i use Winscp). Then i re-install everything (including e.g. the mmm-localtransport addon) acc.  to the book, modify the config.js to what you can see below.</p>
<pre><code>let config = {
	address: "0.0.0.0", 	// Address to listen on, can be:
	port: 8080,
	basePath: "/", 	// The URL path where MagicMirrorÂ² is hosted. If you are using a Reverse proxy
					// you must set the sub path here. basePath must end with a /
	//ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.178.1/24"], 	// Set [] to allow all IP addresses
	ipWhitelist: [], 	// Set [] to allow all IP addresses

	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true

	language: "de",
	locale: "en-US",
	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
	timeFormat: 24,
	units: "metric",
	// serverOnly:  true/false/"local" ,
	// local for armv6l processors, default
	//   starts serveronly and then starts chrome browser
	// false, default for all NON-armv6l devices
	// true, force serveronly mode, because you want to.. no UI on this device

	modules: [
		{
			module: "alert",
		},
		{
			module: "updatenotification",
			position: "top_bar"
		},
		{
			module: "clock",
			position: "top_left",
				config: {
					displaySeconds: false,
					displayType: "digital",
					clockBold: false,
					// The config property is optional.
					// See 'Configuration options' for more information.
					}
		},
{
			module: "calendar",
			header: "Was passiert heute?",
			position: "top_left",
			config: {
				fade: false,
				timeFormat: 'absolute',
				dateFormat: '24',
				getRelative: 24,
				fetchInterval: 3600000,
				calendars: [
                                	{
					// der Abfallkalender
                                              	symbol: "trash",
                                       		url: "webcal://XXX"
                                        },
					{
					//private calendar
						symbol: "home",
      					 	url: "XXX",
        					auth: {
							user: "XXX",
							pass: "XXX",
							method: "basic"
						}
					}
				]
			}
		},

/*		{
			module: "compliments",
			position: "lower_third"
		},*/
	
		{
			module: "weather", //aktuelles Wetter
			position: "top_right",
			//header: "aktuelles Wetter",
			config: {
				fade: false,
				type: "current",
				weatherProvider: "openweathermap",
				location: "XXX",
				locationID: "XXX",  //ID from http://www.openweathermap.org/help/city_list.txt
				apiKey: "XXX",
				roundTemp: true,
				maxNumberOfDays: 2,
			}

		},{
			module: "weather", //Vorhersage
			position: "top_right",
			header: "Vorhersage",
			config: {
				fade: false,
				type: "forecast",
				weatherProvider: "openweathermap",
				location: "XXX",
				locationID: "XXX",  //ID from http://www.openweathermap.org/help/city_list.txt
				apiKey: "xxx",
				roundTemp: true,
				maxNumberOfDays: 4,
			}

		},
		{
			module: "newsfeed",
			position: "bottom_bar",
			config: {
				feeds: [
					{
						title: "Tagesschau",
						url: "https://www.tagesschau.de/xml/rss2"
					}
				],
				showSourceTitle: false,
				showPublishDate: false,
				wrapTitle: false,
			}
		},,{
		module: 'MMM-LocalTransport',
		header: 'Bus nach XXX',
		position: 'bottom_right',
		config: {
			api_key: 'xxxx',
			origin: 'xxxx',
			destination: 'xxxx',
			maximumEntries: 3,
			displayArrival: false,
			displayWalkType: 'none',
			updateInterval: 60,
			displayStationLength: -1,
		}
	},
	]
};

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}

</code></pre>
<p dir="auto">Here is the docker-compose.yml, copied from your project, unchanged:</p>
<pre><code>version: '3'

services:
  magicmirror:
    container_name: mm
    image: karsten13/magicmirror:latest
    ports:
      - "8080:8080"
    volumes:
      - ../mounts/config:/opt/magic_mirror/config
      - ../mounts/modules:/opt/magic_mirror/modules
      - ../mounts/css:/opt/magic_mirror/css
    restart: unless-stopped
    command: 
      - npm
      - run
      - server
</code></pre>
<p dir="auto">and finally, the log after RE-starting the container.</p>
<pre><code>&gt; magicmirror@2.22.0 server

&gt; node ./serveronly

[17.02.2023 13:35.40.960] [LOG]   Starting MagicMirror: v2.22.0

[17.02.2023 13:35.40.962] [LOG]   Loading config ...

[17.02.2023 13:35.40.964] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Cannot read properties of undefined (reading 'module')

[17.02.2023 13:35.40.965] [ERROR] Whoops! There was an uncaught exception...

[17.02.2023 13:35.40.967] [ERROR] TypeError: Cannot read properties of undefined (reading 'module')

    at /opt/magic_mirror/js/app.js:220:34

    at loadConfig (/opt/magic_mirror/js/app.js:81:4)

    at App.start (/opt/magic_mirror/js/app.js:212:3)

    at Object.&lt;anonymous&gt; (/opt/magic_mirror/serveronly/index.js:4:5)

    at Module._compile (node:internal/modules/cjs/loader:1226:14)

    at Module._extensions..js (node:internal/modules/cjs/loader:1280:10)

    at Module.load (node:internal/modules/cjs/loader:1089:32)

    at Module._load (node:internal/modules/cjs/loader:930:12)

    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

    at node:internal/main/run_main_module:23:47

[17.02.2023 13:35.40.967] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?

[17.02.2023 13:35.40.967] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

copy default modules to host ...

copy css files to host ...

chown modules and config folder ...

timezone is Europe/Berlin

start magicmirror
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/107911</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107911</guid><dc:creator><![CDATA[asdf303]]></dc:creator><pubDate>Fri, 17 Feb 2023 12:45:15 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Thu, 16 Feb 2023 17:34:07 GMT]]></title><description><![CDATA[<p dir="auto">my project is documented here <a href="https://khassel.gitlab.io/magicmirror/" target="_blank" rel="noopener noreferrer nofollow ugc">https://khassel.gitlab.io/magicmirror/</a></p>
<p dir="auto">I don’t know the portainer setup and for further investigation we need to see</p>
<ul>
<li>full log</li>
<li>your <code>docker-compose.yml</code> or the <code>docker run ...</code> command</li>
<li>full <code>config.js</code></li>
</ul>
<p dir="auto">Please remove any secrets before publishing here.</p>
]]></description><link>https://forum.magicmirror.builders/post/107896</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107896</guid><dc:creator><![CDATA[karsten13]]></dc:creator><pubDate>Thu, 16 Feb 2023 17:34:07 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Thu, 16 Feb 2023 16:24:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asdf303" aria-label="Profile: asdf303">@<bdi>asdf303</bdi></a> maybe <a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a>  will check this topic out</p>
]]></description><link>https://forum.magicmirror.builders/post/107892</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107892</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 16 Feb 2023 16:24:35 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Thu, 16 Feb 2023 16:19:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> thank you for your comment.<br />
Actually, my link above is wrong. My fault. Sorry.<br />
I am already using the image</p>
<p dir="auto">karsten13/magicmirror:latest.</p>
<p dir="auto">So, any further ideas?</p>
]]></description><link>https://forum.magicmirror.builders/post/107891</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107891</guid><dc:creator><![CDATA[asdf303]]></dc:creator><pubDate>Thu, 16 Feb 2023 16:19:48 GMT</pubDate></item><item><title><![CDATA[Reply to MM in Container config lost after Container Stop&#x2F;Start on Wed, 15 Feb 2023 15:02:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/asdf303" aria-label="Profile: asdf303">@<bdi>asdf303</bdi></a> that docker image is no longer supported, I suggest moving to the one from <a class="plugin-mentions-user plugin-mentions-a" href="/user/karsten13" aria-label="Profile: karsten13">@<bdi>karsten13</bdi></a></p>
<p dir="auto"><a href="https://hub.docker.com/r/karsten13/magicmirror/" target="_blank" rel="noopener noreferrer nofollow ugc">https://hub.docker.com/r/karsten13/magicmirror/</a></p>
]]></description><link>https://forum.magicmirror.builders/post/107868</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/107868</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Wed, 15 Feb 2023 15:02:24 GMT</pubDate></item></channel></rss>