# Setting ntp servers and proxy server in system-docker

**URL:** <https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39>\
**Category:** RancherOS\
**Created:** [July 8, 2015, 10:13pm UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39 "2015-07-08T22:13:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![LuizFuzaro](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/luizfuzaro/32/13_2.png) [@LuizFuzaro](https://forums.suse.com/u/LuizFuzaro)\
**Post date:** [July 8, 2015, 10:13pm UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/1 "2015-07-08T22:13:30Z")

</div>

Hi,

How can I set ntp servers and proxy for system-docker?  
For docker I can set a proxy and works well but for system-docker can’t.  
I want use my ntp servers and not find where set or alter settings of them.

thanks in advance

If possible I want to know the startup sequence of RancherOs too.

---

<div class="post-metadata">

**Author:** ![bnoon](https://avatars.discourse-cdn.com/v4/letter/b/7cd45c/32.png) [@bnoon](https://forums.suse.com/u/bnoon)\
**Post date:** [July 13, 2015, 4:26pm UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/2 "2015-07-13T16:26:18Z")

</div>

I am having a similar problem. The RancherOS ntp container restarts w/o setting the time from the pool ntpd servers.

I would like to use a local ntpd server.

Also, on a bare-metal install, there is no way to set the hwclock (no /dev/rtc).

–Bill

---

<div class="post-metadata">

**Author:** ![imikushin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/imikushin/32/17_2.png) [@imikushin](https://forums.suse.com/u/imikushin)\
**Post date:** [July 13, 2015, 5:28pm UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/3 "2015-07-13T17:28:36Z")

</div>

Sadly, turns out ntp service was broken since at least v0.3.0  
We’ll fix it and add configuration options in a future release (not sure it will make into v0.3.4, but we’ll see).

Regarding ntp behind proxy, I’ve found this trick (requires Debian or Ubuntu console to perform): [http://superuser.com/questions/307158/how-to-use-ntpdate-behind-a-proxy](http://superuser.com/questions/307158/how-to-use-ntpdate-behind-a-proxy)

I’ll address proxying system-docker in a separate reply.

---

<div class="post-metadata">

**Author:** ![imikushin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/imikushin/32/17_2.png) [@imikushin](https://forums.suse.com/u/imikushin)\
**Post date:** [July 13, 2015, 6:52pm UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/4 "2015-07-13T18:52:12Z")

</div>

Docker daemon can only be configured to use proxy with http\_proxy environment variable.

So, currently, system-docker can’t use proxy, because there’s no way to put an environment variable into system-docker configuration right now.

However, you can try to set up a [transparent proxy](https://jpetazzo.github.io/2014/06/17/transparent-squid-proxy-docker/).

---

<div class="post-metadata">

**Author:** ![LuizFuzaro](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/luizfuzaro/32/13_2.png) [@LuizFuzaro](https://forums.suse.com/u/LuizFuzaro)\
**Post date:** [July 14, 2015, 6:02pm UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/5 "2015-07-14T18:02:24Z")

</div>

Thanks,

but ntp are in internal net, sorry to mix two doubts in one topic.

A proxy setting for system-docker are for install docker containers.

Thanks

---

<div class="post-metadata">

**Author:** ![zxp](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/zxp/32/204_2.png) [@zxp](https://forums.suse.com/u/zxp)\
**Post date:** [September 7, 2015, 6:23am UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/6 "2015-09-07T06:23:42Z")

</div>

you can pass https\_proxy to kernel boot parms, normally these vars will pass to pid 1 process – system\_docker.

for example:

1. mount /dev/vda1 /mnt
2. vi /mnt/boot/grub/grub.cfg
3. append “HTTPS\_PROXY=http://10.10.10.10:8118 HTTP\_PROXY=http://10.10.10.10:8118” to linux line
4. reboot

you can also pass the params in ipxe boot script or edit it in grub menu screen.

---

<div class="post-metadata">

**Author:** ![prateek\_khushalani](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@prateek\_khushalani](https://forums.suse.com/u/prateek_khushalani)\
**Post date:** [March 14, 2016, 11:09am UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/7 "2016-03-14T11:09:19Z")

</div>

Worked Like a charm … Cheers

/Prateek

---

<div class="post-metadata">

**Author:** ![sjiveson](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sjiveson/32/966_2.png) [@sjiveson](https://forums.suse.com/u/sjiveson)\
**Post date:** [October 11, 2016, 8:46am UTC](https://forums.suse.com/t/setting-ntp-servers-and-proxy-server-in-system-docker/39/8 "2016-10-11T08:46:43Z")

</div>

Hey @LuizFuzaro,

As of v0.6.0 you can now change the NTP configuration via a write\_files stanza in cloud-config. See here: [http://docs.rancher.com/os/configuration/write-files/](http://docs.rancher.com/os/configuration/write-files/).
