MatsushibaDB

Installation Guide

Part of Matsushiba Systems

Installation Guide

Choose your preferred installation method. MatsushibaDB is available through multiple package managers and distribution channels.

📦

NPM Package

Recommended

Install via npm for Node.js applications with full server and client capabilities.

Installation

npm install matsushibadb

Global Installation

npm install -g matsushibadb

Features

Full Server Client Library CLI Tools Built-in SQL Security Features

Quick Start

// Start server
npx matsushiba-db start

// Use in your app
const { MatsushibaDBClient } = require('matsushibadb');
const client = new MatsushibaDBClient({
  host: 'localhost',
  port: 8000
});
🐍

PyPI Package

Python

Install via pip for Python applications with async support and Flask integration.

Installation

pip install matsushibadb

Global Installation

pip install --global matsushibadb

Features

Async Support Flask Integration CLI Tools Connection Pooling Security Features

Quick Start

# Start server
matsushiba-server

# Use in your app
from matsushiba_db import MatsushibaDBClient

client = MatsushibaDBClient(
    host='localhost',
    port=8000
)
🐳

Docker Image

Container

Run MatsushibaDB in a container with multi-architecture support for all Linux platforms.

Pull Image

docker pull matsushiba/matsushibadb

Run Container

docker run -d --name matsushibadb -p 8000:8000 matsushiba/matsushibadb

Features

Multi-Arch Production Ready Health Checks Volume Support Security Hardened

Quick Start

# Run with all ports
docker run -d \
  --name matsushibadb \
  -p 8000:8000 -p 8001:8001 -p 8002:8002 \
  matsushiba/matsushibadb

# Check health
curl http://localhost:8000/health

System Requirements

NPM Package

  • Node.js 16.0.0 or higher
  • npm 8.0.0 or higher
  • 50MB disk space
  • 512MB RAM minimum

PyPI Package

  • Python 3.8 or higher
  • pip 20.0 or higher
  • 50MB disk space
  • 512MB RAM minimum

Docker Image

  • Docker 20.10 or higher
  • Linux (amd64, arm64, arm/v7, 386)
  • 100MB disk space
  • 1GB RAM recommended

Configuration

# Server Configuration
MATSUSHIBA_MODE=production          # production, development, test
DATABASE_PATH=/app/data/matsushiba.db
LOG_LEVEL=info                      # debug, info, warn, error
LOG_FILE=/app/logs/matsushiba.log

# Port Configuration
HTTP_PORT=8000                      # HTTP API port
WS_PORT=8001                        # WebSocket port
TCP_PORT=8002                       # TCP port
ADMIN_PORT=8003                     # Admin interface port
METRICS_PORT=8004                   # Metrics port
HEALTH_PORT=8005                    # Health check port

# Security Configuration
JWT_SECRET=your-secret-key
ENABLE_RBAC=true
ENABLE_AUDIT=true
RATE_LIMIT=1000                     # requests per minute

# Performance Configuration
MAX_CONNECTIONS=100
CACHE_SIZE=1000
WAL_MODE=true
SYNCHRONOUS=NORMAL
# matsushiba.conf
[server]
mode = production
database_path = /app/data/matsushiba.db
log_level = info
log_file = /app/logs/matsushiba.log

[ports]
http = 8000
websocket = 8001
tcp = 8002
admin = 8003
metrics = 8004
health = 8005

[security]
jwt_secret = your-secret-key
enable_rbac = true
enable_audit = true
rate_limit = 1000

[performance]
max_connections = 100
cache_size = 1000
wal_mode = true
synchronous = NORMAL
# Command Line Options
matsushiba-db start [options]

Options:
  --port, -p          HTTP port (default: 8000)
  --ws-port           WebSocket port (default: 8001)
  --tcp-port          TCP port (default: 8002)
  --admin-port        Admin port (default: 8003)
  --metrics-port      Metrics port (default: 8004)
  --health-port       Health port (default: 8005)
  --database, -d      Database file path
  --log-level         Log level (debug, info, warn, error)
  --log-file          Log file path
  --config, -c        Configuration file path
  --daemon, -D        Run as daemon
  --pid-file          PID file path
  --user              Run as user
  --group             Run as group

Troubleshooting

Port Already in Use

If you get "port already in use" error:

# Find process using port lsof -i :8000 # Kill process kill -9 PID

Permission Denied

If you get permission errors:

# Check file permissions ls -la /app/data/ # Fix permissions chmod 755 /app/data/

Database Locked

If database is locked:

# Check for running processes ps aux | grep matsushiba # Stop all processes pkill matsushiba