Foreground Mode
Run directly in your terminal for development (oored run)
The oored binary can run in two modes:
Foreground Mode
Run directly in your terminal for development (oored run)
Service Mode
Run as a system daemon that starts at boot
Service mode is recommended for production deployments.
# Build the servercargo build --release -p oore-server
# Install as system servicesudo ./target/release/oored install
# Edit configurationsudo nano /etc/oore/oore.env
# Start the servicesudo oored start
# Check statusoored status
# View logsoored logs -fRun the server in foreground mode.
oored run# or simplyooredInstall as a system service. Requires root.
sudo oored install [--env-file <PATH>] [--force]| Option | Description |
|---|---|
--env-file <PATH> | Custom environment file to copy |
--force, -f | Force reinstall |
What it does:
/var/lib/oore, /var/log/oore, /etc/oore/usr/local/bin/oored/etc/oore/oore.envRemove the system service.
sudo oored uninstall [--purge]| Option | Description |
|---|---|
--purge | Also remove data, logs, and configuration |
Control the service.
sudo oored startsudo oored stopsudo oored restartShow service status.
oored statusStatus: InstalledRunning: YesPID: 12345Binary: /usr/local/bin/ooredLogs: /var/log/oore/oored.logView service logs.
oored logs # Last 50 linesoored logs -n 100 # Last 100 linesoored logs -f # Follow in real-timeDatabase permission error:
Error: unable to open database fileEnsure /var/lib/oore exists and is writable.
Port already in use:
Error: Address already in useCheck what’s using port 8080:
sudo lsof -i :8080Missing configuration:
Error: DATABASE_URL must be setEdit /etc/oore/oore.env and add required variables.
sudoService definition: /Library/LaunchDaemons/build.oore.oored.plist
Key features:
RunAtLoad: Starts at bootKeepAlive: Restarts on crashThrottleInterval: 5 seconds between restartsCommands:
launchctl bootstrap system /path/to/plist # Loadlaunchctl bootout system/build.oore.oored # Unloadlaunchctl kickstart -kp system/build.oore.oored # StartLog rotation: newsyslog at /etc/newsyslog.d/oore.conf
Service definition: /etc/systemd/system/oored.service
Key features:
Type=simple: Standard daemonRestart=always: Restart on any exitCommands:
systemctl daemon-reloadsystemctl enable oored.servicesystemctl start oored.servicesystemctl status oored.serviceLog rotation: logrotate at /etc/logrotate.d/oore
/usr/local/bin/oored # Binary/etc/oore/oore.env # Configuration/var/lib/oore/oore.db # Database/var/log/oore/oored.log # Logs
# macOS/Library/LaunchDaemons/build.oore.oored.plist
# Linux/etc/systemd/system/oored.service