Skip to content

Getting Started

TheMinecraftGuyGuru edited this page Jun 8, 2026 · 4 revisions

Getting Started

Bare Core (Zero Modules)

go install github.com/Muxcore-Media/core/cmd/muxcored@latest
muxcored

This starts core with no modules — just the fabric. You'll have a /health endpoint at :8080 and a gRPC mesh at :9090. Nothing else. Modules are what make it useful.

Build Presets

Core compiles with zero modules by default. Build tags add module sets:

# Bare core — zero modules, just the fabric
go build ./cmd/muxcored

# Default preset — core modules (requires rebuilt module repos against v1 contracts)
go build -tags default ./cmd/muxcored

The default preset imports modules from a build-tag-gated file at internal/presets/default.go. Create your own preset by importing the modules you want.

With Docker

docker compose up

Configuration

Configuration lives in muxcore.json (or set MUXCORE_CONFIG to a custom path). Environment variables override file values.

Minimal config

{
  "server": {
    "addr": ":8080"
  },
  "grpc": {
    "addr": ":9090"
  },
  "log": {
    "level": "info",
    "format": "text"
  }
}

Environment variable overrides

Variable Overrides
MUXCORE_ADDR Server listen address
MUXCORE_LOG_LEVEL debug, info, warn, error
MUXCORE_LOG_FORMAT text, json
MUXCORE_DATABASE_DRIVER Database module driver
MUXCORE_DATABASE_URL Database connection string
MUXCORE_CACHE_DRIVER Cache module driver
MUXCORE_CACHE_URL Cache connection string
MUXCORE_GRPC_TLS_CERT TLS certificate path
MUXCORE_GRPC_TLS_KEY TLS key path
MUXCORE_GRPC_MTLS_ENABLED true or 1 to enable mTLS
MUXCORE_GRPC_SEED_NODES Comma-separated host:port of seed nodes

gRPC TLS

For inter-node encryption, set both MUXCORE_GRPC_TLS_CERT and MUXCORE_GRPC_TLS_KEY. For mutual TLS, also set MUXCORE_GRPC_MTLS_ENABLED=true. Without these, gRPC runs in plaintext mode (suitable for single-node or trusted networks).

Adding Modules

Modules are independent Go repos. To add one:

  1. Create a main.go that blank-imports the module:
package main

import (
    _ "github.com/Muxcore-Media/downloader-qbittorrent"
    _ "github.com/Muxcore-Media/media-manager-movies"
)

func main() {
    // MuxCore bootstrap — modules auto-register via init()
}
  1. Or use build tags in the preset file (internal/presets/default.go).

Modules call contracts.Register() in their init() function. Core discovers them at build time with zero runtime registration needed.

Next Steps

Clone this wiki locally