-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Get MuxCore running in under a minute. This guide covers installation, configuration, Docker setup, and adding your first module.
go install github.com/Muxcore-Media/core/cmd/muxcored@latest
muxcoredThis starts the loom with no modules — just the platform. You'll have a health endpoint at http://localhost:8080/health and a gRPC mesh at :9090. Nothing else happens until you add modules.
git clone https://github.com/Muxcore-Media/core.git
cd core
docker compose upCore compiles with zero modules by default. Build tags add module sets:
# Bare loom — zero modules, just the platform
go build ./cmd/muxcored
# Default preset — core modules
go build -tags default ./cmd/muxcoredThe default preset imports modules from internal/presets/default.go. To create your own, add a preset file that imports the modules you want.
Configuration lives in muxcore.json in the working directory. Set MUXCORE_CONFIG to use a custom path. Environment variables override file values.
{
"server": {
"addr": ":8080"
},
"grpc": {
"addr": ":9090"
},
"log": {
"level": "info",
"format": "text"
}
}| Field | Type | Default | Description |
|---|---|---|---|
addr |
string | ":8080" |
HTTP listen address |
read_timeout |
int | 15 |
Read timeout in seconds |
write_timeout |
int | 15 |
Write timeout in seconds |
cert_file |
string | — | Path to TLS certificate PEM |
key_file |
string | — | Path to TLS private key PEM |
| Field | Type | Default | Description |
|---|---|---|---|
addr |
string | ":9090" |
gRPC listen address |
cert_file |
string | — | Path to TLS certificate file |
key_file |
string | — | Path to TLS private key file |
mtls_enabled |
bool | false |
Require mutual TLS |
ca_cert_file |
string | — | CA certificate for mTLS client verification |
seed_nodes |
[]string | — | Existing cluster nodes to join on startup |
join_token |
string | — | Pre-shared token required to join the cluster |
| Field | Type | Default | Description |
|---|---|---|---|
level |
string | "info" |
debug, info, warn, error
|
format |
string | "text" |
text or json
|
| Field | Type | Default | Description |
|---|---|---|---|
driver |
string | — | Database module driver name |
url |
string | — | Database connection string |
| Field | Type | Default | Description |
|---|---|---|---|
driver |
string | — | Cache module driver name |
url |
string | — | Cache connection string |
Arbitrary key-value configuration passed to individual modules:
{
"modules": {
"downloader-qbittorrent": {
"url": "http://localhost:8080",
"username": "admin"
}
}
}All config fields can be overridden with environment variables. These take highest precedence.
| Variable | Overrides | Example |
|---|---|---|
MUXCORE_CONFIG |
Config file path | /etc/muxcore/config.json |
MUXCORE_ADDR |
Server listen address | :3000 |
MUXCORE_TLS_CERT |
HTTP TLS certificate path | /etc/ssl/cert.pem |
MUXCORE_TLS_KEY |
HTTP TLS private key path | /etc/ssl/key.pem |
MUXCORE_LOG_LEVEL |
Log level | debug |
MUXCORE_LOG_FORMAT |
Log format | json |
MUXCORE_DATABASE_DRIVER |
Database module driver | postgres |
MUXCORE_DATABASE_URL |
Database connection string | postgres://... |
MUXCORE_CACHE_DRIVER |
Cache module driver | redis |
MUXCORE_CACHE_URL |
Cache connection string | redis://... |
MUXCORE_GRPC_TLS_CERT |
gRPC TLS certificate | /etc/ssl/grpc-cert.pem |
MUXCORE_GRPC_TLS_KEY |
gRPC TLS private key | /etc/ssl/grpc-key.pem |
MUXCORE_GRPC_MTLS_ENABLED |
Enable mutual TLS | true |
MUXCORE_GRPC_MTLS_CA |
mTLS CA certificate | /etc/ssl/ca.pem |
MUXCORE_GRPC_SEED_NODES |
Cluster seed nodes | node1:9090,node2:9090 |
MUXCORE_CLUSTER_JOIN_TOKEN |
Cluster join token | my-secret-token |
Modules are independent Go packages. To add one:
Create a preset file that imports your modules:
// internal/presets/mysetup.go
//go:build mysetup
package presets
import (
_ "github.com/Muxcore-Media/downloader-qbittorrent"
_ "github.com/Muxcore-Media/media-manager-movies"
)Build with your tag:
go build -tags mysetup ./cmd/muxcoredCreate your own main.go that imports modules:
package main
import (
_ "github.com/Muxcore-Media/downloader-qbittorrent"
_ "github.com/Muxcore-Media/media-manager-movies"
)
func main() {
// Bootstrap code — modules auto-register via init()
}Modules call contracts.Register() in their init() function. Core discovers them at build time.
# Check the health endpoint
curl http://localhost:8080/health
# Response includes module health statuses:
# {"status":"ok","modules":{"admin-ui":"healthy","api-rest":"healthy"}}- Core Concepts — understand the architecture
- Module System — learn about all module types
- Deployment — single node to multi-machine cluster