| 195 | Note that Python 3.8 or later is required for NetBox v3.2 and later releases. |
| 196 | |
| 197 | === Create a Super User === |
| 198 | NetBox does not come with any predefined user accounts. You'll need to create a super user (administrative account) to be able to log into NetBox. First, enter the Python virtual environment created by the upgrade script: |
| 199 | {{{ |
| 200 | # source /opt/netbox/venv/bin/activate |
| 201 | }}} |
| 202 | Once the virtual environment has been activated, you should notice the string ''' (venv) ''' prepended to your console prompt. |
| 203 | |
| 204 | Next, we'll create a superuser account using the ''' createsuperuser ''' Django management command ''' (via manage.py) '''. Specifying an email address for the user is not required, but be sure to use a very strong password. |
| 205 | {{{ |
| 206 | # cd /opt/netbox/netbox |
| 207 | # python3 manage.py createsuperuser |
| 208 | }}} |
| 209 | === Test the Application === |
| 210 | At this point, we should be able to run NetBox's development server for testing. We can check by starting a development instance: |
| 211 | {{{ |
| 212 | # python3 manage.py runserver 0.0.0.0:8000 --insecure |
| 213 | }}} |
| 214 | If successful, you should see output similar to the following: |
| 215 | {{{ |
| 216 | Watching for file changes with StatReloader |
| 217 | Performing system checks... |
| 218 | |
| 219 | System check identified no issues (0 silenced). |
| 220 | August 30, 2021 - 18:02:23 |
| 221 | Django version 3.2.6, using settings 'netbox.settings' |
| 222 | Starting development server at http://127.0.0.1:8000/ |
| 223 | Quit the server with CONTROL-C. |
| 224 | }}} |
| 225 | Next, connect to the name or IP of the server (as defined in ALLOWED_HOSTS) on port 8000; for example, http://127.0.0.1:8000/. You should be greeted with the NetBox home page. Try logging in using the username and password specified when creating a superuser. |
| 226 | |
| 227 | Type ''' Ctrl+c ''' to stop the development server. |