The announcement comes on the back of Nextcloud's announcement that it will provide end-to-end encryption upgrades in version 13 of the product.
Purism has its own Linux-based operating system known as Pure OS which it installs on computing devices that it sells.
The smartphone is named Librem 5 and is expected to be released in 2018. It is being built in partnership with KDE, a desktop project that is used on Linux desktops.
Jos Poortvliet, co-founder and head of Marketing at Nextcloud, said: “Partnering with Purism gets our software directly into the hands of customers, making their lives easier with security and privacy protection built in."
The company said it planned to include Nextcloud in the Librem 5 phone, as well as within PureOS for its Librem 13 and Librem 15 laptops.
Additionally, Purism will be discussing with Nextcloud about a future Purism NAS that runs completely free software including Nextcloud and services.
“Nextcloud follows our strict beliefs in digital rights for people, and this partnership is a clear win for users by merging convenience and ethics together into simple products,” Weaver added.