59 lines
4.3 KiB
Plaintext
59 lines
4.3 KiB
Plaintext
---
|
|
title: The Payload License
|
|
label: Licensing
|
|
order: 30
|
|
---
|
|
|
|
## Try it for free
|
|
|
|
Payload is free to use locally for development purposes for as long as you like. There is no obligation to purchase a subscription until you wish to get support or it's time to deploy to production. At that time, you can purchase a license and manage your subscriptions from your [Payload account](/account). For information on cost, see the [pricing](/pricing) page for details.
|
|
|
|
## Purchasing a license
|
|
|
|
1. Complete the [checkout](/checkout) process. You'll be provided with a license key after successfully checking out.
|
|
1. Add your license to a `.env` variable, and then add the `license` property to your `payload.init()` call.
|
|
|
|
`payload.config.js`:
|
|
```js
|
|
const payload = require('payload');
|
|
|
|
payload.init({
|
|
license: process.env.PAYLOAD_LICENSE_KEY,
|
|
// the rest of your init options
|
|
});
|
|
```
|
|
|
|
3. All set! You can open the Admin panel of your Payload application on a public domain and your copy of Payload will be fully licensed.
|
|
|
|
## How Payload license enforcement works
|
|
|
|
Each time a web browser visits the Admin panel of a running Payload instance, a request is made to our licensing server that evaluates the domain being referred from. We then verify that you have a valid, active license key and that the domain being used is licensed accordingly.
|
|
|
|
<Banner type="success">
|
|
<strong>Note:</strong><br/>
|
|
Your Payload APIs will always be available, regardless of subscription status. This means you can have peace of mind that your critical operations are not going to be hindered because of a lapse in billing issue or a network problem between systems. Only the Admin panel will be affected.
|
|
</Banner>
|
|
|
|
If your domain is not yet licensed, your subscription has expired from a production instance, you will have a chance to renew. In the meantime, the Admin panel will display an informative message before allowing you to access to notify you that your subscription is not valid.
|
|
|
|
<Banner type="warning">
|
|
<strong>Warning:</strong><br/>
|
|
The license is specific to the URL used to access the admin panel of your Payload application. With one license, you might have your admin panel accessed from https://admin.example.com, make data available from https://api.example.com to run your site at https://example.com. In this scenario you would only want to license admin.example.com regardless of the addresses used for the API and other sites or apps.
|
|
</Banner>
|
|
|
|
#### How does Payload know if the license is production or not?
|
|
|
|
The domain is sent along with the license key and that determines whether it is a public domain or not. Anything of a developer sounding name is allowed without a valid license. The following traits of the admin URL will allow Payload to work without a license:
|
|
|
|
1. An IP address
|
|
1. A private port. That is any port that is not 80 or 443. For example: 'dev.example.com:8000'
|
|
1. Any of these subdomains: 'test', 'testing', 'dev', 'stage', 'staging', 'sandbox', 'acc', 'acceptance', 'demo', 'local', 'loc'
|
|
|
|
### FAQ
|
|
1. **Why am I paying for open-source software?** Payload is not open source. You can view the code, but that doesn't mean it is free. A subscription license is required for production use you're not permitted to take parts of Payload for your own purposes. Those details aside, we are like an open-source software in that we encourage our community to participate as they see fit by exploring the code, reporting any issues to our [issue tracker](https://github.com/payloadcms/payload/issues) and you can even go as far as opening pull request if you wish.
|
|
1. **Do you have educational or non-profit pricing available?** It would make us very happy to support your organization through the use of Payload. Please [contact](/contact) us to get started. We will ask to see verification of your organization's status.
|
|
1. **Can I transfer a license?** You can change the domain name of a license in your Payload account by clicking on the license domain name, finding the "Change domain" link and following the instructions. If you need to transfer ownership to another user or organization, at this time we advise cancelling your license subscription and instructing the other party on purchasing a new subscription.
|
|
|
|
### Read The full license
|
|
You can read the entirety of the Payload license directly in the distribution files or at [github.com](https://github.com/payloadcms/payload/blob/master/license.md)
|