minio
Install MinIO (S3-compatible object storage) as a system service, with a root login, optional Let's Encrypt SSL, and data stored in
/backup/s3
- Command:
/go/minio - Category: Storage
- Required option: None
- Output: Plain text (API URL, username, password)
- Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/minio installs MinIO, a self-hosted object storage server that speaks the Amazon S3 API, and runs it as a systemd service. It:
- creates a dedicated
miniosystem user with no login shell - downloads the latest MinIO server binary and the
mccommand-line client - writes the configuration file with your root username and password
- creates and starts the
minioservice, enabled at boot - requests a Let's Encrypt certificate for the hostname and gives it to MinIO
- optionally serves the API on port 443 (
-s y), which stops your web server
Objects are stored in /backup/s3.
[!WARNING] With
-s y, the command stops and disables Apache or Nginx so MinIO can use port 443. Every website on the server goes offline. See Port and web server behavior.
Quick start
# MinIO on port 3333 for a hostname that points to this server
/go/minio -h storage.example.com
Syntax
/go/minio [-u <username>] [-p <password>] [-h <hostname>] [-s y]
All options are optional. Run the command as root, because parts of it write to system folders without sudo.
An unrecognized option prints this usage line, but the install continues:
Usage: minio [-u] Username [-p] Password [-h] Hostname [-s] y/n (Enable SSL Certificate on Port 443)
Here -h means hostname, not help.
Options
| Option | Default | Notes |
|---|---|---|
-u <username> |
admin |
MinIO root user. At least 5 characters. |
-p <password> |
Random 16-character alphanumeric | MinIO root password. At least 8 characters. See Security. |
-h <hostname> |
Reverse DNS of the server's public IPv4 address | Used for the API address, the certificate, and virtual-host-style bucket URLs. Pass it explicitly if the server has no reverse DNS. |
-s y |
Off | Serve the API on port 443 and stop the web server. Any value other than y means off. |
Output
The command prints plain text, not JSON. The details are printed before the certificate is requested, so they appear even if SSL setup fails later.
API: https://storage.example.com:3333
Username: admin
Password: <password>
MinIO Config File: /usr/local/goadmio/minio/minio.conf
To restart MinIO Run: systemctl restart minio
| Outcome | What you get |
|---|---|
| Installed | The five lines above. |
| Username too short | Error: Username must be at least 5 characters, exit code 1. Nothing is installed. |
| Password too short | Error: Password must be at least 8 characters, exit code 1. Nothing is installed. |
| Unknown option | The usage line, then the install continues. |
Ports
| Mode | API port | Console port | URL shown |
|---|---|---|---|
| Default | 3333 |
3334 |
https://<hostname>:3333 |
-s y |
443 |
3334 |
https://<hostname> |
The web console always runs on port 3334. The command does not open firewall ports; use allow.
Security
[!WARNING] The password is stored in plain text in several places: the command output,
/usr/local/goadmio/minio/minio.conf,/usr/local/goadmio/minio/minio.sh, and the command log. If you pass-p, it is also visible in the process list and shell history, and it is written to/var/log/go/minio.logwith the rest of the command line. Prefer the random default.
Examples
# Default install on port 3333, random password
/go/minio -h storage.example.com
# Chosen root login
/go/minio -h storage.example.com -u storageadmin -p 'S3cureP@ssw0rd'
# Serve on port 443 (stops Apache or Nginx, so use only on a dedicated server)
/go/minio -h storage.example.com -s y
# Open the ports in the firewall afterwards
/go/allow 3333
/go/allow 3334
# Create a bucket after installing
/go/bucket --help
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Username must be at least 5 characters |
Username too short. | Pass a longer -u, or omit it to use admin. |
Password must be at least 8 characters |
Password too short. | Pass a longer -p, or omit it for a random one. |
| Usage line printed, install still ran | Unknown option. | Check the spelling against Options. |
| All websites went offline | The install ran with -s y, which stops the web server. |
Reinstall without -s y (this restarts the web server), or run MinIO on a separate server. |
| Hostname is empty or odd in the output | The server has no reverse DNS. | Reinstall with -h <hostname>. |
| Browser or client reports a certificate error | Certificate request failed, or it was not copied to MinIO. | See Certificates, then run systemctl restart minio. |
Unit minio.service not found |
The service file was not written where systemd looks. |
See Service file location. |
Cannot reach ports 3333 or 3334 |
Firewall. | Open the ports with allow. |
| Old password stopped working | The command was run again and generated a new one. | Read the current values in /usr/local/goadmio/minio/minio.conf. |
| Download step fails | The server cannot reach dl.min.io. |
Check outbound access and network settings, then run again. |
Details
Running it again
The command is safe to re-run, but it resets the installation:
- the
miniouser is deleted and recreated - the binary,
minio.conf,minio.sh, and the service file are overwritten - a new random password is generated unless you pass
-p
Stored objects in /backup/s3 are kept. Only /backup/s3 itself is re-owned, not its contents, so if the recreated user gets a different ID, run chown -R minio:minio /backup/s3.
Port and web server behavior
The script reads the operating system and web server from /usr/local/goadmio/linux/os.db and ws.db.
| Option | Web server action |
|---|---|
-s y |
Stopped and disabled (httpd or apache2, or nginx). |
Not y |
Enabled and restarted. |
Certificates
If /etc/letsencrypt/live/<hostname> does not exist, the command runs certbot --apache certonly for the hostname and copies fullchain.pem and privkey.pem to /usr/local/goadmio/minio/.minio/certs/ as public.crt and private.key. MinIO serves HTTPS when these files are present.
Things to know:
- The hostname's DNS must already point to this server, and port 80 must be reachable.
- The certificate is requested after the service starts, so restart MinIO if it does not pick it up.
- If a Let's Encrypt certificate for the hostname already exists (for example, the hostname is also a hosted domain), the request and the copy are both skipped. In that case, copy the files into the
certsfolder yourself, or useminiossl. - The request uses the Apache plugin regardless of the web server in use, so it can fail on Nginx servers.
Service file location
The script writes the unit file to /lib/systemd/var/go/minio.service. That is not a standard systemd unit directory (the usual one is /lib/systemd/system/), so systemctl enable minio may not find the unit unless that path is mapped on your servers. If the service is missing, check where the file ended up.
Files and folders
| Path | Purpose |
|---|---|
/usr/local/goadmio/minio/bin/minio |
MinIO server binary (latest linux-amd64 release, downloaded without a version pin or checksum check). |
/usr/local/goadmio/minio/minio.conf |
Environment file the service reads: volumes, listen addresses, domain, root user, root password. |
/usr/local/goadmio/minio/minio.sh |
Manual start script with the same credentials. The service does not use it. |
/usr/local/goadmio/minio/.minio/certs/ |
public.crt and private.key. |
/backup/s3 |
Object storage data. |
/etc/minio |
Contains the hostname. |
/usr/bin/mc |
MinIO client, installed only if missing. |
/var/log/go/minio.log |
Log of every run, including its arguments. |
MINIO_DOMAIN is set to the hostname, which enables virtual-host-style URLs such as bucket.storage.example.com. These need a wildcard DNS record pointing to the server.
What it does
flowchart TD
A["minio ..."] --> B["Log the command, apply defaults"]
B --> C{"Username 5+ and password 8+ characters?"}
C -- "No" --> X["Error, exit 1"]
C -- "Yes" --> D["Recreate minio user, folders, download binary"]
D --> E["Write minio.conf, minio.sh, service file"]
E --> F["Enable and restart minio"]
F --> G["Print API URL and login"]
G --> H{"Certificate for hostname exists?"}
H -- "No" --> I["Request certificate, copy to MinIO certs"]
H -- "Yes" --> J
I --> J{"-s y?"}
J -- "Yes" --> K["Stop and disable web server"]
J -- "No" --> L["Enable and restart web server"]
K --> M["Run cron, install mc if missing"]
L --> M
- Appends the command line to
/var/log/go/minio.log. - Reads the OS and web server type, and looks up the server's public IPv4 address.
- Parses the options and applies defaults.
- Validates the username (5+ characters) and password (8+ characters).
- Deletes and recreates the
miniouser, with no login shell and/usr/local/goadmio/minioas its home. - Creates
binand.minio/certsunder/usr/local/goadmio/minio, and/backup/s3. - Downloads the MinIO server binary and makes it executable.
- Writes
minio.shandminio.conf. - Sets
minioas the owner of the install folder and/backup/s3. - Writes the
systemdservice file, then enables and restartsminio. - Prints the API URL, username, password, and config file path.
- Requests a Let's Encrypt certificate and copies it to MinIO, if none exists for the hostname.
- Sets ownership of the
certsfolder and writes the hostname to/etc/minio. - Stops and disables the web server (
-s y), or enables and restarts it. - Runs
cron. - Installs the
mcclient to/usr/bin/mcif it is missing.
Buckets and access keys are not created during installation. Use bucket for that.
See also
| Command | Description |
|---|---|
miniossl |
Install an SSL certificate for MinIO |
bucket |
Create a MinIO bucket, make it public or private, or create an S3 access key |
s3 |
Mount an S3 bucket on a GoAdmio server |
maria |
Incremental MariaDB backup to S3 or via Rclone |
allow |
Open a TCP port in the server firewall |
firewall |
Install and configure the server firewall |