storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/README.md (about) 1 # MinIO Quickstart Guide 2 [](https://slack.min.io) [](https://hub.docker.com/r/minio/minio/) 3 4 [](https://min.io) 5 6 MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads. 7 8 This README provides quickstart instructions on running MinIO on baremetal hardware, including Docker-based installations. For Kubernetes environments, 9 use the [MinIO Kubernetes Operator](https://github.com/minio/operator/blob/master/README.md). 10 11 # Docker Installation 12 13 Use the following commands to run a standalone MinIO server on a Docker container. 14 15 Standalone MinIO servers are best suited for early development and evaluation. Certain features such as versioning, object locking, and bucket replication 16 require distributed deploying MinIO with Erasure Coding. For extended development and production, deploy MinIO with Erasure Coding enabled - specifically, 17 with a *minimum* of 4 drives per MinIO server. See [MinIO Erasure Code Quickstart Guide](https://docs.min.io/docs/minio-erasure-code-quickstart-guide.html) 18 for more complete documentation. 19 20 ## Stable 21 22 Run the following command to run the latest stable image of MinIO on a Docker container using an ephemeral data volume: 23 24 ```sh 25 docker run -p 9000:9000 minio/minio server /data 26 ``` 27 28 The MinIO deployment starts using default root credentials `minioadmin:minioadmin`. You can test the deployment using the MinIO Browser, an embedded 29 web-based object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the 30 root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server. 31 32 You can also connect using any S3-compatible tool, such as the MinIO Client `mc` commandline tool. See 33 [Test using MinIO Client `mc`](#test-using-minio-client-mc) for more information on using the `mc` commandline tool. For application developers, 34 see https://docs.min.io/docs/ and click **MINIO SDKS** in the navigation to view MinIO SDKs for supported languages. 35 36 37 > NOTE: To deploy MinIO on Docker with persistent storage, you must map local persistent directories from the host OS to the container using the 38 `docker -v` option. For example, `-v /mnt/data:/data` maps the host OS drive at `/mnt/data` to `/data` on the Docker container. 39 40 ## Edge 41 42 Run the following command to run the bleeding-edge image of MinIO on a Docker container using an ephemeral data volume: 43 44 ``` 45 docker run -p 9000:9000 minio/minio:edge server /data 46 ``` 47 48 The MinIO deployment starts using default root credentials `minioadmin:minioadmin`. You can test the deployment using the MinIO Browser, an embedded 49 web-based object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the 50 root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server. 51 52 You can also connect using any S3-compatible tool, such as the MinIO Client `mc` commandline tool. See 53 [Test using MinIO Client `mc`](#test-using-minio-client-mc) for more information on using the `mc` commandline tool. For application developers, 54 see https://docs.min.io/docs/ and click **MINIO SDKS** in the navigation to view MinIO SDKs for supported languages. 55 56 57 > NOTE: To deploy MinIO on Docker with persistent storage, you must map local persistent directories from the host OS to the container using the 58 `docker -v` option. For example, `-v /mnt/data:/data` maps the host OS drive at `/mnt/data` to `/data` on the Docker container. 59 60 # macOS 61 62 Use the following commands to run a standalone MinIO server on macOS. 63 64 Standalone MinIO servers are best suited for early development and evaluation. Certain features such as versioning, object locking, and bucket replication 65 require distributed deploying MinIO with Erasure Coding. For extended development and production, deploy MinIO with Erasure Coding enabled - specifically, 66 with a *minimum* of 4 drives per MinIO server. See [MinIO Erasure Code Quickstart Guide](https://docs.min.io/docs/minio-erasure-code-quickstart-guide.html) 67 for more complete documentation. 68 69 ## Homebrew (recommended) 70 71 Run the following command to install the latest stable MinIO package using [Homebrew](https://brew.sh/). Replace ``/data`` with the path to the drive or directory in which you want MinIO to store data. 72 73 ```sh 74 brew install minio/stable/minio 75 minio server /data 76 ``` 77 78 > NOTE: If you previously installed minio using `brew install minio` then it is recommended that you reinstall minio from `minio/stable/minio` official repo instead. 79 80 ```sh 81 brew uninstall minio 82 brew install minio/stable/minio 83 ``` 84 85 The MinIO deployment starts using default root credentials `minioadmin:minioadmin`. You can test the deployment using the MinIO Browser, an embedded 86 web-based object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the 87 root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server. 88 89 You can also connect using any S3-compatible tool, such as the MinIO Client `mc` commandline tool. See 90 [Test using MinIO Client `mc`](#test-using-minio-client-mc) for more information on using the `mc` commandline tool. For application developers, 91 see https://docs.min.io/docs/ and click **MINIO SDKS** in the navigation to view MinIO SDKs for supported languages. 92 93 ## Binary Download 94 95 Use the following command to download and run a standalone MinIO server on macOS. Replace ``/data`` with the path to the drive or directory in which you want MinIO to store data. 96 97 ```sh 98 wget https://dl.min.io/server/minio/release/darwin-amd64/minio 99 chmod +x minio 100 ./minio server /data 101 ``` 102 103 The MinIO deployment starts using default root credentials `minioadmin:minioadmin`. You can test the deployment using the MinIO Browser, an embedded 104 web-based object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the 105 root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server. 106 107 You can also connect using any S3-compatible tool, such as the MinIO Client `mc` commandline tool. See 108 [Test using MinIO Client `mc`](#test-using-minio-client-mc) for more information on using the `mc` commandline tool. For application developers, 109 see https://docs.min.io/docs/ and click **MINIO SDKS** in the navigation to view MinIO SDKs for supported languages. 110 111 112 # GNU/Linux 113 114 Use the following command to run a standalone MinIO server on Linux hosts running 64-bit Intel/AMD architectures. Replace ``/data`` with the path to the drive or directory in which you want MinIO to store data. 115 116 ```sh 117 wget https://dl.min.io/server/minio/release/linux-amd64/minio 118 chmod +x minio 119 ./minio server /data 120 ``` 121 122 Replace ``/data`` with the path to the drive or directory in which you want MinIO to store data. 123 124 The following table lists supported architectures. Replace the `wget` URL with the architecture for your Linux host. 125 126 | Architecture | URL | 127 | -------- | ------ | 128 | 64-bit Intel/AMD | https://dl.min.io/server/minio/release/linux-amd64/minio | 129 | 64-bit ARM | https://dl.min.io/server/minio/release/linux-arm64/minio | 130 | 64-bit PowerPC LE (ppc64le) | https://dl.min.io/server/minio/release/linux-ppc64le/minio | 131 | IBM Z-Series (S390X) | https://dl.min.io/server/minio/release/linux-s390x/minio | 132 133 The MinIO deployment starts using default root credentials `minioadmin:minioadmin`. You can test the deployment using the MinIO Browser, an embedded 134 web-based object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the 135 root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server. 136 137 You can also connect using any S3-compatible tool, such as the MinIO Client `mc` commandline tool. See 138 [Test using MinIO Client `mc`](#test-using-minio-client-mc) for more information on using the `mc` commandline tool. For application developers, 139 see https://docs.min.io/docs/ and click **MINIO SDKS** in the navigation to view MinIO SDKs for supported languages. 140 141 142 > NOTE: Standalone MinIO servers are best suited for early development and evaluation. Certain features such as versioning, object locking, and bucket replication 143 require distributed deploying MinIO with Erasure Coding. For extended development and production, deploy MinIO with Erasure Coding enabled - specifically, 144 with a *minimum* of 4 drives per MinIO server. See [MinIO Erasure Code Quickstart Guide](https://docs.min.io/docs/minio-erasure-code-quickstart-guide.html) 145 for more complete documentation. 146 147 # Microsoft Windows 148 149 To run MinIO on 64-bit Windows hosts, download the MinIO executable from the following URL: 150 151 ```sh 152 https://dl.min.io/server/minio/release/windows-amd64/minio.exe 153 ``` 154 155 Use the following command to run a standalone MinIO server on the Windows host. Replace ``D:\`` with the path to the drive or directory in which you want MinIO to store data. You must change the terminal or powershell directory to the location of the ``minio.exe`` executable, *or* add the path to that directory to the system ``$PATH``: 156 157 ```sh 158 minio.exe server D:\ 159 ``` 160 161 The MinIO deployment starts using default root credentials `minioadmin:minioadmin`. You can test the deployment using the MinIO Browser, an embedded 162 web-based object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the 163 root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server. 164 165 You can also connect using any S3-compatible tool, such as the MinIO Client `mc` commandline tool. See 166 [Test using MinIO Client `mc`](#test-using-minio-client-mc) for more information on using the `mc` commandline tool. For application developers, 167 see https://docs.min.io/docs/ and click **MINIO SDKS** in the navigation to view MinIO SDKs for supported languages. 168 169 > NOTE: Standalone MinIO servers are best suited for early development and evaluation. Certain features such as versioning, object locking, and bucket replication 170 require distributed deploying MinIO with Erasure Coding. For extended development and production, deploy MinIO with Erasure Coding enabled - specifically, 171 with a *minimum* of 4 drives per MinIO server. See [MinIO Erasure Code Quickstart Guide](https://docs.min.io/docs/minio-erasure-code-quickstart-guide.html) 172 for more complete documentation. 173 174 # FreeBSD 175 176 MinIO does not provide an official FreeBSD binary. However, FreeBSD maintains an [upstream release](https://www.freshports.org/www/minio) using [pkg](https://github.com/freebsd/pkg): 177 178 ```sh 179 pkg install minio 180 sysrc minio_enable=yes 181 sysrc minio_disks=/home/user/Photos 182 service minio start 183 ``` 184 185 # Install from Source 186 187 Use the following commands to compile and run a standalone MinIO server from source. Source installation is only intended for developers and advanced users. If you do not have a working Golang environment, please follow [How to install Golang](https://golang.org/doc/install). Minimum version required is [go1.16](https://golang.org/dl/#stable) 188 189 ```sh 190 GO111MODULE=on go get github.com/minio/minio 191 ``` 192 193 The MinIO deployment starts using default root credentials `minioadmin:minioadmin`. You can test the deployment using the MinIO Browser, an embedded 194 web-based object browser built into MinIO Server. Point a web browser running on the host machine to http://127.0.0.1:9000 and log in with the 195 root credentials. You can use the Browser to create buckets, upload objects, and browse the contents of the MinIO server. 196 197 You can also connect using any S3-compatible tool, such as the MinIO Client `mc` commandline tool. See 198 [Test using MinIO Client `mc`](#test-using-minio-client-mc) for more information on using the `mc` commandline tool. For application developers, 199 see https://docs.min.io/docs/ and click **MINIO SDKS** in the navigation to view MinIO SDKs for supported languages. 200 201 202 > NOTE: Standalone MinIO servers are best suited for early development and evaluation. Certain features such as versioning, object locking, and bucket replication 203 require distributed deploying MinIO with Erasure Coding. For extended development and production, deploy MinIO with Erasure Coding enabled - specifically, 204 with a *minimum* of 4 drives per MinIO server. See [MinIO Erasure Code Quickstart Guide](https://docs.min.io/docs/minio-erasure-code-quickstart-guide.html) 205 for more complete documentation. 206 207 MinIO strongly recommends *against* using compiled-from-source MinIO servers for production environments. 208 209 # Deployment Recommendations 210 211 ## Allow port access for Firewalls 212 213 By default MinIO uses the port 9000 to listen for incoming connections. If your platform blocks the port by default, you may need to enable access to the port. 214 215 ### ufw 216 217 For hosts with ufw enabled (Debian based distros), you can use `ufw` command to allow traffic to specific ports. Use below command to allow access to port 9000 218 219 ```sh 220 ufw allow 9000 221 ``` 222 223 Below command enables all incoming traffic to ports ranging from 9000 to 9010. 224 225 ```sh 226 ufw allow 9000:9010/tcp 227 ``` 228 229 ### firewall-cmd 230 231 For hosts with firewall-cmd enabled (CentOS), you can use `firewall-cmd` command to allow traffic to specific ports. Use below commands to allow access to port 9000 232 233 ```sh 234 firewall-cmd --get-active-zones 235 ``` 236 237 This command gets the active zone(s). Now, apply port rules to the relevant zones returned above. For example if the zone is `public`, use 238 239 ```sh 240 firewall-cmd --zone=public --add-port=9000/tcp --permanent 241 ``` 242 243 Note that `permanent` makes sure the rules are persistent across firewall start, restart or reload. Finally reload the firewall for changes to take effect. 244 245 ```sh 246 firewall-cmd --reload 247 ``` 248 249 ### iptables 250 251 For hosts with iptables enabled (RHEL, CentOS, etc), you can use `iptables` command to enable all traffic coming to specific ports. Use below command to allow 252 access to port 9000 253 254 ```sh 255 iptables -A INPUT -p tcp --dport 9000 -j ACCEPT 256 service iptables restart 257 ``` 258 259 Below command enables all incoming traffic to ports ranging from 9000 to 9010. 260 261 ```sh 262 iptables -A INPUT -p tcp --dport 9000:9010 -j ACCEPT 263 service iptables restart 264 ``` 265 266 ## Pre-existing data 267 When deployed on a single drive, MinIO server lets clients access any pre-existing data in the data directory. For example, if MinIO is started with the command `minio server /mnt/data`, any pre-existing data in the `/mnt/data` directory would be accessible to the clients. 268 269 The above statement is also valid for all gateway backends. 270 271 # Test MinIO Connectivity 272 273 ## Test using MinIO Browser 274 MinIO Server comes with an embedded web based object browser. Point your web browser to http://127.0.0.1:9000 to ensure your server has started successfully. 275 276  277 278 ## Test using MinIO Client `mc` 279 `mc` provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff etc. It supports filesystems and Amazon S3 compatible cloud storage services. Follow the MinIO Client [Quickstart Guide](https://docs.min.io/docs/minio-client-quickstart-guide) for further instructions. 280 281 # Upgrading MinIO 282 MinIO server supports rolling upgrades, i.e. you can update one MinIO instance at a time in a distributed cluster. This allows upgrades with no downtime. Upgrades can be done manually by replacing the binary with the latest release and restarting all servers in a rolling fashion. However, we recommend all our users to use [`mc admin update`](https://docs.min.io/docs/minio-admin-complete-guide.html#update) from the client. This will update all the nodes in the cluster simultaneously and restart them, as shown in the following command from the MinIO client (mc): 283 284 ``` 285 mc admin update <minio alias, e.g., myminio> 286 ``` 287 288 > NOTE: some releases might not allow rolling upgrades, this is always called out in the release notes and it is generally advised to read release notes before upgrading. In such a situation `mc admin update` is the recommended upgrading mechanism to upgrade all servers at once. 289 290 ## Important things to remember during MinIO upgrades 291 292 - `mc admin update` will only work if the user running MinIO has write access to the parent directory where the binary is located, for example if the current binary is at `/usr/local/bin/minio`, you would need write access to `/usr/local/bin`. 293 - `mc admin update` updates and restarts all servers simultaneously, applications would retry and continue their respective operations upon upgrade. 294 - `mc admin update` is disabled in kubernetes/container environments, container environments provide their own mechanisms to rollout of updates. 295 - In the case of federated setups `mc admin update` should be run against each cluster individually. Avoid updating `mc` to any new releases until all clusters have been successfully updated. 296 - If using `kes` as KMS with MinIO, just replace the binary and restart `kes` more information about `kes` can be found [here](https://github.com/minio/kes/wiki) 297 - If using Vault as KMS with MinIO, ensure you have followed the Vault upgrade procedure outlined here: https://www.vaultproject.io/docs/upgrading/index.html 298 - If using etcd with MinIO for the federation, ensure you have followed the etcd upgrade procedure outlined here: https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrading-etcd.md 299 300 # Explore Further 301 - [MinIO Erasure Code QuickStart Guide](https://docs.min.io/docs/minio-erasure-code-quickstart-guide) 302 - [Use `mc` with MinIO Server](https://docs.min.io/docs/minio-client-quickstart-guide) 303 - [Use `aws-cli` with MinIO Server](https://docs.min.io/docs/aws-cli-with-minio) 304 - [Use `s3cmd` with MinIO Server](https://docs.min.io/docs/s3cmd-with-minio) 305 - [Use `minio-go` SDK with MinIO Server](https://docs.min.io/docs/golang-client-quickstart-guide) 306 - [The MinIO documentation website](https://docs.min.io) 307 308 # Contribute to MinIO Project 309 Please follow MinIO [Contributor's Guide](https://github.com/minio/minio/blob/master/CONTRIBUTING.md) 310 311 # License 312 Use of MinIO is governed by the Apache 2.0 License found at [LICENSE](https://github.com/minio/minio/blob/master/LICENSE).