
GunCAD Mirror is a seedbox application that you can run to mirror all content on the GunCAD Index over the LBRY network. It lets you contribute resiliency in the event that Odysee becomes unavailable.
You can find it on GitLab: https://gitlab.com/guncad-index/mirror
Note: this documentation will reference some of the inner workings of LBRY, and may contain a lot of jargon. Users are encouraged to read our documentation on LBRY if there's any confusion.
What is it, exactly?[edit]
The short version[edit]
GunCAD Mirror is a seedbox. You download a bunch of shit based on what the Index knows is available and seed it back up to anyone downloading via LBRY Desktop or lbrynet (i.e. other GunCAD Mirror instances). You will need at least as much space as is listed on the frontpage of the website.
The longer version[edit]
GunCAD Mirror is an application that:
- Reaches out to the API of a remote GunCAD Index instance (like this one);
- Parses all releases (or a subset if your configured API URL has search query parameters);
- Instructs a local lbrynet instance to fetch the files; and
- Depending on certain configuration variables, can construct these files for offline browsing and offer a simple web dashboard
Installation[edit]
See the README in the repository for details on deployment and configuration.
Functionality[edit]
Assembling Files[edit]
If MIRROR_ASSEMBLE_FILES
is set, GunCAD Mirror will take the blobs it downloads and patch them up into usable files. This lets you maintain a personal usable archive in addition to seeding the content back up.
The drawback is that this is not how lbrynet likes to store objects, so it's 100% redundant data. Thus, turning this feature on doubles your disk usage(*).
*: It doesn't strictly double your disk usage -- there are factors that influence how efficient blob storage is, so it'll be slightly more or less than that -- but it may as well be.
LBRY-Only Fallback Mode[edit]
In the event that the Index (this website) can't be accessed, GunCAD Mirror will recognize the situation and fall back to scouring the blockchain itself for GunCAD content. One of the following two conditions must bet met for this to trigger:
- We encountered an error (timeout, name resolution failure, whatever) from
requests
when we attempted to query the API endpoint specified inMIRROR_API_ENDPOINT
; or - Our query succeeded, but the API returned no releases (we interpret this as website malfunction)
In the event this happens, Mirror will perform a channel claim search for any channels that have a specific set of tags (like guncad
, fosscad
, 3d2a
, etc.) and mirror all of their releases that aren't images or videos.
It's not perfect -- and no fallback solution will be -- but it works well. This should catch most creators that have wound up on the Index.
FAQ[edit]
See the README in the repository for answers frequently-asked questions.