Why Debian 9, PHP 7.0, and no frameworks. And how to set up HTTPS in 5 minutes.

Foreword for those who haven’t read the first article
Last time, I told the story of how I wanted to make a couple of pages for SAMBA and NFS, but ended up with a NAS control panel of 20+ pages. I named the project Mini Bucket.
Important: That version was a beta. Raw, with rough edges, but alive. Its goal was to demonstrate the concept. And people got interested. So, it needs to be polished.
Now – version 3.6.2. A ton of problems have been fixed, security has been added, a separate domain, forum, and wiki have appeared. Today, I’ll walk you through the installation step-by-step with screenshots.
But first – a quick summary of what has changed. Then – pure practice.
What’s Fixed in 3.6.2 (The Main Points)
Security: Critical Holes Closed
In the beta, worker files, cron scripts, temporary files, and logs were located in the web server zone. Technically, you could send a request to an executable file without authorization – no API key, no login/password.
Fixed: All critical files have been moved to /var/www/minib/, outside the website’s folder. The Apache configuration has been revised. Temporary files and logs are now inaccessible from the outside.
Logic and Bugs
-
The Host Manager (key rotation) no longer overwrites the host SN when making changes – rotation works correctly.
-
Disk partition creation has been fixed.
-
Cron jobs can now be viewed on any servers in the cluster. Added the ability to create your own scripts and run them on a schedule.
Databases
Previously, everything was stored in a single SQLite database. Under load, «database is locked» errors would appear.
Solution: Split the databases into different files + added a query queue. No more conflicts.
Project Organization: No Longer Just a Script, but an Ecosystem
Initially, the project lived on the subdomain mini-b.itp-corp.ru. But as things progressed – I allocated a separate domain.
And three important sections:
-
Community / Forum – Discuss bugs, features, share experiences.
-
Wiki – Because my vision for the panel might not be obvious to others. Populating it gradually.
-
Donations – If the project is useful and you want to say «thank you» with a deed.
For those who already have the beta installed: update via the Update section inside mini-b.
New installation – read on.
Installing Mini Bucket 3.6.2 (Step-by-Step with Screenshots)
I’ll answer the questions you’re about to ask right away
Why Debian 9?
Because I managed to install it on my Netgear Stora MS2000 with difficulty. And it’s not as resource-hungry as vanilla Ubuntu. The panel is optimized for old hardware – why would it need a modern distribution?
Why PHP 7.0?
That’s just how it turned out. Debian 9 uses it by default. And it works.
Why no framework? Why not Colplit with a bunch of stuff?
Because then it wouldn’t be Mini Bucket, but another heavy build. Frameworks are heavy. Our stack of PHP + JS + HTML is quite enough to accomplish all tasks.
Why is everything in English?
Not everything) Some Russian still appears in places. But honestly – the English-speaking market is larger. It’s the standard. Initially, the project was entirely in Russian – it was an eyesore.
Multilingual support with language packs is planned. But with this scope, the priority is clearly not that.
Now – the installation. Without further ado.
I won’t show how to install Debian. I assume that’s a basic thing for my audience.
I’ll be installing on a VM. You might have bare metal – the process is the same.
1. System Preparation and Running the Script
After installing the system, log into the console. Work as root.
bash
su -
Enter the root password.
Install wget (though it’s usually there by default, just in case):
bash
apt install -y wget
Download the pre-installation script:
bash
wget --no-check-certificate -O minib-install.sh "https://update.mini-bucket.ru/minib/downloads/install/minib-install.sh"
Why --no-check-certificate?
Wget complains about the Let’s Encrypt certificate. Skipping the check is normal for installation.
Make the script executable:
bash
chmod +x minib-install.sh
Run it:
bash
bash minib-install.sh

2. What the Installation Script Does (While Waiting)
I’ll briefly explain:
-
Installs all necessary packages for Mini Bucket to work: NFS, SMB, rsync, vsftpd, UFW, Apache, PHP 7.0, etc.
-
Creates the required directories and configs for the services.
-
Assigns permissions to some configs.
-
Makes changes to
sudoers:-
Allows
www-datato runsudo -
Disables sudo notifications so parsing doesn’t break.
-
-
Copies files to
/var/www, configures Apache, restarts services. -
Creates cron jobs.
You can download the full script from our website and examine its contents.
3. After Installation – First Login
The script will output the URL, login, and password.
Paste the URL into your browser. You’ll reach the login page.

Login: admin
Password: 1234
Yes, the password is super cryptographically strong. We’ll change it later.
Click «Login» – you’ll land on the installation check page.

Important: Errors may appear in the «System Services» section (Rsync and Firewall-UFW), as well as in the «Files and Configuration» section (Administrator configuration). These errors are not critical – they can be safely ignored.
The main thing is that all packages are installed. Scroll down, click Next.
4. Setup Wizard
The wizard starts. Accept the standard agreements.

If at least one person in their life reads them – I’ll be happy. That means my efforts weren’t in vain.
Next – checking read/write permissions for configs and databases.

Everything is fine – click Next.
5. Hostname (Important Point)
I will be using SSL. Therefore, the hostname is critical. You can set it via /etc/hosts, but it’s easier to set it right away.
I enter the FQDN hostname: minib.local

This works.
6. Key Generation
The following will be created:
-
SN (Serial Number / Host ID) – used for one «bucket» to recognize another.
-
API Key – needed for frontend and backend interaction (both locally and with remote servers).

Click «Generate Security Credentials».
7. Administrator Account
I leave the login as admin. I don’t provide an email. I enter my own password.

Click «Create account».
We see the coveted «Launch MiniB» button.

Click on it.
The test runs again. Click Next – we enter the control panel.

Possible glitch: Due to cache, metrics might not load. If the panel doesn’t respond for 5 seconds – just reload the page. We’ll fix this.
Initial Setup: Enabling HTTPS
Why is SSL mandatory?
Keys are transmitted in request headers. They don’t appear in the URL, but any Wireshark capturing packets will see your API key. So HTTPS is a necessity.
8. Configure the Host Manager
Go to «Host manager».

On our host, find the three dots (⋮) → select «Edit».

In the settings window, change the IP address to our FQDN name (minib.local).

This is necessary for the API to work correctly.
Leave the protocol as HTTP for now (we’ll return after issuing the certificate).
Click «Save».
9. Create a Self-Signed Certificate
Go to «Security» → «SSL Manager».

In the top right corner, click «Create» → «Self-Signed Certificate».

A certificate creation window will open.
If you have a purchased certificate or one from Let’s Encrypt – you can import it there as well.
Fill in:
-
Certificate Name –
MiniB_web -
Domain/CN –
minib.local(your FQDN) -
Valid Days –
365 -
Key Size –
2048 bits(larger makes no sense) -
Signature Algorithm – leave as default

Click «Create».

10. Enable HTTPS
Go to «System» → «Mini-B Settings».

We are interested in the «Enable HTTPS» toggle in the «HTTPS / SSL Configuration» block.
Turn it on.

New fields appear. Click «Select» to choose the certificate.

In the window that opens, select the created MiniB_web.

After filling, click «Apply & test config».

The settings are applied. You will see an error – this is normal.

The error means the interface is now working over HTTPS. That’s by design.
11. Final Step: DNS / hosts
Now, you need your FQDN name to point to the server’s IP address.
Options:
-
Set it in your DNS server (if you have one)
-
Set it in your router
-
Or in the
hostsfile on the computer you are connecting from
For Windows: C:\Windows\System32\drivers\etc\hosts
For Linux/Mac: /etc/hosts
Add the line:
text
192.168.x.x minib.local
Now, in your browser, enter:
text
https://your-name:port
The browser will show a warning about an untrusted certificate – accept it.
Log in. Go back to «Host manager» → «Edit» our host → switch the protocol to HTTPS.

Click «Save».
12. Final Touch (Recommendation)
It’s better to go into SSL Manager, download the created certificate, and install it into your system (into the root certificate authorities). Then the browser will stop complaining.
Done. What’s Next?
Mini Bucket 3.6.2 is installed, working over HTTPS. Now you can:
-
Configure disks and RAID
-
Create SMB/NFS shares
-
Connect other servers via key rotation
-
Use the file manager, cron, firewall
In future articles, I’ll show the step-by-step configuration of each module – with my own comments: why I do it this way and not another, what pitfalls to expect, how to avoid them.
P.S. Feedback
The project lives and grows thanks to your ideas and bug reports.
-
Forum / Community – for ideas and questions.
-
Wiki – helps if my vision doesn’t match yours.
-
Donations – support development.
And remember: Mini Bucket is not another framework-based build. It’s a lightweight panel for old hardware, using pure PHP, JS, and HTML. And it works.
Links:
P.S. Screenshots might show different versions or names, but I tried to align everything. Otherwise, I already have a whole Instagram of screenshots on my computer.
ссылка на оригинал статьи https://habr.com/ru/articles/1044022/