MineOS is a powerful, lightweight, web-based interface designed to simplify the deployment and management of Minecraft servers. By self-hosting MineOS, you gain full control over your server setup, secure your data, and customize it to fit your unique needs. This guide walks you through the entire process, from installation and configuration to logging, backups, and leveraging its advanced features.
Installing MineOS
π¦ Docker/Docker Compose Setup
Using Docker is the fastest and most flexible way to deploy MineOS. Below is a docker-compose.yml
file configuration to get started.
version: '3.8'
services:
mineos:
image: hexparrot/mineos
container_name: mineos
ports:
- "8443:8443" # Web UI
volumes:
- ./mineos-data:/var/games/minecraft # Persistent data storage
- ./mineos-config:/etc/mineos # Configuration files
restart: unless-stopped
Save the file as docker-compose.yml
and run the following commands to deploy MineOS:
mkdir ~/mineos && cd ~/mineos
## Save the docker-compose.yml file in this directory
nano docker-compose.yml
## Deploy the container
docker-compose up -d
## Check the container status after deployment
docker ps -a
With this setup, MineOS will run on https://<your-server-ip>:8443
. The persistent data is stored in the mineos-data
and mineos-config
directories.
π Manual Installation
If you prefer to install MineOS manually on a Linux server, follow these steps:
- Install required dependencies:
sudo apt update && sudo apt install -y git nodejs npm supervisor
- Clone the MineOS repository and set up the application:
git clone https://github.com/hexparrot/mineos-node.git /usr/games/minecraft
cd /usr/games/minecraft
npm install
- Configure and start the MineOS web server:
chmod +x service.js
sudo cp mineos.conf /etc/supervisor/conf.d/mineos.conf
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start mineos
MineOS will now be available at https://<your-server-ip>:8443
.
Configuring Nginx as a Reverse Proxy
π Nginx Configuration
To make MineOS accessible via a custom domain, configure Nginx as a reverse proxy using the code below:
sudo nano /etc/nginx/sites-available/mineos
Add the following server block:
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass https://127.0.0.1:8443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Enable the configuration and reload Nginx:
sudo ln -s /etc/nginx/sites-available/mineos /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
π SSL/TLS Setup
Secure your MineOS reverse proxy with a free Let's Encrypt SSL certificate:
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com
Automate certificate renewals with a cron job:
sudo crontab -e
## Add the following line:
0 0 * * * certbot renew --quiet
π οΈ Testing and Reloading Nginx
Verify your Nginx configuration file and reload the service after updates:
sudo nginx -t
sudo systemctl reload nginx
Logging and Debugging MineOS
ποΈ Enabling Debug Logs
To enable debug-level logging in MineOS, update the applicationβs settings:
nano /usr/games/minecraft/config.json
Set "log_level": "debug"
and save the file. Restart MineOS to apply changes:
sudo supervisorctl restart mineos
π Viewing Logs
For Docker-based installations, view logs using:
docker logs mineos
For manual installations, access logs in the following file:
tail -f /var/log/mineos.log
π οΈ Troubleshooting Common Issues
Use the logs to diagnose common errors, such as missing dependencies or configuration issues. For example, if ports are blocked:
sudo ufw allow 8443
sudo ufw reload
π€ Exporting Logs
To export logs for external analysis, compress them and send them to a remote system:
tar -czvf mineos-logs.tar.gz /var/log/mineos.log
scp mineos-logs.tar.gz user@remote-server:/path/to/logs
Backup and Restore
ποΈ File-Based Backups
Create backups of MineOS configuration and data directories:
tar -czvf mineos-backup.tar.gz /var/games/minecraft /etc/mineos
π Database Backups
If your setup includes database usage, back up the database with:
mysqldump -u username -p mineos_db > mineos-db-backup.sql
π Automated Backup Scripts
Set up a cron job to automate backups:
crontab -e
## Add the following line:
0 3 * * * tar -czvf /backup/mineos-$(date +\%F).tar.gz /var/games/minecraft /etc/mineos
Updating and Upgrading MineOS
β¬οΈ Updating Docker Images
For Docker-based installations, update MineOS with:
docker-compose pull
docker-compose up -d
π οΈ Manual Updates
To update manual installations, pull the latest code and rebuild:
cd /usr/games/minecraft
git pull
npm install
sudo supervisorctl restart mineos
π Checking for Updates
Monitor the MineOS GitHub repository for release announcements or update notifications within the application.
Leveraging MineOSβs Unique Features
π§ Enabling APIs
Activate API endpoints by modifying the configuration file:
nano /usr/games/minecraft/config.json
Set "enable_api": true
. Test the API with:
curl -X GET https://<your-server-ip>:8443/api/endpoint
π Advanced Configurations
Explore advanced settings, such as enabling server auto-recovery:
nano /usr/games/minecraft/config.json
Set "auto_restart": true
for automated recovery after crashes.
Wrapping Up
By following this guide, youβve successfully deployed, configured, and secured MineOS for managing your Minecraft servers. Along the way, youβve learned how to back up data, analyze logs, and take advantage of advanced features. With MineOSβs flexibility and control, you can now provide a seamless hosting experience for your Minecraft community!