Skip to content

Latest commit

 

History

History
153 lines (119 loc) · 3.47 KB

File metadata and controls

153 lines (119 loc) · 3.47 KB

Getting Started with ChronoServe

Prerequisites

  • Go 1.23.1 or higher (only for building from source)
  • Windows or Linux operating system
  • Administrative privileges
  • Git (for cloning the repository)

Installation

Option 1: Prebuilt Binaries (Recommended)

Download the latest prebuilt binary for your platform from the Releases page:

Windows

# PowerShell (as Administrator)
# Download the latest Windows binary
Invoke-WebRequest -Uri "https://github.com/therealtoxicdev/chronoserve/releases/latest/download/chronoserve_windows_amd64.exe" -OutFile "chronoserve.exe"

Linux

# Download the latest Linux binary
wget https://github.com/therealtoxicdev/chronoserve/releases/latest/download/chronoserve_linux_amd64
chmod +x chronoserve_linux_amd64

Option 2: Build from Source

  1. Clone the repository:
git clone https://github.com/therealtoxicdev/chronoserve.git
cd chronoserve
  1. Build the project:
make build

Configuration

On first run, ChronoServe will automatically create a config.yaml in the project root with default values. You must update the security-sensitive values before running the application.

Default Configuration Structure

server:
  host: "localhost"
  port: 8080
  readTimeout: "15s"
  writeTimeout: "15s"
  maxHeaderBytes: 1048576  # 1MB

auth:
  secretKey: "change-me"      # Must be changed
  tokenDuration: 24h
  issuedBy: "ChronoServe"
  allowedRoles: ["admin", "viewer"]
  users:
    admin:
      username: "admin"
      password: "change-me"   # Must be changed
      roles: ["admin"]
    viewer:
      username: "viewer"
      password: "change-me"   # Must be changed
      roles: ["viewer"]

logging:
  level: "info"
  directory: "logs"
  maxSize: 10        # 10MB
  maxBackups: 5
  maxAge: 30         # 30 days
  compress: true

Platform-Specific Settings

Windows

windows:
  serviceCommand: "sc"
  logDirectory: "C:\\ProgramData\\ChronoServe\\logs"
  services: {}  # Will be populated with discovered services

Linux

linux:
  serviceCommand: "systemctl"
  logDirectory: "/var/log/chronoserve"
  services: {}  # Will be populated with discovered services

Running ChronoServe

  1. Development mode:
make dev
  1. Production mode:
make start

Verifying Installation

  1. Check the server health:
curl http://localhost:8080/health
  1. Try logging in:
curl -X POST http://localhost:8080/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "your-password"}'

Security Notes

  • The application will refuse to start if default credentials are detected
  • All passwords should be changed from their default values
  • The JWT secret key must be changed from the default value
  • Use secure passwords that meet your organization's requirements

Next Steps

Troubleshooting

Common Issues

  1. "Security Risk Detected":

    • This means you haven't changed the default security values
    • Update the secretKey and user passwords in config.yaml
  2. Permission Issues:

    • Windows: Run as Administrator
    • Linux: Use sudo or appropriate privileges
  3. Port Already in Use:

    • Change the port in config.yaml
    • Default is 8080