TermsFeed does not recommend self-hosting TermsFeed Free Cookie Consent, because a copy on your server does not get the updates and bug fixes TermsFeed ships. Keep the script tag the TermsFeed generator writes, which loads Cookie Consent from www.termsfeed.com. Replace a text of the consent banner without a copy with Change the Cookie Banner Text With Free Cookie Consent.

TermsFeed maintains the 4.2.0 build at the hosted address, and a self-hosted copy stays as it was on the day you downloaded it. TermsFeed ships each fix to 4.2.0 in place, under the same version number. Some fixes change behavior that matters for consent, such as the order of the user_consent_saved callback.

What changes Script hosted by TermsFeed Copy on your server
Bug fixes and updates to 4.2.0 Reach your pages on the next page load Do not reach your pages until you download the file again
Your work after each fix None Download the file again and replace your copy
Requests to www.termsfeed.com The loader, the script, and a ping with the page hostname None

Self-hosting takes 4 steps and about 15 minutes. You need the Cookie Consent block from the TermsFeed generator and a way to upload files to your web server.

  1. Download https://www.termsfeed.com/public/cookie-consent/4.2.0/cookie-consent-code.js and save it under the name cookie-consent.js.
  2. Upload the file to a folder your site serves, such as /js/cookie-consent.js. Serve it as text/javascript with UTF-8, because the file holds the translations as UTF-8 text.
  3. Replace the TermsFeed address in the first <script> tag of the block with the address of your file. Keep charset="UTF-8", and do not add async, so the file runs before run().
  4. Publish the change and clear your page cache. Close every private window, open a new one, filter the Network tab for termsfeed, load your site, and confirm that no request appears.

A Content Security Policy then needs your own host in script-src instead of https://www.termsfeed.com. Update the policy with Content Security Policy (CSP).