Self-Hosting¶
For our customers with strict security requirements, we offer the ability to self-host Live Updates. This means that you can host the bundles on your own server, and the only data that will be sent to our servers is the metadata required to check for updates. This has several advantages:
- Security: You don't have to share your web artifacts with us and can keep them on your own servers.
- Bandwidth: You are not affected by our bandwidth limits. You can serve as many updates as you want.
- Storage: You are not affected by our storage limits. You can store as many updates as you want.
Requirements¶
To self-host Live Updates, you need to meet the following requirements:
- Server: You need to have a high-availability server that can serve static files and handle low to medium levels of traffic (varies based on number of app users).
- HTTPS: Your server must support HTTPS. This is required to ensure secure communication between the client and your server.
In addition, we recommend the following:
- CDN: Use a Content Delivery Network (CDN) to serve the updates. This can help reduce latency and improve download speeds for users around the world.
Restrictions¶
There is one restriction right now:
- Delta Updates: Delta updates are not yet supported when self-hosting. This means the artifact type must be
zip
(default). Reach out to us if you need support for delta updates.
How it works¶
The process of self-hosting Live Updates is similar to the regular process, with the difference that the bundle is hosted on your server. Here's how it works:
- Request metadata: The client sends a request to Capawesome Cloud to check for updates.
-
Receive metadata: If an update is available, Capawesome Cloud responds with the metadata required to download the update. This can look like this:
-
Request file(s): The client requests the bundle from your server.
- Receive file(s): Your server responds with the bundle.
After that, the client can install the update as usual.
Create a new bundle¶
To create a new self-hosted bundle on Capawesome Cloud, you can use the Capawesome CLI. First, make sure you have the latest version of the CLI installed:
After that, log in to your account:
Then, create a new bundle with the apps:bundles:create
command:
Replace https://domain.tld/bundle.zip
with the URL of the bundle on your server. The bundle will be created and immediately available to all users.
Bonus: Code Signing¶
To help ensure secure end-to-end delivery, you can sign your updates with a private key. This way, the client can verify that the updates are coming from you and not a malicious actor. To sign your updates, you need to provide a private key and a local path to the artifact when creating the bundle:
npx capawesome apps:bundles:create --url https://domain.tld/bundle.zip --private-key ./key.pem --path ./bundle.zip
We recommend integrating code signing into your CI/CD pipeline to automate the process. This way you can create a signed bundle directly after uploading the artifact to your server. Check out our Code Signing guide for more information on how to sign your updates.
Note
Code signing for self-hosted bundles is only supported from v7.1.0 of the Live Update plugin.