ziglang/ziglang.org
14
29
Fork
You've already forked ziglang.org
31

A new Community-Written Solution for setting up a community mirror #536

Merged
SavaLione merged 2 commits from feature/a-new-mirror-solution into main 2026年03月15日 15:09:55 +01:00
SavaLione commented 2025年09月09日 13:32:46 +02:00 (Migrated from github.com)
Copy link

This adds a new new community-written solution for setting up a community mirror.

Go Mirror Zig is a simple way to set up a Zig community mirror.
It is lightweight, distributed as a single binary and supports automatic ACME challenges.

Features:

  • Efficient caching: Downloads files from an upstream server once and serves them from a local cache for all subsequent requests.
  • Automatic TLS: Full support for ACME (Let's Encrypt) to automatically obtain and renew TLS certificates.
  • Secure by default: Supports HTTPS and automatic redirection from HTTP to HTTPS.
  • Standalone binary: Compiles to a single, dependency-free binary for easy deployment.
  • Configurable: All settings are manageable via command-line flags, including ports, cache directories, and upstream URL.
  • Path correctness: Caches files using the official Zig directory layout (/download/<version>/ and /builds/).

The solution source code: https://github.com/SavaLione/go-mirror-zig/

Thanks!

This adds a new new community-written solution for setting up a community mirror. Go Mirror Zig is a simple way to set up a Zig community mirror. It is lightweight, distributed as a single binary and supports automatic ACME challenges. Features: * Efficient caching: Downloads files from an upstream server once and serves them from a local cache for all subsequent requests. * Automatic TLS: Full support for ACME (Let's Encrypt) to automatically obtain and renew TLS certificates. * Secure by default: Supports HTTPS and automatic redirection from HTTP to HTTPS. * Standalone binary: Compiles to a single, dependency-free binary for easy deployment. * Configurable: All settings are manageable via command-line flags, including ports, cache directories, and upstream URL. * Path correctness: Caches files using the official Zig directory layout (`/download/<version>/` and `/builds/`). The solution source code: https://github.com/SavaLione/go-mirror-zig/ Thanks!
mlugg (Migrated from github.com) reviewed 2025年09月09日 13:32:46 +02:00
mlugg commented 2026年03月12日 16:53:32 +01:00 (Migrated from github.com)
Copy link

I'd prefer not to add this until there's a mirror using it (like you were trying to add in #533) just so that I know it works. I'll leave this open for now, but if you decide not to open a follow-up to #533, would you mind closing this? Either way, thank you! :)

I'd prefer not to add this until there's a mirror using it (like you were trying to add in #533) just so that I know it works. I'll leave this open for now, but if you decide *not* to open a follow-up to #533, would you mind closing this? Either way, thank you! :)
SavaLione commented 2026年03月13日 23:36:55 +01:00 (Migrated from github.com)
Copy link

Hi @mlugg ,

I've created a new PR that adds a new community mirror (#592).
It uses the newest version of this solution (v1.1.0)

I've also added some new features:

  • You can now customize or remove the index.html root page, which is useful for those who prefer not to display branding.
  • The application can now periodically remove cached dev builds based on a configured interval. This solves the issue mentioned in (#591), where the mirror went down due to significant disk space usage (~120GB of builds per server).

If you have any questions or suggestions, I'd be happy to answer them.

Thanks!

Hi @mlugg , I've created a new PR that adds a new community mirror ([#592](https://github.com/ziglang/www.ziglang.org/pull/592)). It uses the newest version of this solution (`v1.1.0`) I've also added some new features: * You can now customize or remove the `index.html` root page, which is useful for those who prefer not to display branding. * The application can now periodically remove cached dev builds based on a configured interval. This solves the issue mentioned in ([#591](https://github.com/ziglang/www.ziglang.org/pull/591)), where the mirror went down due to significant disk space usage (~120GB of builds per server). If you have any questions or suggestions, I'd be happy to answer them. Thanks!
mlugg commented 2026年03月15日 15:10:02 +01:00 (Migrated from github.com)
Copy link

Thank you!

Thank you!
Sign in to join this conversation.
No reviewers
Labels
Clear labels
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/ziglang.org!536
Reference in a new issue
ziglang/ziglang.org
No description provided.
Delete branch "feature/a-new-mirror-solution"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?