Skip to content

Stratum+nimbus - #1963

Open
HuguesDePayens wants to merge 59 commits into
CubeCoders:mainfrom
HuguesDePayens:Stratum+Nimbus
Open

Stratum+nimbus#1963
HuguesDePayens wants to merge 59 commits into
CubeCoders:mainfrom
HuguesDePayens:Stratum+Nimbus

Conversation

@HuguesDePayens

Copy link
Copy Markdown

New pull attempt:

Description

This PR adds AMP GenericModule templates for running a multi-server Vintage Story network using Stratum and Nimbus.

The templates provide three managed services:

  • Vintage Story (Stratum + Nimbus Backend) – Runs an individual Vintage Story backend with Stratum and the Nimbus ServerMod.
  • Nimbus Proxy – Provides the public TCP/UDP endpoint and routes players between backend servers.
  • Nimbus Registry (Optional) – Provides a standalone shared registry for backend discovery, whitelist, and ban information.

The Proxy can use its embedded registry for simpler installations, while the standalone Registry template supports deployments where registry state needs to be managed separately.

Features

  • Windows and Linux support.
  • Automatic installation of the required local .NET 10 runtime.
  • Automatic retrieval of current Stratum and Nimbus GitHub releases.
  • Support for pinned Stratum and Nimbus release tags.
  • Atomic configuration rendering for Nimbus TOML files.
  • Existing shared secrets are preserved during updates.
  • Separate TCP and UDP port definitions where required.
  • Configurable Nimbus backend registration and maintenance state.
  • Configurable proxy backend map, fallback order, registry mode, status listing, whitelist restrictions, and logging.
  • Optional standalone Nimbus Registry configuration.
  • Minimal user-facing configuration focused on settings an AMP administrator is expected to manage.
  • Uses Vintage Story’s official serverconfig.json for normal server configuration.

Network layout

Players connect only to the Nimbus Proxy’s public game port. Individual Vintage Story backend ports should normally remain private and accessible only to the Proxy.

A typical deployment consists of:

  1. One Nimbus Proxy instance.
  2. One optional Nimbus Registry instance.
  3. One or more Vintage Story Stratum backend instances.
  4. A unique backend ID and private port for each backend.
  5. A shared Nimbus secret used by the Proxy, Registry, and backend instances.

Update behavior

The templates:

  • Install application-local .NET runtimes without modifying the host’s system runtime.
  • Download the appropriate Windows or Linux release archive.
  • Preserve administrator-managed configuration files during application updates.
  • Regenerate derived Nimbus TOML configuration safely.
  • Install or update the Nimbus ServerMod on each backend.
  • Use Stratum’s preparation process to obtain compatible Vintage Story server assets.

Validation performed

  • All configuration, port, update, metaconfig, and startup JSON manifests parse successfully.
  • AMP configuration and metaconfig schema validation passes.
  • Backend, Proxy, and Registry semantic validation passes.
  • Proxy and Registry TOML escaping tests pass.
  • Invalid configuration and atomic-write failure tests pass.
  • Shared-secret generation and preservation tests pass.
  • The backend configuration contains no unresolved world-settings hooks or pre-start renderers.
  • Linux renderer definitions were statically validated; runtime-level Linux renderer execution was not available in the local Windows test environment.

Notes

  • Nimbus and Stratum are third-party projects and are downloaded from their respective GitHub release pages.
  • The standalone Nimbus Registry is optional when the Proxy is configured to use its embedded registry.

@HuguesDePayens
HuguesDePayens marked this pull request as ready for review August 18, 2026 00:57
@HuguesDePayens
HuguesDePayens marked this pull request as draft August 18, 2026 01:04
@HuguesDePayens
HuguesDePayens marked this pull request as ready for review August 18, 2026 01:09
Fix template conventions, .NET install, and Linux TOML renderer

- Fix no-op backslash escape in TomlQuote
- Replace dot.net/dotnet-install.sh bootstrap with the repo-standard
- Add DotnetRelease and DotnetVersion settings to all three templates
- Resolve the Nimbus archive via .assets[] instead of a hardcoded
  Nimbus-$tag.zip; skip when already at the target tag
- Preserve registry state files (nimbus.bans/whitelist/tokens.json)
  across updates
- Meta.AarchSupport: None -> NotSupported
- App.MaxUsers: {{$MaxUsers}} -> 100 proxy / 16 backend
- Console.FilterMatchRegex: use the upstream pattern so font tags are
  stripped instead of the whole line being deleted
- Meta.MinAMPVersion: 2.4.6.0 -> 2.6.0.4
- Meta.ExtraContainerPackages -> []
- Add Meta.ContainerPolicyReason;
- Set proxy Meta.EndpointURIFormat
- Align default ports and IDs: backend moves to 42421 so the proxy keeps
  42420, matching the default backend map, try list, NimbusServerId and
  seeded PublicPort
- Remove empty vintage-story-stratumstart.json and its App.PreStartStages
Merges Greelan's dev template
Switches to a hybrid of both template's handling of toml file
Remove Stratum template in favor of adding it to the base VS template
@HuguesDePayens

HuguesDePayens commented Aug 25, 2026

Copy link
Copy Markdown
Author

In the vintage story new kvp with addition of stratum I am not seeing where you can enable the nimbus backend, and configure those settings. I might be blind though... I see you deleting the files and just merging it into the main branch which I support. But I still think we need the nimbus settings. So someone knows it is there. And configurable.

@IceOfWraith

Copy link
Copy Markdown
Collaborator

Yeah I didn't get done with the changes yesterday. I plan to keep working on it tomorrow.

@IceOfWraith

Copy link
Copy Markdown
Collaborator

I've pushed the last changes. Please take a look at what's different and let me know if I missed anything. I tried to make it match the methods of other similar templates in the repo.

@HuguesDePayens

Copy link
Copy Markdown
Author

I am getting this error when selecting stratum in updates, instead of the native vintage story server build.

Unable to complete task
1

This task could not be completed: Running Update Tasks - - State: 3.
/bin/bash failed with exit code 1

In addition to that error, there are no nimbus configuration options. It would be nice if we had a way to easily configure the nimbus backend, a toggle switch to enable, connection details for the hub, where to point to the registry and the nimbus shared secret key, and a toggle to put it in maintenance mode, which is a supported feature. Also with nimbus, it needs to automatically download a specific mod called Nimbus Redirect Fix: https://mods.vintagestory.at/show/mod/52239

image

image

@IceOfWraith

Copy link
Copy Markdown
Collaborator

In the instance search for "Logging Level" in the top right and set it to Debug. Then update again and share thelatest log from the AMP_Logs folder here.

Had you added those settings in the Stratum template you uploaded? I think I overlooked them if so.

@IceOfWraith

Copy link
Copy Markdown
Collaborator

Just to clarify I only combined the Stratum and Vintage Story templates. Nimbus is still separate.

@HuguesDePayens

Copy link
Copy Markdown
Author

Attached is the log file with debugging mode on AMPLOG_2026-08-29 05-34-00.log

Yes those settings were in my original. I attached the original pull request below:

Note, i had to change the file type of the .kvp to .json for me to upload them here.

vintage-story-stratum.json
vintage-story-stratumconfig.json
vintage-story-stratummetaconfig.json
vintage-story-stratumports.json
vintage-story-stratumupdates.json

@HuguesDePayens

HuguesDePayens commented Aug 29, 2026

Copy link
Copy Markdown
Author

If you want to test your changes, you can add this to your configuration repository in AMP. I tried adding this one, but because I named it with the + sign, it wasn't working.

HuguesDePayens/AMPTemplates:Stratum-Nimbus-Test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants