🎉 monetr is now live! Read the announcement here. Or Sign Up!

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.

config.yaml
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`.
NameTypeDefaultDescription
enabledBooleanfalseAllow monetr to store files uploaded to it. As well as allow users to upload files.
providerStringfilesystemValid 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.

VariableConfig File Field
MONETR_STORAGE_ENABLEDstorage.enabled
MONETR_STORAGE_PROVIDERstorage.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.

config.yaml
storage:
  s3:
    accessKey: "..."
    secretKey: "..."
    endpoint: <http://your-object-store.local>
    bucket: "..."
    forcePathStyle: <true|false>
    useEnvCredentials: <true|false>
NameTypeDefaultDescription
accessKeyStringThe access key provided to you buy your object storage system. Required when useEnvCredentials: false
secretKeyStringThe secret key provided to you buy your object storage system. Required when useEnvCredentials: false
endpointStringThe full URL of the object storage provider you are using. Required when you are not using AWS S3.
bucketStringThe name of the bucket where files will be uploaded. This is always required. The bucket must also already exist.
forcePathStyleBooleanfalseIf 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.
useEnvCredentialsBooleanfalseIf 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.

config.yaml
storage:
  filesystem:
    basePath: /etc/monetr/storage
NameTypeDefaultDescription
basePathString/etc/monetr/storageA 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.