<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Unifi-Controller on Ulis Notes</title>
    <link>https://wolf-u.li/en/tag/unifi-controller/</link>
    <description>Recent content in Unifi-Controller on Ulis Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright 2006-CURRENTYEAR Uli Wolf - All rights reserved</copyright>
    <lastBuildDate>Mon, 22 Aug 2022 08:24:29 +2200</lastBuildDate>
    <atom:link href="https://wolf-u.li/en/tag/unifi-controller/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Unifi Dream Router (UDR) - Setup of the NTP Server</title>
      
      
      <link>https://wolf-u.li/unifi-dream-router-udr-setup-of-the-ntp-server/</link>
      <pubDate>Mon, 22 Aug 2022 08:24:29 +2200</pubDate>
      <guid>https://wolf-u.li/unifi-dream-router-udr-setup-of-the-ntp-server/</guid>
      <description>&lt;p&gt;After i had installed my new Unifi Dream Router i discovered after a while that the time of some of the devices in my network was screwed up. After a bit of research i found that the UDR (in contrast to my previous Unifi Gateway) doesn&amp;rsquo;t feature NTP. Hence i had a pretty timeless setup.&lt;/p&gt;
&lt;ins class=&#34;adsbygoogle&#34; style=&#34;display:block; text-align:center;&#34; data-ad-layout=&#34;in-article&#34; data-ad-format=&#34;fluid&#34; data-ad-client=&#34;ca-pub-2322978122735420&#34; data-ad-slot=&#34;3161252284&#34;&gt;&lt;/ins&gt;
&lt;h2 id=&#34;setup-of-podman&#34;&gt;Setup of podman&lt;/h2&gt;
&lt;p&gt;The NTP server is setup in a &lt;link rel=dns-prefetch href=//hub.docker.com /&gt; &lt;a href=&#34;https://hub.docker.com/r/tusc/chrony-udm&#34;
    title=&#34;container&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  container&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;, hence it is important to &lt;a href=&#34;https://wolf-u.li/en/unifi-dream-router-udr-setup-of-podman/&#34;
    title=&#34;first setup podman on the UDR&#34; 
   &gt;
  first setup podman on the UDR&lt;/a&gt;.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>After i had installed my new Unifi Dream Router i discovered after a while that the time of some of the devices in my network was screwed up. After a bit of research i found that the UDR (in contrast to my previous Unifi Gateway) doesn&rsquo;t feature NTP. Hence i had a pretty timeless setup.</p>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-2322978122735420" data-ad-slot="3161252284"></ins>
<h2 id="setup-of-podman">Setup of podman</h2>
<p>The NTP server is setup in a <link rel=dns-prefetch href=//hub.docker.com /> <a href="https://hub.docker.com/r/tusc/chrony-udm"
    title="container" 
     target="_blank" rel="nofollow noopener noreferrer" >
  container&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, hence it is important to <a href="/en/unifi-dream-router-udr-setup-of-podman/"
    title="first setup podman on the UDR" 
   >
  first setup podman on the UDR</a>.</p>
<h2 id="setup-of-the-ntp-container">Setup of the NTP Container</h2>
<p>To automatically start the container, the respective file has to be created. This is done through the following command:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cat &gt; /data/on_boot.d/20-ntp.sh <span class="s">&lt;&lt;EOF
</span></span></span><span class="line"><span class="cl"><span class="s">#!/bin/sh
</span></span></span><span class="line"><span class="cl"><span class="s">CONTAINER=ntp
</span></span></span><span class="line"><span class="cl"><span class="s">if podman container exists ${CONTAINER}; then
</span></span></span><span class="line"><span class="cl"><span class="s">  podman start ${CONTAINER}
</span></span></span><span class="line"><span class="cl"><span class="s">else
</span></span></span><span class="line"><span class="cl"><span class="s">  podman run --device=/dev/net/tun --publish=123:123/udp --cap-add=SYS_TIME --name ${CONTAINER} -d tusc/chrony-udm
</span></span></span><span class="line"><span class="cl"><span class="s">fi
</span></span></span><span class="line"><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="cl">chmod a+x /data/on_boot.d/20-ntp.sh
</span></span></code></pre></td></tr></table>
</div>
</div><p>Now pull the container:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">podman pull tusc/chrony-udm
</span></span></code></pre></td></tr></table>
</div>
</div><p>And start the container:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">/data/on_boot.d/20-ntp.sh
</span></span></code></pre></td></tr></table>
</div>
</div><h2 id="sources">Sources</h2>
<ul>
<li><link rel=dns-prefetch href=//community.ui.com /> <a href="https://community.ui.com/questions/PSA-UDM-will-not-act-as-an-NTP-server/327e85c8-8680-4c47-b60e-045894fc7cc4"
    title="PSA: UDM will not act as an NTP server" 
     target="_blank" rel="nofollow noopener noreferrer" >
  PSA: UDM will not act as an NTP server&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a></li>
<li><link rel=dns-prefetch href=//hub.docker.com /> <a href="https://hub.docker.com/r/tusc/chrony-udm"
    title="Dockerhub: tusc/chrony-udm" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Dockerhub: tusc/chrony-udm&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a></li>
</ul>
]]></content:encoded>
    </item>
  </channel>
</rss>
