Work in the following order; do not directly apply the old version checklist or old image examples.
1. First calibrate against the official specification
For any packaging, build, or routing configuration task, first read references/spec-sync.md, verify the current official source text according to the process in it, and confirm the target lzcos and lzc-cli versions. The repository reference documentation is a snapshot; if it conflicts with the current official documentation, the official documentation prevails.
LPK V2 must split configuration:
package.yml:package、version、name、description, permissions, and other static package information.lzc-manifest.yml:application、servicesand other runtime structures.- Do not continue writing old metadata at the top level of the V2 manifest, and do not add nonexistent
application.secondary_domains。
2. Choose the correct traffic mechanism
| Requirement | Use | Key rules |
|---|---|---|
| Simple HTTP/HTTPS, static files, or starting a local program | application.routes |
URL_PATH=UPSTREAM; the matched path prefix is removed by default |
| Preserve paths, route by domain prefix, control Host/Header/TLS verification | application.upstreams |
backend only supports http、https、file |
| TCP/UDP, databases, or other non-HTTP protocols | application.ingress |
L4 passthrough, does not go through platform HTTP authentication |
| Complex rewrites that built-in capabilities cannot express | In-application reverse proxy | Prefer the verified current image; do not copy outdated app-proxy labels |
Protocol boundaries must be clear:
routessupportshttp(s)://、file:///、exec://端口,程序路径。upstreams[].backendsupportshttp、https、file, does not supportexec://; when a program needs to be started, usebackend_launch_command。ingressonly declarestcporudp; do not use it in place of ordinary HTTP routing.
3. Hard rules for domains and service discovery
- Every application automatically has
<prefix>-<实际子域名>.<微服根域>prefix domains in the form; use for routing by domainupstreams[].domain_prefix。 - The actual assigned domain may change due to conflicts or multiple instances; it can only be obtained from
LAZYCAT_APP_DOMAIN; do not construct the final domain by hardcoding according toapplication.subdomain. - Within the same application, usually use
http://<service>:<port>. When an in-application proxy needs to receive the full ingress Host, use the official multi-domain approach<service>.<package-id>.lzcapp。 .lzcappService DNS is not a cross-application invocation mechanism. To access another application's HTTP endpoint on behalf of a user, useapp.<target-package-id>.lzcx, and handle delegated permissions and user tickets according to the official inter-application access documentation.- Prefix domain traffic ignores
application.ingress; L4 only uses the ingress corresponding to the application's default domain.
4. Risk boundaries
use_backend_hostcontrols HTTPHost, not an officially declared TLS SNI switch; the HTTPS backend should specify a hostname matching the certificate.disable_backend_ssl_verifydisables backend certificate verification and can only be used after the risk is clearly understood.- L4 forwarding has no platform account authentication; the application must implement protocol authentication itself.
- Taking over 80/443 bypasses authentication, automatic wake-up, platform certificates, and
routes/upstreams, andyes_i_want_80_443: truemust be explicitly set. The vast majority of applications should not do this.
5. Read progressively as needed
Only load the documentation needed for the current problem:
- Simple routing, protocols, and service DNS:
references/route.md upstreams, Host/TLS, complex proxies:references/advanced-routes.md- Domain prefixes, multi-domain routing:
references/secondary-domains.md - TCP/UDP and 80/443 risks:
references/l4forward.md
Before outputting the configuration, check at least: whether the file is split according to V2, whether fields belong to the correct level, whether protocols match, whether cross-application DNS is misused, whether unauthenticated entry points are expanded, and whether the fields used satisfy the target system version.