Pretty simple, just set the PACKAGEROOT environment variable.  For example:


There are other variables you can set, but they require more specific paths.  What I like about PACKAGEROOT is it lets you specify your mirror and let pkg_add figure out the rest.
A list of FreeBSD mirrors can be found at
Update: On OpenBSD a similar variable is used: PKG_PATH.