diff --git a/docs/configuration/optional-settings.md b/docs/configuration/optional-settings.md index a59e6485f..bc79e90ab 100644 --- a/docs/configuration/optional-settings.md +++ b/docs/configuration/optional-settings.md @@ -293,6 +293,26 @@ Session data is used to track authenticated users when they access NetBox. By de --- +## STORAGE_BACKEND + +Default: None (local storage) + +The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports integration with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) package, which provides backends for several popular file storage services. If not configured, local filesystem storage will be used. + +The configuration parameters for the specified storage backend are defined under the `STORAGE_CONFIG` setting. + +--- + +## STORAGE_CONFIG + +Default: Empty + +A dictionary of configuration parameters for the storage backend configured as `STORAGE_BACKEND`. The specific parameters to be used here are specific to each backend; see the [`django-storages` documentation](https://django-storages.readthedocs.io/en/stable/) for more detail. + +If `STORAGE_BACKEND` is not defined, this setting will be ignored. + +--- + ## TIME_ZONE Default: UTC diff --git a/docs/installation/2-netbox.md b/docs/installation/2-netbox.md index f9ca46468..701b482ac 100644 --- a/docs/installation/2-netbox.md +++ b/docs/installation/2-netbox.md @@ -90,6 +90,14 @@ NetBox supports integration with the [NAPALM automation](https://napalm-automati # pip3 install napalm ``` +## Remote File Storage (Optional) + +By default, NetBox will use the local filesystem to storage uploaded files. To use a remote filesystem, install the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) library and configure your [desired backend](../../configuration/optional-settings/#storage_backend) in `configuration.py`. + +```no-highlight +# pip3 install django-storages +``` + # Configuration Move into the NetBox configuration directory and make a copy of `configuration.example.py` named `configuration.py`. diff --git a/docs/release-notes/version-2.7.md b/docs/release-notes/version-2.7.md index 2cc12e677..c681fc245 100644 --- a/docs/release-notes/version-2.7.md +++ b/docs/release-notes/version-2.7.md @@ -40,6 +40,40 @@ This new functionality replaces the existing CSV-based import form, which did no NetBox now supports the bulk import of device components such as console ports, power ports, and interfaces. Device components can be imported in CSV-format. +### External File Storage ([#1814](https://github.com/netbox-community/netbox/issues/1814)) + +In prior releases, the only option for storing uploaded file (e.g. image attachments) was to save them to the local +filesystem on the NetBox server. This release introduces support for several remote storage backends via the +[`django-storages`](https://django-storages.readthedocs.io/en/stable/) package. These include: + +* Amazon S3 +* ApacheLibcloud +* Azure Storage +* DigitalOcean Spaces +* Dropbox +* FTP +* Google Cloud Storage +* SFTP + +To enable remote file storage, first install `django-storages`: + +``` +pip install django-storages +``` + +Then, set the appropriate storage backend and its configuration in `configuration.py`. Here's an example using Amazon +S3: + +```python +STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage' +STORAGE_CONFIG = { + 'AWS_ACCESS_KEY_ID': '', + 'AWS_SECRET_ACCESS_KEY': '', + 'AWS_STORAGE_BUCKET_NAME': 'netbox', + 'AWS_S3_REGION_NAME': 'eu-west-1', +} +``` + ## Changes ### Topology Maps Removed ([#2745](https://github.com/netbox-community/netbox/issues/2745))