ZX: Hosting a Zomp Mirror Node

Hosting a Zomp mirror is as easy as running any other program:

zx run zomp

Zomp listens for TCP connections on port 11311. This is customizable by editing the file $ZOMP_DIR/etc/zomp/conf.trl. Zomp does not do any dirty NAT tricks or attempt to interact with your local UPnP services, so to host a publicly visible Zomp node requires you to deliberately make port 11311 available. If you are only running a Zomp mirror to speed things up in your local network (especially for a large business organization) it is not necessary to mess with forwarding a public port, but an administrator will need to configure local ZX instances to point to the local mirror.

Preferred mirrors (Zomp nodes to try first) are addeded with zx add mirror [Address [Port]].

If you have a special network configuration that requires you to run Zomp on a custom port or forward a different public port number than the one being used inside the local network (forwarding external port 7000 to the internal zomp node's 11311, for example) you will need to update the local $ZOMP_DIR/etc/zomp/conf.trl entry for 'external_port'. This setting will let Zomp know to advertise a different port number than the one it is actually listening on locally. Unreachable nodes are not added to a Zomp realm's list of public mirrors, but they are accepted as valid clients of public nodes. This means you can host code internal to your organization on a private Zomp realm unreachable from the outside, but still mirror public code locally to reduce external dependencies and network traffic.

While hosting an ephemeral Zomp node is very helpful for the network (thank you!) and this can be done in a terminal window as a normal user, hosting a more permanent Zomp node as a system service is even more helpful: older nodes turn up higher in the redirect tree and experience greater utilization. Private realms can be self-hosted as well, but this requires that the prime node be hosted in a stable manner (unless you don't mind being a jerk to your users). In this case you should create a separate, unprivileged Zomp system user with a unique $HOME and create a service start script that executes the "zx run zomp" at system startup. On Windows you will need to create a "system service" that has the same effect.