Ocean Node supports five storage backends for assets (e.g. algorithm or data files). Each type is identified by a type field on the file object and has its own shape and validation rules.
| Type | type value |
Description |
|---|---|---|
| URL | url |
File served via HTTP/HTTPS |
| IPFS | ipfs |
File identified by IPFS CID |
| Arweave | arweave |
File identified by Arweave transaction ID |
| S3 | s3 |
File in S3-compatible storage (AWS, Ceph, MinIO, etc.) |
| FTP | ftp |
File served via FTP or FTPS |
All file objects can optionally include encryption metadata: encryptedBy and encryptMethod (e.g. AES, ECIES).
Files are fetched from a given URL using HTTP GET or POST.
{
"type": "url",
"url": "https://example.com/path/to/file.zip",
"method": "get",
"headers": {}
}| Field | Required | Description |
|---|---|---|
type |
Yes | Must be "url" |
url |
Yes | Full HTTP/HTTPS URL to the file |
method |
Yes | "get" or "post" |
headers |
No | Optional request headers (key-value object) |
urlandmethodmust be present.methodmust begetorpost(case-insensitive).- If the node config defines
unsafeURLs(list of regex patterns), any URL matching a pattern is rejected. - The URL must look like a real URL (
http://orhttps://); path-like values are rejected.
- Optional:
unsafeURLs– array of regex strings; URLs matching any of them are considered unsafe and rejected.
Files are resolved via an IPFS gateway using a content identifier (CID).
{
"type": "ipfs",
"hash": "QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco"
}| Field | Required | Description |
|---|---|---|
type |
Yes | Must be "ipfs" |
hash |
Yes | IPFS content identifier (CID) |
The node builds the download URL as: {ipfsGateway}/ipfs/{hash} (e.g. https://ipfs.io/ipfs/QmXoy...).
hash(CID) must be present.- The value must not look like an HTTP(S) URL (use URL storage for gateway URLs).
- The value must not look like a file path.
- Required:
ipfsGateway– base URL of the IPFS HTTP gateway (e.g.https://ipfs.io).
Files are identified by an Arweave transaction ID and fetched via an Arweave gateway.
{
"type": "arweave",
"transactionId": "abc123..."
}| Field | Required | Description |
|---|---|---|
type |
Yes | Must be "arweave" |
transactionId |
Yes | Arweave transaction ID |
The node builds the download URL as: {arweaveGateway}/{transactionId}.
transactionIdmust be present.- The value must not look like an HTTP(S) URL (use URL storage for direct URLs).
- The value must not look like a file path.
- Required:
arweaveGateway– base URL of the Arweave gateway (e.g.https://arweave.net).
Files are stored in S3-compatible object storage. The node uses the AWS SDK and works with Amazon S3, Ceph, MinIO, DigitalOcean Spaces, and other S3-compatible services. Credentials and endpoint are provided on the file object; no node-level S3 config is required.
{
"type": "s3",
"s3Access": {
"endpoint": "https://s3.amazonaws.com",
"region": "us-east-1",
"bucket": "my-bucket",
"objectKey": "path/to/file.zip",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}| Field | Required | Description |
|---|---|---|
type |
Yes | Must be "s3" |
s3Access |
Yes | Object with endpoint, bucket, object key, and credentials (see below). |
s3Access fields:
| Field | Required | Description |
|---|---|---|
endpoint |
Yes | S3 endpoint URL (e.g. https://s3.amazonaws.com, https://nyc3.digitaloceanspaces.com, or https://my-ceph.example.com) |
bucket |
Yes | Bucket name |
objectKey |
Yes | Object key (path within the bucket) |
accessKeyId |
Yes | Access key for the S3-compatible API |
secretAccessKey |
Yes | Secret key for the S3-compatible API |
region |
No | Region (e.g. us-east-1). Optional; defaults to us-east-1 if omitted. Some backends (e.g. Ceph) may ignore it. |
forcePathStyle |
No | If true, use path-style addressing (e.g. endpoint/bucket/key). Required for some S3-compatible services (e.g. MinIO). Default false (virtual-host style, e.g. bucket.endpoint/key, standard for AWS S3). |
s3Accessmust be present.- Within
s3Access,bucket,objectKey,endpoint,accessKeyId, andsecretAccessKeymust be present and non-empty. regionandforcePathStyleare optional; when provided they are used when creating the S3 client.
- None. All S3 connection details (endpoint, credentials, bucket, key) come from the file object’s
s3Access.
Files are fetched or uploaded via FTP or FTPS. The node uses a single url field containing the full FTP(S) URL (including optional credentials). Functionality mirrors URL storage: stream download, file metadata (size; content-type is application/octet-stream), and upload via STOR.
{
"type": "ftp",
"url": "ftp://user:password@ftp.example.com:21/path/to/file.zip"
}For FTPS (TLS):
{
"type": "ftp",
"url": "ftps://user:password@secure.example.com:990/pub/data.csv"
}| Field | Required | Description |
|---|---|---|
type |
Yes | Must be "ftp" |
url |
Yes | Full FTP or FTPS URL. Supports ftp:// and ftps://. May include credentials as ftp://user:password@host:port/path. Default port is 21 for FTP and 990 for FTPS. |
urlmust be present.- URL must use protocol
ftp://orftps://. - If the node config defines
unsafeURLs(list of regex patterns), any URL matching a pattern is rejected.
- Optional:
unsafeURLs– array of regex strings; URLs matching any of them are considered unsafe and rejected (same as URL storage).
FTPStorage supports upload(filename, stream). If the file object’s url ends with /, the filename is appended to form the remote path; otherwise the URL is used as the full target path. Uses FTP STOR command.
- URL: flexible HTTP(S) endpoints; optional custom headers and
unsafeURLsfiltering. - IPFS: CID-based; requires
ipfsGatewayin config. - Arweave: transaction-ID-based; requires
arweaveGatewayin config. - S3: S3-compatible object storage (AWS, Ceph, MinIO, etc.); credentials and endpoint in the file object;
regionoptional (defaults tous-east-1). - FTP: FTP/FTPS URLs; stream download, metadata (size), and upload via STOR; optional
unsafeURLsfiltering.
The storage implementation lives under src/components/storage/. The node selects the backend from the file object’s type (case-insensitive) and validates the shape and config before fetching or streaming the file.