{"id":101,"date":"2025-07-10T23:54:01","date_gmt":"2025-08-29T10:18:34","guid":{"rendered":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-netbox-irm-on-debian-12\/"},"modified":"2025-08-09T15:55:27","modified_gmt":"2025-08-09T14:55:27","slug":"how-to-install-netbox-irm-on-debian-12","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-netbox-irm-on-debian-12\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 NetBox IRM on Debian 12"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h1>How to Install NetBox IRM on Ubuntu 24.04 Server Using Windows VPS<\/h1>\n<p>NetBox is an open-source Infrastructure Resource Management (IRM) tool designed to manage and document networks, IP addresses, and data center infrastructure. This guide provides step-by-step instructions for installing NetBox on an Ubuntu 24.04 server hosted on a Windows VPS using manual setup, Docker, Ansible, Kubernetes, and Terraform. We\u2019ll also configure Let\u2019s Encrypt for SSL and set up a domain. For reliable VPS hosting, consider <a href=\"https:\/\/us.netcloud24.com\/\">Netcloud24<\/a> for high-performance Windows VPS solutions.<\/p>\n<div class=\"promo\">\n<h3>Power Your NetBox IRM with Netcloud24<\/h3>\n<p>Host your NetBox instance on a robust Windows VPS from Netcloud24. Explore our services in your region:<\/p>\n<ul>\n<li><a href=\"https:\/\/ie.netcloud24.com\">United States (EN)<\/a><\/li>\n<li><a href=\"https:\/\/uk.netcloud24.com\/\">United Kingdom<\/a><\/li>\n<li><a href=\"https:\/\/ca.netcloud24.com\/\">Canada<\/a><\/li>\n<li><a href=\"https:\/\/fr.netcloud24.com\/\">France<\/a><\/li>\n<li><a href=\"https:\/\/de.netcloud24.com\/\">Germany<\/a><\/li>\n<li><a href=\"https:\/\/es.netcloud24.com\/\">Spain<\/a><\/li>\n<li><a href=\"https:\/\/it.netcloud24.com\/\">Italy<\/a><\/li>\n<li><a href=\"https:\/\/pt.netcloud24.com\/\">Portugal<\/a><\/li>\n<li><a href=\"https:\/\/nl.netcloud24.com\/\">Netherlands<\/a><\/li>\n<li><a href=\"https:\/\/sk.netcloud24.com\/\">Slovakia<\/a><\/li>\n<li><a href=\"https:\/\/cz.netcloud24.com\/\">Czech Republic<\/a><\/li>\n<\/ul>\n<\/div>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Ubuntu 24.04 VPS (e.g., from <a href=\"https:\/\/us.netcloud24.com\/\">Netcloud24<\/a>)<\/li>\n<li>SSH access with root or sudo privileges<\/li>\n<li>A registered domain name<\/li>\n<li>Basic knowledge of Linux commands<\/li>\n<\/ul>\n<h2>Method 1: Manual Setup<\/h2>\n<h3>Step 1: Update System and Install Dependencies<\/h3>\n<pre>sudo apt update &amp;&amp; sudo apt upgrade -y\r\nsudo apt install -y python3 python3-pip python3-venv python3-dev postgresql postgresql-contrib libpq-dev redis-server nginx git\r\n<\/pre>\n<h3>Step 2: Configure PostgreSQL<\/h3>\n<pre>sudo -u postgres psql\r\nCREATE DATABASE netbox;\r\nCREATE USER netbox WITH PASSWORD 'YourSecurePassword';\r\nGRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;\r\n\\q\r\n<\/pre>\n<h3>Step 3: Install NetBox<\/h3>\n<pre>cd \/opt\r\nsudo git clone -b release https:\/\/github.com\/netbox-community\/netbox.git\r\ncd netbox\/netbox\r\nsudo python3 -m venv venv\r\nsource venv\/bin\/activate\r\npip install -r requirements.txt\r\n<\/pre>\n<h3>Step 4: Configure NetBox<\/h3>\n<p>Copy the configuration file and edit it:<\/p>\n<pre>sudo cp configuration.example.py configuration.py\r\nsudo nano configuration.py\r\n<\/pre>\n<p>Update the following in <code>configuration.py<\/code>:<\/p>\n<pre>ALLOWED_HOSTS = ['yourdomain.com']\r\nDATABASE = {\r\n    'NAME': 'netbox',\r\n    'USER': 'netbox',\r\n    'PASSWORD': 'YourSecurePassword',\r\n    'HOST': 'localhost',\r\n    'PORT': '',\r\n}\r\nSECRET_KEY = 'your-secret-key'  # Generate a secure key\r\nREDIS = {\r\n    'tasks': {\r\n        'HOST': 'localhost',\r\n        'PORT': 6379,\r\n        'DATABASE': 0,\r\n    },\r\n    'caching': {\r\n        'HOST': 'localhost',\r\n        'PORT': 6379,\r\n        'DATABASE': 1,\r\n    }\r\n}\r\n<\/pre>\n<h3>Step 5: Run NetBox Installation Script<\/h3>\n<pre>sudo .\/manage.py migrate\r\nsudo .\/manage.py createsuperuser\r\nsudo .\/manage.py collectstatic --noinput\r\n<\/pre>\n<h3>Step 6: Configure Gunicorn and Nginx<\/h3>\n<p>Create Gunicorn service:<\/p>\n<pre>sudo nano \/etc\/systemd\/system\/gunicorn.service\r\n<\/pre>\n<p>Add:<\/p>\n<pre>[Unit]\r\nDescription=gunicorn daemon for NetBox\r\nAfter=network.target\r\n[Service]\r\nUser=www-data\r\nGroup=www-data\r\nWorkingDirectory=\/opt\/netbox\r\nExecStart=\/opt\/netbox\/venv\/bin\/gunicorn --workers 3 --bind 127.0.0.1:8001 netbox.wsgi\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/pre>\n<p>Configure Nginx:<\/p>\n<pre>sudo nano \/etc\/nginx\/sites-available\/netbox\r\n<\/pre>\n<p>Add:<\/p>\n<pre>server {\r\n    listen 80;\r\n    server_name yourdomain.com;\r\n    location \/ {\r\n        proxy_pass http:\/\/127.0.0.1:8001;\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n    }\r\n}\r\n<\/pre>\n<p>Enable services:<\/p>\n<pre>sudo systemctl enable gunicorn\r\nsudo systemctl start gunicorn\r\nsudo ln -s \/etc\/nginx\/sites-available\/netbox \/etc\/nginx\/sites-enabled\/\r\nsudo systemctl restart nginx\r\n<\/pre>\n<h2>Method 2: Docker Setup<\/h2>\n<h3>Step 1: Install Docker<\/h3>\n<pre>sudo apt install -y docker.io\r\nsudo systemctl enable docker\r\nsudo systemctl start docker\r\n<\/pre>\n<h3>Step 2: Run NetBox with Docker Compose<\/h3>\n<pre>mkdir netbox-docker &amp;&amp; cd netbox-docker\r\nnano docker-compose.yml\r\n<\/pre>\n<p>Add to <code>docker-compose.yml<\/code>:<\/p>\n<pre>version: '3'\r\nservices:\r\n  netbox:\r\n    image: netboxcommunity\/netbox:latest\r\n    environment:\r\n      - DB_HOST=postgres\r\n      - DB_NAME=netbox\r\n      - DB_USER=netbox\r\n      - DB_PASSWORD=YourSecurePassword\r\n      - REDIS_HOST=redis\r\n      - SECRET_KEY=your-secret-key\r\n    ports:\r\n      - \"8080:8080\"\r\n  postgres:\r\n    image: postgres:15\r\n    environment:\r\n      - POSTGRES_DB=netbox\r\n      - POSTGRES_USER=netbox\r\n      - POSTGRES_PASSWORD=YourSecurePassword\r\n  redis:\r\n    image: redis:7\r\n<\/pre>\n<p>Run Docker Compose:<\/p>\n<pre>sudo docker-compose up -d\r\n<\/pre>\n<p>Access NetBox at <code>http:\/\/yourdomain.com:8080<\/code>.<\/p>\n<h2>Method 3: Ansible Setup<\/h2>\n<h3>Step 1: Install Ansible<\/h3>\n<pre>sudo apt install -y ansible\r\n<\/pre>\n<h3>Step 2: Create Ansible Playbook<\/h3>\n<pre>mkdir netbox-ansible &amp;&amp; cd netbox-ansible\r\nnano netbox.yml\r\n<\/pre>\n<p>Add to <code>netbox.yml<\/code>:<\/p>\n<pre>---\r\n- hosts: all\r\n  become: yes\r\n  tasks:\r\n    - name: Update apt cache\r\n      apt:\r\n        update_cache: yes\r\n    - name: Install dependencies\r\n      apt:\r\n        name: \"{{ packages }}\"\r\n        state: present\r\n      vars:\r\n        packages:\r\n          - python3\r\n          - python3-pip\r\n          - postgresql\r\n          - redis-server\r\n          - nginx\r\n          - git\r\n    - name: Clone NetBox\r\n      git:\r\n        repo: 'https:\/\/github.com\/netbox-community\/netbox.git'\r\n        dest: \/opt\/netbox\r\n        version: release\r\n    - name: Install Python requirements\r\n      pip:\r\n        requirements: \/opt\/netbox\/requirements.txt\r\n        virtualenv: \/opt\/netbox\/venv\r\n<\/pre>\n<h3>Step 3: Run Playbook<\/h3>\n<pre>ansible-playbook netbox.yml\r\n<\/pre>\n<h2>Method 4: Kubernetes Setup<\/h2>\n<h3>Step 1: Install Kubernetes<\/h3>\n<pre>sudo apt install -y kubeadm kubectl kubelet\r\nsudo kubeadm init\r\nmkdir -p $HOME\/.kube\r\nsudo cp -i \/etc\/kubernetes\/admin.conf $HOME\/.kube\/config\r\nsudo chown $(id -u):$(id -g) $HOME\/.kube\/config\r\n<\/pre>\n<h3>Step 2: Deploy NetBox<\/h3>\n<pre>kubectl apply -f https:\/\/raw.githubusercontent.com\/netbox-community\/netbox-docker\/master\/k8s\/netbox-deployment.yaml\r\nkubectl apply -f https:\/\/raw.githubusercontent.com\/netbox-community\/netbox-docker\/master\/k8s\/netbox-service.yaml\r\n<\/pre>\n<p>Access NetBox via the Kubernetes service endpoint.<\/p>\n<h2>Method 5: Terraform Setup<\/h2>\n<h3>Step 1: Install Terraform<\/h3>\n<pre>sudo apt install -y terraform\r\n<\/pre>\n<h3>Step 2: Create Terraform Configuration<\/h3>\n<pre>mkdir netbox-terraform &amp;&amp; cd netbox-terraform\r\nnano main.tf\r\n<\/pre>\n<p>Add to <code>main.tf<\/code> (example for AWS, adjust for your provider):<\/p>\n<pre>provider \"aws\" {\r\n  region = \"us-east-1\"\r\n}\r\nresource \"aws_instance\" \"netbox\" {\r\n  ami           = \"ami-0c55b159cbfafe1f0\" # Ubuntu 24.04 AMI\r\n  instance_type = \"t2.medium\"\r\n  tags = {\r\n    Name = \"NetBox-Server\"\r\n  }\r\n  user_data = &lt;&lt;-EOF\r\n              #!\/bin\/bash\r\n              apt update &amp;&amp; apt upgrade -y\r\n              apt install -y python3 python3-pip postgresql redis-server nginx git\r\n              git clone -b release https:\/\/github.com\/netbox-community\/netbox.git \/opt\/netbox\r\n              EOF\r\n}\r\n<\/pre>\n<h3>Step 3: Apply Terraform<\/h3>\n<pre>terraform init\r\nterraform apply\r\n<\/pre>\n<h2>Configuring Let\u2019s Encrypt SSL<\/h2>\n<h3>Step 1: Install Certbot<\/h3>\n<pre>sudo apt install -y certbot python3-certbot-nginx\r\n<\/pre>\n<h3>Step 2: Obtain and Install SSL Certificate<\/h3>\n<pre>sudo certbot --nginx -d yourdomain.com\r\n<\/pre>\n<p>Follow the prompts to configure SSL. Certbot will update Nginx configuration.<\/p>\n<h2>Adding a Domain<\/h2>\n<p>Update your domain\u2019s DNS records to point to your VPS\u2019s public IP address. For Nginx, ensure the virtual host is configured as shown above.<\/p>\n<h2>Conclusion<\/h2>\n<p>You\u2019ve now learned how to install NetBox IRM on an Ubuntu 24.04 Windows VPS using manual setup, Docker, Ansible, Kubernetes, and Terraform, along with Let\u2019s Encrypt SSL and domain configuration. For a seamless hosting experience, choose <a href=\"https:\/\/us.netcloud24.com\/\">Netcloud24<\/a> for reliable VPS solutions tailored for applications like NetBox.<\/p>\n<div class=\"promo\">\n<h3>Why Choose Netcloud24?<\/h3>\n<p>Netcloud24 offers high-performance VPS solutions for your infrastructure needs. Visit our regional sites:<\/p>\n<ul>\n<li><a href=\"https:\/\/us.netcloud24.com\/\">United States<\/a><\/li>\n<li><a href=\"https:\/\/ca.netcloud24.com\/\">Canada<\/a><\/li>\n<li><a href=\"https:\/\/uk.netcloud24.com\/\">United Kingdom<\/a><\/li>\n<li><a href=\"https:\/\/fr.netcloud24.com\/\">France<\/a><\/li>\n<li><a href=\"https:\/\/de.netcloud24.com\/\">Germany<\/a><\/li>\n<\/ul>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; How to Install NetBox IRM on Ubuntu 24.04 Server Using Windows VPS NetBox is an open-source Infrastructure Resource Management (IRM) tool designed to manage and document networks,\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":3,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":3580,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/101\/revisions\/3580"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}