# FreeBSD-update server



## Jubakka (Mar 10, 2014)

Hi all,

I want to build an internal freebsd-update(8) server for our internal network. I do as the guide said, and edit the important things to the config-files. Everything works fine, until I want to `freebsd-update upgrade -r 10.0-RELEASE`. The client machine wants to fetch files from a "to-10.0-RELEASE"-directory. Now my questions: How to build this directory? I see how it is supposed to look like on update.freebsd.org, but I simply don't know how to create those to-$RELEASE-dirs. 
Thanks & best regards,
Jubakka


----------



## SirDice (Mar 10, 2014)

Build Your Own FreeBSD Update Server

But I suggest setting up a caching proxy server instead.


----------



## Jubakka (Mar 10, 2014)

I did use this documentation. I don't know, if it is simply outdated, but I find nothing to build the "to"$RELEASE-dirs.
But is has to work somehow^^ Pretty frustrating


----------



## SirDice (Mar 10, 2014)

Just set up an Apache server. And use this virtual host configuration:

```
<VirtualHost *:80>
        ServerAdmin me@example.com
        ServerName fbsd-update.example.com

        ProxyRequests Off
        ProxyPreserveHost Off

        <Proxy *>
                Order Deny,Allow
                Allow from All
        </Proxy>

        ProxyPass / http://update.freebsd.org/

        <Location />
                ProxyPassReverse /
                Order Allow,Deny
                Allow from All
        </Location>

        <IfModule cache_module>
                <IfModule disk_cache_module>
                        CacheEnable disk /
                        CacheRoot /var/cache/freebsd-update/
                </IfModule>
        </IfModule>

</VirtualHost>
```
You can then change /etc/freebsd-update.conf and change the ServerName to fbsd-update.example.com. Of course you have to make sure fbsd-update.example.com resolves to this server. 

The first host that does the update will make Apache fetch the files from the internet. The next host(s) will then fetch the files from the cache. So everything is just downloaded once.

NB. example.com is just, errr, an example.


----------

