---
title: "Working locally with MinIO"
canonical: "https://onesaitplatform.refined.site/space/DOCT/3592192005/Working%20locally%20with%20MinIO"
format: markdown
---
To work with MinIO from a local PC, either to correct a bug or to add new functionality, it is necessary to deploy:

- MiniIO server.
- Unprivileged MinIO user navigation console.
- MinIO Admin Console.
- NGINX to access MinIO by HTTPs protocol from the platform’s control panel.

From release 3.2.2, a docker-compose is provided to facilitate this task, so that it is possible to start everything with Docker in an integrated way.

The MinIO docker-compose is located within the platform source code at:

**onesait-cloud-platform/devops/buil-deploy/docker/modules/minio**

Before starting the MinIO services on the local PC, two things need to be configured:

- **etc/hosts **file to be able to access the MinIO services from the local control panel via HTTPs: Within the MinIO docker-compose, an NGINX is created by secure protocol on port 443. That NGINX is configured with a self-signed certificate for the hostname **[devonesaitplatform.com](http://devonesaitplatform.com)**, which will have to resolve to the IP of your own PC, which is where the MinIO services will be running. So, in the etc/hosts file, you have to create the following entries:
  - <IP_máquina_local> [devonesaitplatform.com](http://devonesaitplatform.com)
  - <IP_máquina_local> minio-console.[devonesaitplatform.com](http://devonesaitplatform.com)
  - <IP_máquina_local> minio-browser.[devonesaitplatform.com](http://devonesaitplatform.com)

![image](media://a7e16e5d-4e34-482e-be9c-240ccd7f7ded)


- Configure in NGINX the redirection to the control-panel of your local machine. To do this, we have to edit the file **onesait-cloud-platform/devops/buil-deploy/docker/modules/minio/nginx/conf.d/default.conf **and change the IP of the proxy_pass to the control panel to your own IP:

Once configured, you can to start and stop the MinIO services locally by:

- **docker-compose up -d**
- **docker-compose down**

![image](media://41770da7-e172-4741-bcf9-82d496f2067f)


Examining the docker-compose file, you can see that it has mapped the MinIO service to port 9000 of your machine, and the services of the MinIO consoles would be redirected from NGINX.

As of version 3.2.2, we provide the configured config-init to be able to use the docker-compose configuration. If a previous version of the platform is used, we need to edit the **Endpoint Modules **configuration, in the section corresponding to MinIO, to leave it as follows:

```
minio: 
      base: http://localhost:9000
      admin:
         internal: https://minio-console.devonesaitplatform.com
         external: https://minio-console.devonesaitplatform.com
      browser:
         internal: https://minio-browser.devonesaitplatform.com
         external: https://minio-browser.devonesaitplatform.com
      cookiedomain: devonesaitplatform.com

```

A known problem is that the first time MinIO is accessed from the control-panel, it does not load correctly, and the iframe where it should load, shows an error. This is due to the self-signed certificate. To correct this, you have to open the url **minio-browser.devonesaitplatform.com** in another browser window, and add the exception to the certificate. From that moment on, the screen will be loaded correctly.

> ℹ️ Once started, you have to enter the Controlpanel through the balancer: https://devonesaitplatform.com/controlpanel