Skip to content

Pub (Dart/Flutter)

NORA acts as a caching proxy for pub.dev, the package repository for Dart and Flutter. Package archives are immutably cached with SHA256 verification. This is a proxy-only registry — publishing packages is not supported.

Set the PUB_HOSTED_URL environment variable:

Terminal window
export PUB_HOSTED_URL=http://nora.example.com:4000/pub

Then use Dart/Flutter as usual:

Terminal window
dart pub get
flutter pub get

config.toml:

[pub_dart]
enabled = true
proxy = "https://pub.dev"
proxy_timeout = 30

Environment variables:

VariableDescriptionDefault
NORA_PUB_ENABLEDEnable Pub proxyfalse
NORA_PUB_PROXYUpstream pub registry URLhttps://pub.dev
NORA_PUB_PROXY_AUTHUpstream auth (user:pass)
NORA_PUB_PROXY_TIMEOUTUpstream timeout in seconds30
FeatureStatusNotes
Package search (/api/packages?q=)FullResponse URL rewriting
Package metadata (/api/packages/{name})Fullarchive_url rewritten to NORA
Version metadataFullCached
Security advisoriesFullCached
Archive download (.tar.gz)FullImmutable cache, SHA256 verified
Package publishProxy-only (read)
  • Proxy-only: dart pub publish is not supported. NORA caches packages downloaded from pub.dev.
  • Disabled by default. Set NORA_PUB_ENABLED=true to activate.