-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
49 lines (36 loc) · 2.8 KB
/
Copy path.env.example
File metadata and controls
49 lines (36 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# NetBox
# Copy this file to .env and fill in your values.
# NEVER commit .env to version control — it contains secrets.
# ─── Timezone ─────────────────────────────────────────────────────────────────
TZ=America/New_York
# ─── Database ─────────────────────────────────────────────────────────────────
NETBOX_DB_PASSWORD=your_db_password_here
# ─── Redis ────────────────────────────────────────────────────────────────────
NETBOX_REDIS_PASSWORD=your_redis_password_here
NETBOX_REDIS_CACHE_PASSWORD=your_redis_cache_password_here
# ─── Django secret key ────────────────────────────────────────────────────────
# Must be at least 50 characters. Generate with:
# python3 -c "import secrets; print(secrets.token_urlsafe(60))"
NETBOX_SECRET_KEY=your_secret_key_here_minimum_50_characters_long
# ─── Admin account (first run only) ───────────────────────────────────────────
# On startup, NetBox checks whether any superuser exists in the database.
# If none does, it creates one using these four vars. On every subsequent
# startup the check passes and the vars are ignored entirely — the account
# lives in Postgres from that point on.
#
# To change credentials after first run:
# - Password: web UI → profile → change password
# or: docker exec -it netbox python manage.py changepassword <user>
# - API token: web UI → profile → API tokens
#
# NETBOX_ADMIN_API_TOKEN must be exactly 40 hex characters. Generate with:
# python3 -c "import secrets; print(secrets.token_hex(20))"
NETBOX_ADMIN_USER=admin
NETBOX_ADMIN_EMAIL=admin@yourdomain.com
NETBOX_ADMIN_PASSWORD=your_admin_password_here
NETBOX_ADMIN_API_TOKEN=your_api_token_here_40_hex_chars
# ─── Traefik ──────────────────────────────────────────────────────────────────
NETBOX_DOMAIN=netbox.yourdomain.com
# ─── Ports (optional) ─────────────────────────────────────────────────────────
# Host port for direct access — Traefik uses the container port directly.
# NETBOX_PORT=8060