There's a self-hosted option that's free.
It isn't free as in software, as both FSF and OSI requires software compatible with their goals to have no limitations on use.
Edit: it seems the on-premise version supports apps: There is no app included in any plan. All apps must be purchased separately from the App Store.