Netbox Deployment

GitOps deployment for Netbox with Tailscale HTTPS access.

Prerequisites

PostgreSQL Database

Connect to your PostgreSQL server and create the database:

CREATE DATABASE netbox;
CREATE USER netbox WITH PASSWORD 'your-secure-password';
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
ALTER DATABASE netbox OWNER TO netbox;

Tailscale Configuration

Download the serve configuration (first time only):

curl -o serve-config.json https://gitea.arnodo.fr/Damien/netbox-deployment/raw/branch/main/serve-config.json

Place serve-config.json in the stack directory before deployment.

Generate Secret Key

python3 -c "import secrets; print(secrets.token_urlsafe(50))"

Portainer Environment Variables

Variable Description
TS_AUTHKEY Tailscale auth key (reusable, ephemeral recommended)
DB_PASSWORD PostgreSQL password for netbox user
SECRET_KEY Django secret key (generate with command above)
SUPERUSER_NAME Initial admin username
SUPERUSER_EMAIL Initial admin email
SUPERUSER_PASSWORD Initial admin password
SKIP_SUPERUSER Set to true after first deployment

Deployment

  1. Create a new stack in Portainer
  2. Point to this repository
  3. Configure environment variables
  4. Deploy

Access

Once deployed: https://netbox.taila5ad8.ts.net

Description
GitOps deployment for Netbox with Tailscale HTTPS access
Readme 64 KiB
Languages
Python 100%