Storage Configuration
monetr allows files to be uploaded in order to import transactions using OFX files. You can find the documentation on
that feature here. To facilitate this monetr requires a file storage backend.
For self hosted environments the filesystem
provider is likely sufficient. But monetr also supports S3-compatible
object stores such as RADOSGW or minio.
If you are running more than one monetr server instance, you should not use the filesystem storage provider. Instead one of the other two storage providers should be used.
If you disable file storage, all file upload functionality will be disabled. Manual links will still work, but transactions must be created one by one manually instead.
storage:
enabled: <true|false>
provider: <filesystem|s3> # Must be `filesystem` or `s3`.
s3: { ... } # S3 specific configuration, only used when `provider: s3`.
filesystem: { ... } # Filesystem specific configuration, only used when `provider: filesystem`.
Name | Type | Default | Description |
---|---|---|---|
enabled | Boolean | false | Allow monetr to store files uploaded to it. As well as allow users to upload files. |
provider | String | filesystem | Valid values are: - filesystem : Store uploaded files on the local filesystem available to monetr.- s3 : Store uploaded files on an external S3-compatible object store. |
The following environment variables map to the following configuration file fields. Each field is documented below.
Variable | Config File Field |
---|---|
MONETR_STORAGE_ENABLED | storage.enabled |
MONETR_STORAGE_PROVIDER | storage.provider |
monetr does not currently have a way to migrate between storage providers. This should not be a problem immediately as the only files currently being uploaded are deleted shortly after they are processed. But as monetr adds support for things like transaction attachments this will become more relevant.
S3 Compatible
monetr supports any S3 compatible object store. Non AWS object stores will require additional configuration though, such as defining a custom endpoint and potentially specifying path style.
storage:
s3:
accessKey: "..."
secretKey: "..."
endpoint: <http://your-object-store.local>
bucket: "..."
forcePathStyle: <true|false>
useEnvCredentials: <true|false>
Name | Type | Default | Description |
---|---|---|---|
accessKey | String | The access key provided to you buy your object storage system. Required when useEnvCredentials: false | |
secretKey | String | The secret key provided to you buy your object storage system. Required when useEnvCredentials: false | |
endpoint | String | The full URL of the object storage provider you are using. Required when you are not using AWS S3. | |
bucket | String | The name of the bucket where files will be uploaded. This is always required. The bucket must also already exist. | |
forcePathStyle | Boolean | false | If you are using a custom object storage provider you might need to set this to true, instead of prefixing the bucket name onto the hostname. It will be appended to the path of requests made to the object store. |
useEnvCredentials | Boolean | false | If this is set to true then the access key and secret will be loaded from the AWS_ACCESS_KEY and AWS_SECRET_KEY environment variables respectively. |
Note: This provider cannot be configured via environment variables outside of useEnvCredentials: true
.
Filesystem
If you are self-hosting monetr, the filesystem storage is the easiest to use and is already configured in the provided Docker compose file.
storage:
filesystem:
basePath: /etc/monetr/storage
Name | Type | Default | Description |
---|---|---|---|
basePath | String | /etc/monetr/storage | A path to a directory that monetr will store uploaded files on the current system. If this directory does not exist monetr will create it. |
Note: This provider cannot be configured via environment variables.