crabd
is the central daemon responsible for hosting and managing CrabDB instances across the network. It runs as a background service, responding to commands issued by tools like crabctl
, and provides endpoints for database synchronization, remote querying, health monitoring, and system orchestration. On startup, crabd
loads its configuration from a TOML file, which defines server settings, security policies, node relationships, and database paths. It supports running in the foreground for debugging or as a daemon for production environments. With built-in support for SSH-based authentication, token-based security, and IP allowlists, crabd
ensures secure communication between nodes. It listens for incoming connections, processes commands, and handles lifecycle operations such as initialization, configuration deployment, and log streaming. Its modular architecture enables clean integration with metrics collection, automation scripts, and distributed control, making it the backbone of the CrabDB infrastructure.
Command / Flag | Description |
---|---|
--help |
Show usage instructions |
--version |
Print the daemon’s version |
--config <file> |
Load config from a specific .toml file (default: /etc/crabd/config.toml ) |
--foreground |
Run in the foreground (no daemonization) |
--port <port> |
Override listening port (default: 4747 ) |
--host <ip> |
Bind to a specific IP (default: 0.0.0.0 ) |
--log <file> |
Log to a specified file (overrides config) |
--init-db |
Initialize default .crabdb files from templates |
--dry-run |
Validate configuration and exit without starting |
Ensure you have the following installed before starting:
- Meson Build System: This project relies on Meson. For installation instructions, visit the official Meson website.
- Install Meson:
- Follow the guide on the Meson website for your operating system.
-
Clone the Repository:
git clone https://github.com/fossillogic/crabd.git cd crabd
-
Configure the Build:
meson setup builddir
-
Compile the Project:
meson compile -C builddir
-
Install the Project:
sudo meson install -C builddir
-
Run the crabd Daemon:
crabd --config /etc/crabd/config.toml --foreground
Interested in contributing? Please open pull requests or create issues on the GitHub repository.
For issues, questions, or feedback, open an issue on the GitHub repository.
This project is licensed under the Mozilla Public License.