Get a Quote   (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode

S3

  4 minute read.

Last Modified 2022-01-14 16:26 EST

S3 allows you to connect to TrueNAS from a networked client system with the Minio Browser, s3cmd, or S3 Browser.

S3 is an object storage protocol that many major cloud providers like Amazon Web Services™ use. On TrueNAS, the service is another way to store files and can be viewed with a web browser. Because S3 is the de facto standard for cloud-based storage, setting up an S3 service allows organizations or online application developers to use TrueNAS to replace or archive expensive cloud storage.

Setting up the S3 service

Go to the Services page and find the S3 entry.

ServicesS3Enable

Click the toggle to start or stop the service. Setting Start Automatically starts the service when TrueNAS boots.

Click the to configure the service.

ServicesS3Options

S3 Configuration Options

NameDescription
IP AddressEnter the IP address that runs the S3 service. 0.0.0.0 tells the server to listen on all IPv4 addresses. :: allows the same for any IPv6 address. Select the TrueNAS IP address to constrain it to a specific network.
PortEnter a static port for the MinIO web console. Default is 9001.
Console PortEnter the TCP port that provides the S3 service.
Access KeyEnter the S3 access ID. See Access keys for more information.
Secret KeyEnter the S3 secret access key. See Access keys for more information.
DiskBrowse to a directory to define the S3 filesystem path.
Enable BrowserEnables the S3 service web UI. Access the MinIO web UI by entering the IP address and port number separated by a colon in the browser address bar. Example: 192.168.1.0:9000.
CertificateUse an SSL certificate created or imported in Credentials > Certificates for secure S3 connections.
TLS Server URIIf using an SSL certificate, enter the MinIO server’s proxy-able address

The IP address 0.0.0.0 allows the service to listen on any IPv4 address. :: allows the same for any IPv6 address. Select the TrueNAS IP address to constrain it to a specific network.

Select a clean dataset. MinIO manages files as objects and CANNOT mix them with other dataset files. You can create new datasets by going to Storage > Pools and clicking > Add Dataset.

Configure the rest of the options as needed in your environment. Make sure to start the service after saving any changes.

Minio Connections

When Enable Browser is set, test access to the Minio Browser by opening a web browser and typing the TrueNAS IP address with the TCP port. The network firewall must let the Port through to create buckets and upload files. For example: https://192.168.0.3:9000.

MinIO supports several connection and use methods:

Linux or macOS users must have the s3cmd service installed before beginning this setup. On Windows, users can also refer to S3Express for a similar command-line experience.

Ubuntu or other Linux distributions can access the configuration by running s3cmd --configure to walk through critical settings.

Enter the specified access key and the secret key. Under the S3 Endpoint, enter the TrueNAS IP address followed by TCP port, and reply N to the DNS-style bucket+hostname.

Save the file. On Linux, the default is in the home directory ~/.s3cfg.

If the connection has any issues, open .s3cfg again to troubleshoot. In Ubuntu, use nano .s3cfg or vi .s3cfg or gedit .s3cfg depending on the preferred text editor. For other operating systems, .s3cfg file location and editing tools may vary.

Scroll down to the host_bucket area and ensure the configuration has removed the %(bucket)s. portion and the address points to the IP_address:TCP_port for the system.

Correct Example

host_base = `192.168.123.207:9000`
host_bucket = `192.168.123.207:9000`

Incorrect Example

host_base = `192.168.123.207`
host_bucket = `%(bucket)s.192.168.123.207`

Poll the buckets using s3cmd ls to see the buckets created with the Minio Browser.

For more information on using Minio with s3cmd, see https://docs.minio.io/docs/s3cmd-with-minio.html and https://s3tools.org/s3cmd.

The Windows PC S3 Browser is another convenient way to connect to the Minio S3 from TrueNAS.

To set it up, first install the S3 Browser.

After installation completes, add a new account.

AmazonS3NewAccount

In the settings, select S3 Compatible Storage as the Account Type, then enter the Minio access point similar to the s3cmd setup (TrueNAS_IP_address:9000 or other port if set differently). Select the SSL settings appropriate for the particular setup. The S3 Browser assumes SSL by default, but it may be unset for a LAN attached session.

AmazonS3EditAccount

It is possible to access, create new buckets, or upload files to created buckets.

AmazonS3Browser