Sign inSign up

techroy23/docker-urnetwork

By techroy23

•Updated about 2 hours ago

Image
Networking
Internet of things
2

100K+

techroy23/docker-urnetwork repository overview

⁠Docker-UrNetwork

A minimal Docker setup that automatically fetches, updates, and runs the latest urNetwork Provider. The container is built on Alpine Linux, ensuring a minimal footprint. Includes built-in authentication handling, resilient restarts, scheduled in‑container updates (nightly build), and a built-in provider status endpoint.

Payout wallet — highly advised: set your earning wallet in the UrNetwork mobile app or website before expecting rewards. This container does not configure wallet consent; a registered provider without a wallet is not paid.

⁠Build

  • UrNetwork_nightly v2026.10.16-1074191560
DockerHubGitHubInvite
Docker HubGitHub RepoInvite Link

⁠Features

  • Automated retrieval of the latest urNetwork Provider binary on startup (nightly build)
  • Daily in‑container update at 00:00 UTC (configurable with UPDATE_TIME)
  • Two auth modes: userpass (email/password) and authcode
  • Reuses a valid JWT and only re‑authenticates when the token is missing, expired or rejected
  • Persistent provider identity, credentials and version metadata
  • Built‑in provider status JSON on port 8080 (no separate vnStat/httpd)
  • Resilient provider execution with automatic retries
  • Optional proxy, all‑operators and auto‑register support

⁠Environment variables

VariableRequirementDescription
-e AUTH='userpass'
-e AUTH='authcode'
Optionaluserpass Log in with USER_AUTH and PASSWORD and keep the provider running.

authcode Log in with an auth code from https://ur.io/⁠ (AUTHCODE or the container argument).

Default is userpass
-e USER_AUTH <EMAIL>
and
-e PASSWORD <PASSWORD>
Required for
userpass
Your Email and Password.
The container will exit if not provided.
-e AUTHCODE <AUTH-CODE>Required for
authcode
Your authentication code.
The container will exit if not provided.
Generate one here: https://ur.io/⁠
-e API_URL
and
-e CONNECT_URL
OptionalCustom operator endpoints, for example API_URL='https://api.example.net' and CONNECT_URL='wss://connect.example.net'.
Passed as --api_url and --connect_url to both auth and provide.
Set both or neither — if only one is set the container exits instead of starting.
Ignored with a warning when ALL_OPERATORS=Y, because each operator uses its own endpoints.
Default is empty (the binary defaults to the public operator).
-e MAX_MEMORYOptionalSoft memory target passed as --max-memory, for example 1gib.
Default is empty (the binary picks a target from host memory).
-e VERBOSEOptionalProvider log verbosity: 0 off, 1 for -v, 2 for -vv.
Default is 0.
-e PROVIDER_PORTOptionalProvider status JSON port, passed as --port. http://localhost:8080/ returns version/status/diagnostics.
Set to 0 to disable the status server.
Default is 8080.
-e ALL_OPERATORSOptionalY/N. Y passes --all-operators and mines every operator in https://ur.xyz/operators.yml, with a separate state directory per operator.
N mines the default operator only.
Default is N.
-e AUTO_REGISTEROptionalY/N. Only used with ALL_OPERATORS=Y. Passes --auto-register, which implies --allow-client-registration, and requires HOTKEY_SEED_FILE.
Default is N.
-e HOTKEY_SEED_FILERequired for
AUTO_REGISTER=Y
Absolute path inside the container to an sr25519 hotkey seed file (32 raw bytes or 64 hex characters). The provider never creates this file.
-e ALLOW_CLIENT_REGISTRATIONOptionalauto/Y/N. Controls --allow-client-registration.

auto adds the flag only when /root/.urnetwork has no provider identity yet (a genuinely new install).
Y always adds it.
N never adds it.

Default is auto.
-e PROVIDER_ARGSOptionalExtra flags passed to provide, for example --adopt-legacy-provider-key or --max-memory=1gib.
Default is empty.
-e UPDATE_TIMEOptionalTime of the daily in‑container update, HH:MM in UTC.
Default is 00:00.
-v urnetwork_data:/root/.urnetworkRecommendedPersists the provider identity, JWT and registration state.
Without it, every new container becomes a new provider identity and loses its registration.
-v /path/to/your/proxy.txt:/app/proxy.txtOptionalMount a proxy configuration file from host to container.
Omit this line entirely if you don't want to use a proxy.
The proxy inside the proxy.txt should have this format ip:port:username:password.
See the sample below. one proxy per line.
Optional123.456.789.012:55555:myproxyusername:myproxypassword
234.567.890.123:44444:myproxyusername:myproxypassword
345.678.901.234:33333:myproxyusername:myproxypassword
456.789.012.345:22222:myproxyusername:myproxypassword
567.890.123.456:11111:myproxyusername:myproxypassword
-p 8080:8080OptionalProvider status JSON = http://localhost:8080/.
Exposing it publicly reveals provider diagnostics; restrict it to your monitoring network.
Set PROVIDER_PORT=0 to disable it.

⁠When to turn each flag on or off

FlagDefaultTurn it ON whenTurn it OFF when
ALLOW_CLIENT_REGISTRATIONautoA brand new install with an empty /root/.urnetwork (auto already does this), or you intentionally want a new provider identity/slot.Restoring an existing installation or any normal restart. Leaving it auto is correct for both cases.
ALL_OPERATORSNYou want one container to serve every operator in the published list. Each operator gets its own identity under ~/.urnetwork/operators/<domain>/.You want a single provider identity on the default operator (normal setup).
AUTO_REGISTERNYou use ALL_OPERATORS=Y and want each newly listed operator registered automatically from a Bittensor hotkey (HOTKEY_SEED_FILE required).You do not use ALL_OPERATORS, or you authenticate operators with your account instead.
PROVIDER_PORT8080You want the built-in status/diagnostics JSON.The port would be publicly reachable, or you do not need monitoring. Use 0.
API_URL + CONNECT_URLunsetYou serve a non-default operator. Set both together.You use the public default operator (normal setup).
MAX_MEMORYunsetThe host has a memory limit and you want the provider to stay under it, e.g. 1gib.You want the binary to size itself from host memory.
VERBOSE0You are debugging startup/connection problems.Normal operation.

⁠Run with username/password

# Option 1 : amd64 build
docker run -d --platform linux/amd64 \
  --name=urnetwork \
  --pull=always --restart=always \
  --log-driver=json-file --log-opt max-size=1m --log-opt max-file=1 \
  --cap-add=NET_ADMIN --cap-add=NET_RAW --sysctl net.ipv4.ip_forward=1 \
  -e AUTH='userpass' \
  -e USER_AUTH='[email protected]' \
  -e PASSWORD='mYv3rYsEcUr3dP@sSw0rD' \
  -v /path/to/your/proxy.txt:/app/proxy.txt \
  -v urnetwork_data:/root/.urnetwork \
  -p 8080:8080 \
  techroy23/docker-urnetwork:latest

# Option 2 : arm64 build
docker run -d --platform linux/arm64 \
  --name=urnetwork \
  --pull=always --restart=always \
  --log-driver=json-file --log-opt max-size=1m --log-opt max-file=1 \
  --cap-add=NET_ADMIN --cap-add=NET_RAW --sysctl net.ipv4.ip_forward=1 \
  -e AUTH='userpass' \
  -e USER_AUTH='[email protected]' \
  -e PASSWORD='mYv3rYsEcUr3dP@sSw0rD' \
  -v /path/to/your/proxy.txt:/app/proxy.txt \
  -v urnetwork_data:/root/.urnetwork \
  -p 8080:8080 \
  techroy23/docker-urnetwork:latest

⁠Run with auth code

  • Replace <AUTH-CODE> with the code you generated from https://ur.io/⁠
  • The code is only exchanged when no valid JWT exists, so restarts reuse the stored token.
# Option 1 : amd64 build
docker run -d --platform linux/amd64 \
  --name=urnetwork \
  --pull=always --restart=always \
  --log-driver=json-file --log-opt max-size=1m --log-opt max-file=1 \
  --cap-add=NET_ADMIN --cap-add=NET_RAW --sysctl net.ipv4.ip_forward=1 \
  -e AUTH='authcode' \
  -e AUTHCODE='<AUTH-CODE>' \
  -v /path/to/your/proxy.txt:/app/proxy.txt \
  -v urnetwork_data:/root/.urnetwork \
  -p 8080:8080 \
  techroy23/docker-urnetwork:latest

# Option 2 : arm64 build
docker run -d --platform linux/arm64 \
  --name=urnetwork \
  --pull=always --restart=always \
  --log-driver=json-file --log-opt max-size=1m --log-opt max-file=1 \
  --cap-add=NET_ADMIN --cap-add=NET_RAW --sysctl net.ipv4.ip_forward=1 \
  -e AUTH='authcode' \
  -e AUTHCODE='<AUTH-CODE>' \
  -v /path/to/your/proxy.txt:/app/proxy.txt \
  -v urnetwork_data:/root/.urnetwork \
  -p 8080:8080 \
  techroy23/docker-urnetwork:latest

⁠Run with every listed operator

docker run -d --platform linux/amd64 \
  --name=urnetwork \
  --pull=always --restart=always \
  --cap-add=NET_ADMIN --cap-add=NET_RAW --sysctl net.ipv4.ip_forward=1 \
  -e AUTH='userpass' \
  -e USER_AUTH='[email protected]' \
  -e PASSWORD='mYv3rYsEcUr3dP@sSw0rD' \
  -e ALL_OPERATORS='Y' \
  -v urnetwork_data:/root/.urnetwork \
  -p 8080:8080 \
  techroy23/docker-urnetwork:latest

Each operator is authenticated with your account when its token is missing. To register every operator from a Bittensor hotkey instead, add:

  -e ALL_OPERATORS='Y' \
  -e AUTO_REGISTER='Y' \
  -e HOTKEY_SEED_FILE='/root/.urnetwork/hotkey.seed' \
  -v /path/to/hotkey.seed:/root/.urnetwork/hotkey.seed:ro \

⁠Promo Video

⁠Promo

Tag summary

Content type

Image

Digest

sha256:33220b9df…

Size

52.3 MB

Last updated

about 2 hours ago

docker pull techroy23/docker-urnetwork