CheerpX.Linux.create
Create a CheerpX application instance
Parameters
- options (
object
, optional) - Used to configure different settings of the CheerpX Linux environment. This object may include settings for mounts, network interfaces, and other features, structured as{ option: "value" }
.
Returns
CheerpX.Linux.create
returns a Promise which is resolved once the CheerpX Linux environment is fully initialized and ready to use. The resolved value is a CheerpX.Linux
instance that provides methods for interacting with the CheerpX environment.
Options
A description of each CheerpX.Linux.create
option with brief examples are given below.
mounts
This option configures the filesystems that will be available in the CheerpX environment. Each mount point configures a device and specifies where it should be accessible within the virtual filesystem.
Example:
NoteCheerpX supports a variety of backends, designed to provide access to HTTP resources, IndexedDB-base persistent storage and data from JavaScript. Complete Ext2 filesystems are also supported on top of block devices. For detailed information, including usage examples and full APIs, please refer to the Files and filesystems guide.
networkInterface
This option configures network settings, which allows CheerpX to communicate over networks. For more detailed information about how CheerpX handles networking, including the use of Tailscale and overcoming browser limitations, see the Networking guide.
authKey
The authKey
is a string containing an authentication key for registering pre-authenticated users or devices. You can generate one here.
Example:
controlUrl
The controlUrl
is an optional string used to specify the URL of a self-hosted Headscale server.
Example:
loginUrlCb
The loginUrlCb
is a callback function that handles login URLs during the authentication process. It receives the URL that should be visited to continue the login process. This is necessary when authenticating with Tailscale.
Example:
stateUpdateCb
The stateUpdateCb
is a callback that runs when the connection state changes. The state
parameter represents the connection status.
Example:
netmapUpdateCb
The netmapUpdateCb
is a callback that runs whenever the network configuration updates. It provides details about the current network configuration.
Example: