- From an external host (default)
- From your proxy
One backend uploads the pack to an external host and every server hands players
that link instead. Nothing of yours faces the internet, so there is no port to open
and no address to get right.This is what a fresh install does. Hermes is Nexo’s own host and needs no account
and no keys, so it works as soon as you install NexoHub. To use a different host,
configure it the normal Nexo way under
Pack.server in the settings.yml you
already distribute.Choosing a host
Only one server uploads. The others see it has already been done and use the same link,
so players get one pack and one download however many servers you run.
Your own pack server
host takes any pack server type registered with Nexo’s PackServerRegistry, not only
the four above. If a plugin of yours registers MYCDN, this hands every upload to it:
Pack.server.type: HUB on the backends. The server that uploads creates your pack
server, calls its uploadPack() and hands out its packUrl(), so the plugin has to be
installed on every backend: any of them can be the one that uploads.
Your pack server may change the zip before it uploads it, to recompress audio or optimise
images for example. A player’s client checks the download against the SHA-1 it is sent and
refuses one that does not match, so have hash() return the SHA-1 of what you uploaded.
NexoHub passes that to every server with the link. A pack server that leaves the zip as Nexo
built it needs to do nothing.
Multipack templates are covered too. Nexo only asks a pack server for the main pack’s hash,
so when yours reports one that differs from the pack Nexo built, NexoHub downloads each
template once after the upload to learn its SHA-1 and sends players that instead.
If you use multipack
Nexo builds the link for each template pack out of the main pack’s link. That works for hosts whose links contain the pack’s ID, which covers hosting from your proxy, S3 and Hermes. Polymath and Lobfile return a link that does not, so Nexo cannot build the template links from it. Template packs still work for players those hosts can identify, but not on the pre-join screen. The defaultHERMES is not one of them, so this only comes up if you
switch.
NexoHub checks the real links after every upload and tells you if any of them fail:
/nexohub status:
/nexohub doctor names the case in advance, before anyone has to notice it in game:
This is a Nexo limitation rather than a NexoHub one, so switching hosts is the only fix.
Checking players can actually reach it
This section is abouthost: proxy. On the default delegated hosting there is no
address of yours to check, which is most of why it is the default.
The address you hand players is the one setting whose being wrong is invisible from
inside your own network. /nexohub doctor fetches it from outside and says:
/hub/v1/health, a route that needs no secret and returns the string
nexohub. You can open it in a browser yourself.
When hosting is delegated, public_address is not used at all and doctor says so
instead of testing it.
Keeping your proxy address private without an external host
Put a reverse proxy or CDN like Cloudflare in front of NexoHub and pointpublic_address at that instead. It gets you TLS at the same time, which is worth
having: see what faces the internet.