Files
payload/docs/Production/licensing.mdx
2021-01-05 14:26:08 -05:00

46 lines
4.1 KiB
Plaintext

---
title: The Payload License
label: Licensing
order: 30
---
## Try it for free
Payload is free to try and use for as long as you like. There is no obligation to purchase a subscription until you wish to get support or it is time to run your Payload application in 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. At the end you will have access to your license key.
1. Add your license to a `.env` variable to call payload.init in production.
```js
const payload = require('@payloadcms/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 address.
## How it works
Each time a web browser visits the admin portal of a running Payload instance, a request is made to our licensing server that looks at the domain being referred from and is able to verify the subscription requirements are active. The API of your Payload application will always be available regardless of subscription status so 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.
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 portal 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)