Local MinIO server

The CANedge2 can connect to a local server via the local WiFi access point - ideal for e.g. stationary use cases. We recommend MinIO which is the #1 free open source S3 server.

Below we outline how to set up a local MinIO server in 5 minutes.


Setting up a local MinIO server

Below we outline how you can set up a local server on your Windows PC:

  1. Download the MinIO S3 server (Windows, Linux AMD64) [1]
  2. Open the command prompt in the folder, paste in the below and hit enter
SET MINIO_ROOT_USER=YourAccessKey
SET MINIO_ROOT_PASSWORD=YourSecretKey
minio.exe server C:\DATA --console-address ":9001"
  1. Open the ‘MinIO console’ by entering the console address in your browser (port 9001)
  2. Login to the console, go to “Buckets” and create a new bucket (default settings)
  3. You now have your endpoint, port (9000), bucket and credentials[2]
  4. Check if you can login via CANcloud on the host PC - and then another PC on the network

Example: CANedge2 MinIO S3 (local) server configuration

Below are example Configuration File details for a MinIO S3 server (editor view and JSON). Note that the region is not used for MinIO servers and can be set to us-east-1 for simplicity.

CANedge2 configuration details MinIO S3
"server": {
           "endpoint": "http://192.168.1.179",
           "port": 9000,
           "bucket": "bucket123",
           "region": "us-east-1",
           "request_style": 0,
           "accesskey": "YourAccessKey",
           "keyformat": 0,
           "secretkey": "YourSecretKey"
         }

Note

It is strongly recommended that the host PC/system is continuously active to ensure that the self-hosted MinIO S3 server is always available

Creating a bat file

If you later need to start this server again, you can optionally create a *.bat file with the lines from earlier, which you can then double-click to start your server. This bat file can also be setup to run when your machine boots.


Using the MinIO console

MinIO supports a powerful ‘console’ view that offers a graphical user interface for controlling your MinIO S3 settings and monitoring your data flow. This can be viewed as a ‘server management tool’, while CANcloud can be viewed as a ‘device & data management tool’.

MinIO S3 console

Using the MinIO client tool

The MinIO Client tool lets you perform various operations on your MinIO server via the command line. It provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff etc.

To get started with this tool, follow the below steps:

  1. Download the MinIO client
  2. Open your command line and enter the below (<ALIAS> is a nickname for your server) mc config host add <ALIAS> <YOUR-S3-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY>
  3. You can now e.g. create a bucket on your server as follows: mc mb <ALIAS>/<BUCKETNAME>

Example

Adding a HTTP trace for your MinIO server:

mc config host add myserver http://192.168.1.179:9000 YourAccessKey YourSecretKey
mc mb myserver/mybucket
mc admin trace myserver

For a full list of MinIO Client commands, see the MinIO Client quickstart.


[1]The download links are for release 2021-09-18T18-09-59Z, which we use as basis for this guide. For later releases and e.g. other Linux builds, see the release page.
[2]MinIO provides multiple IP endpoints - for running a local server setup, use the one corresponding to your router’s IP structure (see ‘Default Gateway’ when running ipconfig in the command prompt) - e.g. 192.168.0.178. The port should be 9000 when you log in via CANcloud or configure your CANedge2. Once you’re done testing, you can update your SecretKey e.g. via Norton’s password generator. You can then update it by using SET MINIO_ROOT_PASSWORD=YourNewSecretKey