Bare Metal
This guide provides complete instructions for deploying Hook0 on bare metal servers.
This configuration is intended for development and testing purposes only, not for production use.
This setup does not address production concerns such as:
- Scalability - handling increased load and traffic
- Resilience - fault tolerance and recovery
- High availability - minimizing downtime
- Observability - monitoring, logging, and alerting
- 24/7 operations - on-call support and incident management
For production workloads, use Hook0 Cloud which provides a fully managed, production-ready infrastructure.
Requirements
- A PostgreSQL 15+ database (it might work with an earlier version)
- Node.js LTS
- Rust stable toolchain
Installation Steps
Repository Setup
Clone the repository from GitLab and navigate to the project directory:
git clone https://gitlab.com/hook0/hook0.git
cd hook0
UI Building
The frontend requires the API_ENDPOINT environment variable set to the API's base URL:
cd frontend
export API_ENDPOINT=https://your-api-url.com
npm install
npm run build
API Compilation
Using Rust's cargo tool with SQLX_OFFLINE=true:
cd api
SQLX_OFFLINE=true cargo build --release
The build generates an executable that serves as a web server, binding to 127.0.0.1:8080 by default.
Configuration Notes
The API supports numerous configuration options via CLI parameters or environment variables, viewable through the help command:
./target/release/hook0-api --help
For HTTPS validation against the OS certificate store, use:
cargo build --release --no-default-features --features reqwest-rustls-tls-native-roots
Logging Setup
Configure logging before running the API:
export RUST_LOG=info,sqlx=warn,actix_governor=warn
./target/release/hook0-api
Output Worker
A separate worker component handles webhook delivery, compiled similarly to the API:
cd output-worker
SQLX_OFFLINE=true cargo build --release
./target/release/hook0-output-worker
Multiple workers can run concurrently to distribute processing load.
Deployment Notes
Hook0 UI can be served by the API server or deployed separately as a static application.