Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ environment variables can contain secrets.

Stored Quasar, server, and world backups are written to `Quasar:BackupDirectory`.
Change it from **Backup → Stored backups**, or edit `appsettings.json` directly.
Quasar config backups contain Quasar-managed configuration/catalog files only;
server backups contain one server definition plus non-cache Dedicated Server and
Magnetar app data; world backups contain world save files. Restored server
definitions are written with `Off` goal state so they do not auto-start before
matching world files are restored.
Leave it empty to use the default `Backups` folder under the Quasar data
directory. Set it to an absolute path to place backups on another disk or a
mounted network share:
Expand Down
2 changes: 1 addition & 1 deletion Docs/QuasarArchitecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ As of this document:
- neutral light/dark theming exists with local-storage persistence
- config editing is now migrated out of Python into Quasar-managed JSON profiles and rendered runtime artifacts. Profiles cover Quasar root settings, server password (rendered to DS-compatible hash/salt), and DS-visible SE session settings including block type world limits; on server start Quasar writes session settings and mods into the world's authoritative `Sandbox_config.sbc` as well as the runtime DS config.
- file watching/reload now exists for manual edits to Quasar-managed server/profile JSON
- backup/restore now exists as versioned ZIP archives for Quasar configuration, server runtime state, and world-only data. Configuration backups cover servers, config profiles, world-template definitions, branding, and singleton settings files, with manual download/upload and semantic-version compatibility checks. The Backup page lists every configured server with per-row Back up server / Restore server / Back up world / Restore world actions; restore buttons use the latest matching stored archive for that server and backup kind. Automatic backup rules are configured separately for Quasar config, server backups, and world backups, each with its own schedule and retention. Server backups include server definition plus non-cache Dedicated Server and Magnetar app data; world backups restore world files while keeping existing config, using the latest Space Engineers `Backup` snapshot when present so backups can be taken while servers run.
- backup/restore now exists as versioned ZIP archives for Quasar configuration, server runtime state, and world-only data. Configuration backups cover servers, config profiles, world-template definitions, branding, and singleton settings files, with manual download/upload and semantic-version compatibility checks. The Backup page lists every configured server with per-row Back up server / Restore server / Back up world / Restore world actions; restore buttons use the latest matching stored archive for that server and backup kind. Automatic backup rules are configured separately for Quasar config, server backups, and world backups, each with its own schedule and retention. Quasar config backups include Quasar-managed catalog/config files only; server backups include the server definition plus non-cache Dedicated Server and Magnetar app data but not world saves; world backups include world save files and keep existing server/world config, using the latest Space Engineers `Backup` snapshot when present so backups can be taken while servers run. Restored server definitions from config or server backups are forced to `Off` goal state so restore cannot trigger a failed start loop before matching world files are restored.
- per-server CPU affinity pinning now exists (cpuset strings applied via `taskset` on Linux and `Process.ProcessorAffinity` on Windows), enforced by the supervisor on process start and reconcile alongside process priority; Linux priority elevation can use the optional setuid `/usr/local/bin/quasar-renice` helper instead of granting `CAP_SYS_NICE` to the whole Quasar service
- per-server managed .NET runtime selection now exists on Windows, where Quasar installs both Magnetar builds side-by-side (`MagnetarInterim.exe` on .NET 10, the default, and `MagnetarLegacy.exe` on .NET Framework 4.8) and the runtime resolver launches the build chosen by `DedicatedServerDefinition.ManagedRuntime`; non-Windows hosts always run the .NET 10 build
- runtime config preparation now derives a unique `SteamPort` (`ServerPort + 1000`) and `RemoteApiPort` (`ServerPort + 2000`) per server so multiple servers co-hosted on one machine never collide on the SE defaults (8766 / 8080)
Expand Down
6 changes: 3 additions & 3 deletions Docs/Reference/Index.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Docs/Reference/Modules/Quasar.Agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The plugin loaded inside each Space Engineers Dedicated Server (`netstandard2.0`
| [Quasar.Agent/AgentProfilerPatches.cs](../files/Quasar.Agent/AgentProfilerPatches.cs.md) | class | Mode-aware Harmony patch registrar for Quasar's profiler telemetry. `SafeContinuous` patches only named high-level Space Engineers server methods for low-overhead continuous timing. `DeepContinuous` keeps those patches and adds detailed network-event method hooks plus IL call-site transpilers for session components, replication simulation, entity update dispatch, parallel waits/callbacks, and physics stepping internals. `Off` skips profiler patches. |
| [Quasar.Agent/AgentProfilerTranspiler.cs](../files/Quasar.Agent/AgentProfilerTranspiler.cs.md) | class | Generic Harmony `CodeInstruction` transpiler used by deep profiler mode. It wraps selected `call` / `callvirt` instructions with `AgentProfiler.BeginCallSite` and `AgentProfiler.EndCallSite`, giving Quasar-native call-site attribution without external patch-manager MSIL helpers. |
| [Quasar.Agent/EntityInspector.cs](../files/Quasar.Agent/EntityInspector.cs.md) | class | `EntityInspector` is an internal static helper that queries and manipulates live `MyEntity` instances on the game thread, mapping them to transport-friendly `EntitySummary` DTOs for the Quasar admin UI. It supports paginated, filtered entity listing and direct entity deletion. |
| [Quasar.Agent/GameBridge.cs](../files/Quasar.Agent/GameBridge.cs.md) | class | `GameBridge` is the central game-thread façade for `AgentConnection`. It collects session telemetry (metrics, current profiler mode/snapshot, human players, hidden NPC/bot player ids, kicked players, chat, deaths, plugins), builds `AgentHello` / `AgentSnapshot` wire messages, and executes server commands (chat, blocking save, save-and-stop, profiler mode change, kick, ban, promote, clear-kick-cooldown, entity list/delete) by marshalling work onto the game thread via `MySandboxGame.Invoke`. Save/stop commands route through Magnetar PluginSdk `ServerControl` so Quasar observes completed disk saves before treating the command as successful. Metrics include process CPU derived from `Process.TotalProcessorTime`, simspeed/sim CPU from `Sync`, memory, human player count, PCU, active entities/grids, total blocks, and floating objects. It enumerates loaded plugins from `MyPlugins.Plugins` (including Pulsar child plugins) for runtime inventory, dedupes configured fallback plugin paths against loaded plugins by path stem, parent dev-folder name, manifest `<Id>`, and manifest `<FriendlyName>`, and exposes plugin configuration through `IQuasarConfigProvider` or Magnetar PluginSdk `PluginConfig` reflection. Chat history normalizes dedicated-server/Good.bot messages to author `Server` and marks `ChatMessageSnapshot.IsServerMessage`. |
| [Quasar.Agent/GameBridge.cs](../files/Quasar.Agent/GameBridge.cs.md) | class | `GameBridge` is the central game-thread façade for `AgentConnection`. It collects session telemetry (metrics, current profiler mode/snapshot, human players, hidden NPC/bot player ids, kicked players, chat, deaths, plugins), builds `AgentHello` / `AgentSnapshot` wire messages, and executes server commands (chat, blocking save, save-and-stop, profiler mode change, kick, ban, promote, clear-kick-cooldown, entity list/delete) by marshalling work onto the game thread via `MySandboxGame.Invoke`. Save/stop commands route through Magnetar PluginSdk `ServerControl` so Quasar observes completed disk saves before treating the command as successful. Metrics include process CPU derived from `Process.TotalProcessorTime`, simspeed/sim CPU from `Sync`, memory, human player count, PCU, active entities/grids, total blocks, floating objects, latest world-save time, and unsaved game-time progress since the last checkpoint. It enumerates loaded plugins from `MyPlugins.Plugins` (including Pulsar child plugins) for runtime inventory, dedupes configured fallback plugin paths against loaded plugins by path stem, parent dev-folder name, manifest `<Id>`, and manifest `<FriendlyName>`, and exposes plugin configuration through `IQuasarConfigProvider` or Magnetar PluginSdk `PluginConfig` reflection. Chat history normalizes dedicated-server/Good.bot messages to author `Server` and marks `ChatMessageSnapshot.IsServerMessage`. |
| [Quasar.Agent/PluginLogOutbox.cs](../files/Quasar.Agent/PluginLogOutbox.cs.md) | class | Bounded, thread-safe buffer that captures plugin log lines emitted in-process by the PluginSdk Quasar log sink and hands them to `AgentConnection` in batches for streaming to Quasar (as `PluginLogBatch` / `WireMessageKind.PluginLogs`). The buffer survives Quasar outages: lines accumulate while disconnected and are flushed on reconnect, so the supervisor's "Recent plugin logs" panel is backfilled rather than losing everything captured while Quasar was down. |
| [Quasar.Agent/Quasar.Agent.csproj](../files/Quasar.Agent/Quasar.Agent.csproj.md) | project file | MSBuild project file for `Quasar.Agent`, a `netstandard2.0` class library (x64-only) that produces `Quasar.Agent.dll` — the Magnetar/Space Engineers plugin assembly. All game and PluginSdk references are `Private="False"` (provided by the host at runtime). Harmony is a package dependency because the agent applies profiler patches in-process. |
| [Quasar.Agent/StopCommand.cs](../files/Quasar.Agent/StopCommand.cs.md) | class | `StopCommand` is a Quasar-owned PluginSdk command module for the root `!stop` in-game admin command. It overrides Magnetar's earlier `stop` root by being registered later from `AdminPlugin`, acknowledges the caller, reports an admin stop to Quasar through a static hook wired by `AdminPlugin`, then calls `ServerControl.SaveAndQuit()` on a worker task so the world is saved and the dedicated server process exits. |
Expand Down
2 changes: 1 addition & 1 deletion Docs/Reference/Modules/Quasar.Components.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Blazor Server user interface, built with MudBlazor. Routable pages cover the
| --- | --- | --- |
| [Quasar/Components/App.razor](../files/Quasar/Components/App.razor.md) | Blazor component | The root HTML document component for the Blazor Server application. It renders the full `<html>` skeleton, wires MudBlazor, ApexCharts and app CSS, loads the Blazor WebAssembly/server JS runtime, and hosts `<Routes>` and `<ReconnectModal>` as the two top-level interactive components. |
| [Quasar/Components/Dashboard/ServerCard.razor](../files/Quasar/Components/Dashboard/ServerCard.razor.md) | Blazor component | Card component for a single managed server shown on the Dashboard card layout. Displays the server display name, status chip (OFF / STARTING / CONNECTING / OPEN / STOPPING / RESTARTING / CRASHED / FAULTED), host/world caption, last message or health summary, management icon buttons (console, clone, template, edit, delete), lifecycle action buttons, and `ServerDetailPanel` body content. The Start button can be disabled by the dashboard while managed runtime prerequisites are still preparing. |
| [Quasar/Components/Dashboard/ServerDetailPanel.razor](../files/Quasar/Components/Dashboard/ServerDetailPanel.razor.md) | Blazor component | Detail panel embedded inside `ServerCard`. When the agent snapshot is absent it shows a waiting/error message and basic process state chips. When a snapshot is present it renders live metrics chips, Refresh/Save buttons, a chat broadcast field, a players table with player identity/status columns and a rightmost unlabeled action menu column, a recent-chat list, and recent command results. The Plugins chip compares loaded runtime plugins against the assigned config profile's selected plugins, displays `loaded/total`, and turns warning-colored when the loaded count differs from the configured total; if no profile is available it falls back to the aggregate agent plugin metric. Server-authored chat (`IsServerMessage`, SteamId 0, `Good.bot`, or `Server`) is displayed as `Server`. In both the snapshot-present and snapshot-absent states, an outlined "Affinity <value>" chip (Memory icon) is shown in the metrics chip rows when `Server.CpuAffinity` is set, and mod-download failures captured from runtime output are shown as an explicit error alert. |
| [Quasar/Components/Dashboard/ServerDetailPanel.razor](../files/Quasar/Components/Dashboard/ServerDetailPanel.razor.md) | Blazor component | Detail panel embedded inside `ServerCard`. When the agent snapshot is absent it shows a waiting/error message and basic process state chips. When a snapshot is present it renders live metrics chips, Refresh/Save buttons, a chat broadcast field, a players table with player identity/status columns and a rightmost unlabeled action menu column, a recent-chat list, and recent command results. The Plugins chip compares loaded runtime plugins against the assigned config profile's selected plugins, displays `loaded/total`, and turns warning-colored when the loaded count differs from the configured total; if no profile is available it falls back to the aggregate agent plugin metric. The Save chip shows save-in-progress state, or the latest world-save local time plus unsaved in-game progress as `MM:SS`, with a tooltip containing the full local timestamp. Server-authored chat (`IsServerMessage`, SteamId 0, `Good.bot`, or `Server`) is displayed as `Server`. In both the snapshot-present and snapshot-absent states, an outlined "Affinity <value>" chip (Memory icon) is shown in the metrics chip rows when `Server.CpuAffinity` is set, and mod-download failures captured from runtime output are shown as an explicit error alert. |
| [Quasar/Components/Layout/BrandingHeadContent.razor](../files/Quasar/Components/Layout/BrandingHeadContent.razor.md) | Blazor component | A lightweight head-content component that reactively updates the page favicon whenever `BrandingService` fires its `Changed` event. Rendered inside `MainLayout` so the favicon tracks live branding changes without a full page reload. |
| [Quasar/Components/Layout/MainLayout.razor](../files/Quasar/Components/Layout/MainLayout.razor.md) | Blazor component | Top-level application shell layout. Provides the MudBlazor theme/provider setup, theme-configured hover-list CSS variables, a responsive app bar with branding, update notification bell, theme-mode switcher, auth (login/logout) controls, and a Quasar power dialog trigger. It hosts a collapsible side drawer with `NavMenu`, the main content area that renders `@Body`, and a full-screen overlay while Quasar is restarting or shutting down. |
| [Quasar/Components/Layout/MainLayout.razor.css](../files/Quasar/Components/Layout/MainLayout.razor.css.md) | CSS | Scoped CSS for `MainLayout.razor`. Styles the brand logo mark in the app bar and the Blazor framework error banner. |
Expand Down
2 changes: 1 addition & 1 deletion Docs/Reference/Modules/Quasar.Services.Core.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The heart of the supervisor and its supporting services. `DedicatedServerSupervi
| [Quasar/Services/Backup/AutomaticBackupService.cs](../files/Quasar/Services/Backup/AutomaticBackupService.cs.md) | class | Background scheduler and manual backup queue that writes Quasar config, server, and world backups into the configured backup directory. Scheduled runs follow separate `QuasarBackupSettings` rules and prune to each rule's retention count; manual UI starts are queued so Blazor page navigation is not blocked by ZIP creation. |
| [Quasar/Services/Backup/BackupCompatibility.cs](../files/Quasar/Services/Backup/BackupCompatibility.cs.md) | class (static) + record struct | Applies semantic-versioning rules deciding whether a backup may restore into the running Quasar. Same `Major.Minor` is always allowed (patch may differ in either direction); an older `Major.Minor` is allowed only if a forward migration path exists; a newer `Major.Minor` is rejected (no cross-major.minor downgrade). |
| [Quasar/Services/Backup/BackupFormatMigrations.cs](../files/Quasar/Services/Backup/BackupFormatMigrations.cs.md) | class (static) | Registry of forward upgrade steps that migrate backup contents from one major.minor release to the next. The registry is currently empty, so only same-major.minor restores are accepted today. |
| [Quasar/Services/Backup/QuasarBackupService.cs](../files/Quasar/Services/Backup/QuasarBackupService.cs.md) | class | Builds and restores ZIP backups for three scopes: Quasar configuration, server runtime state, and world-only data. Configuration backups still capture Quasar's own singleton/config/catalog files, including known-player rows, known-player retention settings, and data-handling consent; server backups include the server definition plus non-cache Dedicated Server and Magnetar app data; world backups restore world files while excluding `Sandbox_config.sbc*`. Stored backup writes use the configured `WebServiceOptions.BackupDirectory` and publish atomically by writing `final.zip.tmp` in that same directory first, then renaming it to `final.zip` only after the archive is complete. |
| [Quasar/Services/Backup/QuasarBackupService.cs](../files/Quasar/Services/Backup/QuasarBackupService.cs.md) | class | Builds and restores ZIP backups for three scopes: Quasar configuration, server runtime state, and world-only data. Configuration backups still capture Quasar's own singleton/config/catalog files, including known-player rows, known-player retention settings, and data-handling consent; server backups include the server definition plus non-cache Dedicated Server and Magnetar app data; world backups restore world files while excluding `Sandbox_config.sbc*`. Restored server definitions are rewritten with `GoalState = Off` and `AutoStart = false`, including definitions restored through a Quasar configuration backup. Stored backup writes use the configured `WebServiceOptions.BackupDirectory` and publish atomically by writing `final.zip.tmp` in that same directory first, then renaming it to `final.zip` only after the archive is complete. |
| [Quasar/Services/Backup/QuasarBackupSettingsService.cs](../files/Quasar/Services/Backup/QuasarBackupSettingsService.cs.md) | class | Singleton store for automatic-backup rules and the stored-backup folder setting. Persists schedule rules to `backup-settings.json` (`MagnetarPaths.GetQuasarBackupSettingsPath()`) in the Quasar data directory and picks up external schedule edits via a debounced (250 ms) `FileSystemWatcher`, mirroring `BrandingService`. It also patches `Quasar:BackupDirectory` in the data-directory `appsettings.json` for the Backup page and applies the resolved path to the live `WebServiceOptions`. |
| [Quasar/Services/Backup/ServerRestoreCoordinator.cs](../files/Quasar/Services/Backup/ServerRestoreCoordinator.cs.md) | class | `ServerRestoreCoordinator` tracks which managed server unique names currently have a backup restore in progress. Restores rewrite server files in place, so callers can use this coordinator to prevent a server start or a second restore from racing against the same server data. |
| [Quasar/Services/BrandingPresets.cs](../files/Quasar/Services/BrandingPresets.cs.md) | class | `BrandingPresets` is a static catalogue of the four built-in UI theme presets (Quasar Default, Midnight Blue, Slate, High Contrast). It exposes `GetLightPalette` / `GetDarkPalette` factory methods that layer identity/surface colour overrides on top of the base `ThemePalette.QuasarLight()` / `QuasarDark()` palettes, keeping all variants internally coherent. `BrandingPresetDefinition` is the companion display record. |
Expand Down
Loading
Loading