<p><strong>updated:</strong></p>
<p>To reproduce the issue is very simple with a few steps:</p>
<ol>
<li>Install it on your Ubuntu server by running the following command:</li>
</ol>
<blockquote>
<p>/bin/bash -c &quot;$(curl -fsSL <a href="https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby" rel="nofollow noreferrer">https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby</a>)&quot;</p>
</blockquote>
<ol start="2">
<li><p>During the auto installation process, you will be prompted to enter the domain for your Posthog site, so enter one and wait for the process to finish.</p>
</li>
<li><p>Visit the domain you entered and it is accessbile.</p>
</li>
<li><p>Now reboot your VPS and visit the domain again it is down forever. Not accessbile even if you use your vps ip address.</p>
</li>
</ol>
<p>I've tried this auto-installation and reboot thing three times on the same vps and ended up with the same result. I've also tried it on another vps by a new hosting provider, yet still the same issue. Fresh installation and the site will be down right after your reboot your vps!</p>
<p>The following is the error log I got from the Caddy container, which is generated after the vps reboot:</p>
<blockquote>
<p>{&quot;level&quot;:&quot;error&quot;,&quot;ts&quot;:1642534398.9394724,&quot;logger&quot;:&quot;http.log.error&quot;,&quot;msg&quot;:&quot;dial
tcp 172.18.0.4:8000: connect: connection
refused&quot;,&quot;request&quot;:{&quot;remote_addr&quot;:&quot;67.198.228.123:35424&quot;,&quot;proto&quot;:&quot;HTTP/2.0&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;host&quot;:&quot;&lt;my_posthog_domain&gt;&quot;,&quot;uri&quot;:&quot;/preflight&quot;,&quot;headers&quot;:{&quot;Sec-Ch-Ua&quot;:[&quot;&quot;
Not A;Brand&quot;;v=&quot;99&quot;, &quot;Chromium&quot;;v=&quot;96&quot;, &quot;Google
Chrome&quot;;v=&quot;96&quot;&quot;],&quot;User-Agent&quot;:[&quot;Mozilla/5.0 (Macintosh; Intel Mac
OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/96.0.4664.110
Safari/537.36&quot;],&quot;Sec-Fetch-Site&quot;:[&quot;cross-site&quot;],&quot;Accept-Language&quot;:[&quot;en-US,en;q=0.9&quot;],&quot;Accept-Encoding&quot;:[&quot;gzip, deflate, br&quot;],&quot;Cookie&quot;:[&quot;phtoolbar=yes;
csrftoken=gsVfpdF56rbYgQQdwywH45zi83i386oe5KZZef3mIE00bumaQCG3i4OM35bdJIxQ;
ph_sTMFPsFhdP1Ssg_posthog=%7B%22distinct_id%22%3A%22FpLgrw74q9qcclLSJ1bOrzsiPJmZtHdKswxemTFy9LG%22%7D&quot;],&quot;Cache-Control&quot;:[&quot;max-age=0&quot;],&quot;Sec-Ch-Ua-Mobile&quot;:[&quot;?0&quot;],&quot;Upgrade-Insecure-Requests&quot;:[&quot;1&quot;],&quot;Sec-Fetch-Dest&quot;:[&quot;document&quot;],&quot;Sec-Ch-Ua-Platform&quot;:[&quot;&quot;macOS&quot;&quot;],&quot;Accept&quot;:[&quot;text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,<em>/</em>;q=0.8,application/signed-exchange;v=b3;q=0.9&quot;],&quot;Sec-Fetch-Mode&quot;:[&quot;navigate&quot;],&quot;Sec-Fetch-User&quot;:[&quot;?1&quot;]},&quot;tls&quot;:{&quot;resumed&quot;:false,&quot;version&quot;:772,&quot;cipher_suite&quot;:4865,&quot;proto&quot;:&quot;h2&quot;,&quot;proto_mutual&quot;:true,&quot;server_name&quot;:&quot;&lt;my_posthog_domain&gt;&quot;}},&quot;duration&quot;:0.008754516,&quot;status&quot;:502,&quot;err_id&quot;:&quot;gicbjv2m4&quot;,&quot;err_trace&quot;:&quot;reverseproxy.statusError
(reverseproxy.go:886)&quot;}
{&quot;level&quot;:&quot;error&quot;,&quot;ts&quot;:1642534401.5881941,&quot;logger&quot;:&quot;http.log.error&quot;,&quot;msg&quot;:&quot;dial
tcp 172.18.0.4:8000: connect: connection
refused&quot;,&quot;request&quot;:{&quot;remote_addr&quot;:&quot;67.198.228.123:35424&quot;,&quot;proto&quot;:&quot;HTTP/2.0&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;host&quot;:&quot;&lt;my_posthog_domain&gt;&quot;,&quot;uri&quot;:&quot;/preflight&quot;,&quot;headers&quot;:{&quot;Cache-Control&quot;:[&quot;max-age=0&quot;],&quot;Sec-Ch-Ua-Mobile&quot;:[&quot;?0&quot;],&quot;Sec-Ch-Ua-Platform&quot;:[&quot;&quot;macOS&quot;&quot;],&quot;Sec-Fetch-User&quot;:[&quot;?1&quot;],&quot;User-Agent&quot;:[&quot;Mozilla/5.0
(Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/96.0.4664.110 Safari/537.36&quot;],&quot;Sec-Ch-Ua&quot;:[&quot;&quot; Not
A;Brand&quot;;v=&quot;99&quot;, &quot;Chromium&quot;;v=&quot;96&quot;, &quot;Google
Chrome&quot;;v=&quot;96&quot;&quot;],&quot;Sec-Fetch-Mode&quot;:[&quot;navigate&quot;],&quot;Accept-Encoding&quot;:[&quot;gzip,
deflate,
br&quot;],&quot;Upgrade-Insecure-Requests&quot;:[&quot;1&quot;],&quot;Accept&quot;:[&quot;text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,<em>/</em>;q=0.8,application/signed-exchange;v=b3;q=0.9&quot;],&quot;Sec-Fetch-Site&quot;:[&quot;cross-site&quot;],&quot;Sec-Fetch-Dest&quot;:[&quot;document&quot;],&quot;Accept-Language&quot;:[&quot;en-US,en;q=0.9&quot;],&quot;Cookie&quot;:[&quot;phtoolbar=yes;
csrftoken=gsVfpdF56rbYgQQdwywH45zi83i386oe5KZZef3mIE00bumaQCG3i4OM35bdJIxQ;
ph_sTMFPsFhdP1Ssg_posthog=%7B%22distinct_id%22%3A%22FpLgrw74q9qcclLSJ1bOrzsiPJmZtHdKswxemTFy9LG%22%7D&quot;]},&quot;tls&quot;:{&quot;resumed&quot;:false,&quot;version&quot;:772,&quot;cipher_suite&quot;:4865,&quot;proto&quot;:&quot;h2&quot;,&quot;proto_mutual&quot;:true,&quot;server_name&quot;:&quot;&lt;my_posthog_domain&gt;&quot;}},&quot;duration&quot;:0.001907749,&quot;status&quot;:502,&quot;err_id&quot;:&quot;27e15xwsj&quot;,&quot;err_trace&quot;:&quot;reverseproxy.statusError
(reverseproxy.go:886)&quot;}</p>
</blockquote>
<p>By the way, this is their documentaion page FYI: <a href="https://posthog.com/docs/self-host/deploy/hobby" rel="nofollow noreferrer">https://posthog.com/docs/self-host/deploy/hobby</a></p>
<p><strong>Original question:</strong></p>
<p>I've installed Posthog with their so-called hobby installation script on my vps and at first it was working fine. But right after I rebooted ubuntu and visited my self-hosted posthog site again, it would not load and just showed a blank page. It seems that something went wrong after I rebooted my vps. I've checked all the services required by Posthog with the command docker ps, and everything is up and running(check the screenshot attached).</p>
<p>I've been trying to figure it out for 4 days yet with no luck. I am new to docker and kubernetes so I do not know what causes the problem and what I should do. Please shed some light on this and help me :(</p>
<p><a href="https://i.stack.imgur.com/ubAbb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ubAbb.png" alt="enter image description here" /></a></p>

marcel
<p>First things first, this is a docker-compose stack, not Kubernetes.
If you take a look at the script you execute, you can see that <a href="https://github.com/PostHog/posthog/blob/153b58d9f906fb6f99df942364017738b565d068/bin/deploy-hobby#L77" rel="nofollow noreferrer">it's downlowading docker compose</a> and then <a href="https://github.com/PostHog/posthog/blob/153b58d9f906fb6f99df942364017738b565d068/bin/deploy-hobby#L94" rel="nofollow noreferrer">uses it</a> to start up your stack.
As such, executing <code>docker-compose stop &amp;&amp; docker-compose start</code> after your rebooted should fix this.</p>
<p>The &quot;problem&quot; here is the docker compose yaml that is used for the hobby project, which includes the following:</p>
<pre><code>   caddy:
        image: caddy
        restart: unless-stopped
        ports:
            - '80:80'
            - '443:443'
</code></pre>
<p><a href="https://github.com/PostHog/posthog/blob/153b58d9f906fb6f99df942364017738b565d068/docker-compose.hobby.yml#L87" rel="nofollow noreferrer">https://github.com/PostHog/posthog/blob/153b58d9f906fb6f99df942364017738b565d068/docker-compose.hobby.yml#L87</a></p>
<p>The behavior of the <code>unless-stoppped</code> command is, that a given container is not restarted, if it was stopped.</p>
<blockquote>
<p>unless-stopped     Similar to always, except that when the container is stopped (manually or otherwise), it is not restarted even after Docker daemon restarts.</p>
</blockquote>
<p>The important part for you is &quot;even after Docker daemon restarts&quot;, which is happening as part of your reboot.</p>
<p>Hence, Caddy isn't running, and your service isn't available.</p>
