-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
go install github.com/Muxcore-Media/core/cmd/muxcored@latest
muxcoredThis 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.
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/muxcoredThe 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.
docker compose upConfiguration lives in muxcore.json (or set MUXCORE_CONFIG to a custom path). Environment variables override file values.
{
"server": {
"addr": ":8080"
},
"grpc": {
"addr": ":9090"
},
"log": {
"level": "info",
"format": "text"
}
}| 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 |
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).
Modules are independent Go repos. To add one:
- Create a
main.gothat 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()
}- 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.
- Writing Modules — build your first module
- Module System — lifecycle, discovery, communication
- Contracts — what core provides vs what contract repos define
- Philosophy — why the architecture works this way