# Private ports/package repo



## navles (Aug 26, 2014)

Dear FreeBSD users,

I just started using FreeBSD and i'm currently running a few test servers to get familiar with FreeBSD. I have read a[]lot of guides and manuals but *I* can't seem to find any information regarding a private ports/package repo. Let's say *I* have a created a business application and *i* want to distribute it to my clients. I will install the software myself, but *I*'d like to keep the source for myself. And only distribute the binaries.

Is it possible to have a production servers create binaries for certain versions of FreeBSD and then on the clients add a private repo to pk2ng? So *I* can update my private repo from the company and the clients will automatic_al_ly look for updates daily. And if *I* have a new client *I* can just install the latest version with: `pkg install <package-name>`.

I'd like to prevent uploading my source/package to the public repo. Is this in any way possible?

Thanks a[]lot in advance,

Navles

--EDIT--

I use a[]lot of c++ code. Would it be better to distribute the compile_d_ c++ code or create a FreeBSD package and distribute the package?


----------



## SirDice (Aug 26, 2014)

Yes, that's possible. You can define multiple repositories, you can even "bind" a certain package to a single, specific, repository.


----------



## asteriskRoss (Aug 26, 2014)

I would recommend creating your own port, using the FreeBSD infrastructure; see the porter's guide.  You don't need to submit the port (or integrate your port with the standard ports tree) to take advantage of the package management infrastructure.  A simple option would be to run `make package` and then just distribute the resulting binary package file, which can be installed locally (no need for your own package repository) with `pkg add yourpackage.txz`, though this wouldn't achieve the automatic updating you want.

To create your own package repository (or repositories), you may find the excellent ports-mgmt/poudriere useful (have a look at the Poudriere page in the handbook and the Poudriere webpage), which can also build and test ports on multiple FreeBSD versions from a single build machine.  Poudriere can be used in conjunction with ports-mgmt/portshaker for integrating your own, private, ports with the main ports tree so you can host a single customised package repository rather than two (or more) separate repositories.


----------



## navles (Aug 27, 2014)

First off I would like to thank you for your quick responses. I will have a look into your suggestions, once again thanks! 

I just started with FreeBSD (worked with Linux for ~8 years), I really love the community so far 

The only thing I kind of miss, are high quality tutorials. Because of this I just registered a domain and am currently installing my webserver. I would love to contribute to the community and it feels like there is a lack of tutorials.

Once again thanks a lot!

I will try to contribute as much as I can.

Navles


----------

