Table of contents
Puter Kernel Documentation
Overview
The Puter Kernel is the core runtime component of the Puter system. It provides the foundational infrastructure for:
- Initializing the runtime environment
- Managing internal and external modules (extensions)
- Setting up and booting core services
- Configuring logging and debugging utilities
- Integrating with third-party modules and performing dependency installs at runtime
This kernel is responsible for orchestrating the startup sequence and ensuring that all necessary services, modules, and environmental configurations are properly loaded before the application enters its operational state.
Features
-
Modular Architecture:
The Kernel supports both internal and external modules:- Internal Modules: Provided to Kernel by an initializing script, such
as
tools/run-selfhosted.js, via theadd_module()method. - External Modules: Discovered in configured module directories and installed
dynamically. This includes resolving and executing
package.jsonentries and runningnpm installas needed.
- Internal Modules: Provided to Kernel by an initializing script, such
as
-
Service Container & Registry:
The Kernel initializes a service container that manages a wide range of services. Services can:- Register modules
- Initialize dependencies
- Emit lifecycle events (
boot.consolidation,boot.activation,boot.ready) to orchestrate a stable and consistent environment.
-
Runtime Environment Setup:
The Kernel sets up aRuntimeEnvironmentto determine configuration paths and environment parameters. It also provides global helpers likekvfor key-value storage andclfor simplified console logging. -
Logging and Debugging:
Uses a temporaryBootLoggerfor the initialization phase until LogService is initialized, at which point it will replace the boot logger. Debugging features (ll,xtra_log) are enabled in development environments for convenience.
Initialization & Boot Process
-
Constructor:
When a Kernel instance is created, it sets up basic parameters, initializes an empty module list, and preparesuseapi()integration. -
Booting:
Theboot()method:- Parses CLI arguments using
yargs. - Calls
_runtime_init()to set up theRuntimeEnvironmentand boot logger. - Initializes global debugging/logging utilities.
- Sets up the service container (usually called
servicesc instance of Container). - Invokes module installation and service bootstrapping processes.
- Parses CLI arguments using
-
Module Installation:
Internal modules are registered and installed first.
External modules are discovered, packaged, installed, and their code is executed.
External modules are given a special context with access touseapi(), a dynamic import mechanism for Puter modules and extensions. -
Service Bootstrapping:
After modules and extensions are installed, services are initialized and activated. For more information about how this works, see boot-sequence.md.
General
API
- Index (README.md)
- api drivers
- Group Endpoints
- Notification Endpoints
- Share Endpoints
- Type-Tagged Objects
Concepts
Types
For Contributors
- Comment Prefixes
- contributors vscode
- Local Email Testing
- Puter Extensions
- Repository Structure and Tooling
Extensions
Devmeta
Planning
- Micro Modules
- [planning alternatives_to_
](planning-alternatives_to_)
Self_hosters
- Configuring Domains for Self-Hosted Puter
- Configuring Puter
- First Run Issues
- self_hosters config_values
- self_hosters support
- Self-Hosting Puter
Src
Backend
A_and_A
For Contributors
- Backend Style
- Puter Backend - Directory Structure
- Puter Backend Boot Sequence
- Puter Kernel Moduels and Services
Features
- Batch and Symlinks
- Metered Services and Cost Management
- Protected Apps and Subdomains
- Service Scripts
Lists_of_things
Modules
Puterai
Notes
Services
Src
Modules
Puterai
- Index (README.md)
- Configuring AI Services
- PuterAI API Request Examples
- src backend src modules puterai config
####### For Contributors
Test_drivers
Gui
Phoenix
Tools
Api_tester
Uncategorized
This wiki is generated from the repository. Do not edit files the wiki.
You are reading documentation for Puter, an open-source high-level operating system.
Getting started with Puter on localhost is as simple as:
git clone https://github.com/HeyPuter/puter.git
npm install
npm run start