Skip to content

valentinnavalos/minecraft-server-manager

Repository files navigation

Minecraft Server Manager

A cross-platform desktop application for creating, configuring, and managing Minecraft servers on your local machine. Perfect for playing with friends over LAN or internet.

Version License

Features

Server Management

  • Create multiple Minecraft server instances
  • Download official Minecraft server versions
  • Start, stop, and restart servers with one click
  • Real-time server status monitoring
  • Delete unwanted servers

Console & Monitoring

  • Live server console output streaming
  • Send commands directly to server
  • Real-time resource monitoring (CPU, RAM usage)
  • Player count display
  • Server uptime tracking

Network & Connectivity

  • Automatic detection of local IP addresses
  • Public IP detection
  • VPN interface detection (Hamachi, ZeroTier, Radmin)
  • Display all connection methods (LAN, Internet, VPN)
  • Port availability checking
  • Connection testing functionality
  • One-click copy-to-clipboard for server addresses

Configuration

  • Easy-to-use server.properties editor
  • Configure game mode, difficulty, max players
  • Set PvP, view distance, and world settings
  • Java memory allocation (Xms/Xmx) settings
  • No need to edit text files manually

Setup Guides

  • Built-in port forwarding guides
  • Step-by-step Hamachi VPN setup
  • ZeroTier VPN configuration
  • Windows Firewall setup instructions
  • Comprehensive troubleshooting guide

Technology Stack

  • Frontend: Electron + React + TypeScript
  • UI Framework: Tailwind CSS
  • Backend: Node.js (Electron main process)
  • Database: SQLite
  • Build Tool: Webpack

Prerequisites

  • Node.js: v18 or higher
  • Java: Version 17 or higher (required to run Minecraft servers)
  • Operating System: Windows, macOS, or Linux
  • npm: Comes with Node.js (or use yarn/pnpm)

Installing Java

Download Java 17+ from Adoptium.net

Installation

Development Setup

Follow these steps to set up the project for local development:

  1. Clone the repository git clone cd minecraft-server-manager 2. Install dependencies npm install This will install all project dependencies including Electron, React, and build tools.

  2. Build the main process npm run build:main This compiles the Electron main process TypeScript code.

  3. Start the development server npm run dev This will:

    • Start the webpack dev server for the React frontend (on port 8080)
    • Build and launch Electron in development mode
    • Enable hot module replacement for faster development
  4. Development workflow

    • The renderer process (React UI) runs on http://localhost:8080 with hot reload
    • The main process requires rebuilding when changed: npm run build:main
    • For faster iteration, you can run npm run build:main in a separate terminal while npm run dev is running

Note: Make sure Java 17+ is installed and accessible in your PATH, as it's required for running Minecraft servers.

Production Build

Follow these steps to create a production-ready distributable application:

  1. Ensure prerequisites are met

    • Node.js v18+ installed
    • All dependencies installed (npm install)
    • Java 17+ installed (for end users to run servers)
  2. Build the application

    npm run build This builds both the main process and renderer process for production:

    • Compiles TypeScript to JavaScript
    • Optimizes and bundles the React frontend
    • Outputs to the dist/ directory
  3. Package the application

    npm run package This uses electron-builder to create platform-specific distributables:

    • macOS: Creates .dmg and .zip files in release/mac-arm64/ or release/mac/
    • Windows: Creates .exe installer and portable version in release/win-unpacked/
    • Linux: Creates .AppImage and .deb packages in release/linux-unpacked/
  4. Test the production buildsh npm start This runs the built application from the dist/ directory to verify everything works correctly before packaging.

  5. Distribution files

    • Built files are located in the release/ directory
    • Each platform has its own subdirectory with the packaged application
    • The .dmg (macOS), .exe (Windows), or .AppImage (Linux) files can be distributed to users

Platform-specific notes:

  • macOS: May require code signing for distribution outside the App Store
  • Windows: NSIS installer requires additional configuration for custom installers
  • Linux: AppImage is portable and doesn't require installation

Project Structure

minecraft-server-manager/
├── src/
│   ├── main/                  # Electron main process
│   │   ├── index.ts          # Main entry point
│   │   ├── preload.ts        # Preload script
│   │   ├── ipc/              # IPC handlers
│   │   │   └── handlers.ts
│   │   ├── services/
│   │   │   ├── ServerManager.ts      # Server lifecycle
│   │   │   ├── NetworkManager.ts     # IP & network detection
│   │   │   ├── ConfigManager.ts      # server.properties
│   │   │   ├── ResourceMonitor.ts    # CPU/RAM monitoring
│   │   │   ├── ConnectionTester.ts   # Port testing
│   │   │   └── FirewallManager.ts    # Firewall helpers
│   │   └── utils/
│   │       └── database.ts           # SQLite database
│   │
│   ├── renderer/              # React frontend
│   │   ├── App.tsx
│   │   ├── index.tsx
│   │   ├── components/
│   │   │   ├── ServerCard.tsx
│   │   │   ├── ServerList.tsx
│   │   │   ├── CreateServerWizard.tsx
│   │   │   ├── ServerConsole.tsx
│   │   │   ├── ConnectionInfo.tsx
│   │   │   ├── ServerConfig.tsx
│   │   │   └── SetupGuides.tsx
│   │   ├── pages/
│   │   │   ├── Dashboard.tsx
│   │   │   ├── ServerDetail.tsx
│   │   │   └── Settings.tsx
│   │   └── styles/
│   │       └── globals.css
│   │
│   └── shared/
│       ├── types.ts          # TypeScript interfaces
│       └── constants.ts
│
├── servers/                   # Server instances storage
├── database/                  # SQLite database
├── webpack.main.config.js
├── webpack.renderer.config.js
├── tailwind.config.js
├── tsconfig.json
└── package.json

Usage Guide

Creating Your First Server

  1. Launch the application
  2. Click "Create New Server" on the dashboard
  3. Follow the 3-step wizard:
    • Step 1: Choose server name and Minecraft version
    • Step 2: Configure port, max players, difficulty, game mode
    • Step 3: Set Java memory allocation (RAM)
  4. Click "Create Server" to download and set up

Starting a Server

  1. Find your server on the dashboard
  2. Click "Start" button
  3. Wait for the server to finish starting (status changes to "Running")
  4. Click "View Console" to see server output

Connecting Players

  1. Open your server detail page
  2. Go to "Connection Info" tab
  3. Share the appropriate address with players:
    • LAN: Local network address (same WiFi)
    • Internet: Public IP (requires port forwarding)
    • VPN: Hamachi or ZeroTier address (easiest for internet play)
  4. Check the "Setup Guides" tab for detailed instructions

Port Forwarding (For Internet Access)

  1. Go to "Setup Guides" tab
  2. Follow the "Port Forwarding" guide
  3. Forward your server's port (default: 25565)
  4. Share your public IP:port with friends

Using VPN (Easier Alternative)

Hamachi (Up to 5 players free):

  1. Download Hamachi from vpn.net
  2. Create a network
  3. Friends join your network
  4. Share your Hamachi IP

ZeroTier (Up to 25 devices free):

  1. Create account at my.zerotier.com
  2. Create a network
  3. Friends install ZeroTier and join
  4. Authorize devices on website
  5. Share your ZeroTier IP

Configuration

Server Properties

Edit via the Configuration tab:

  • Game mode (Survival, Creative, Adventure, Spectator)
  • Difficulty (Peaceful, Easy, Normal, Hard)
  • Max players
  • View distance
  • PvP enabled/disabled
  • World settings (seed, type, structures)

Java Memory

Allocate more RAM for better performance:

  • Xms: Minimum RAM (starting allocation)
  • Xmx: Maximum RAM (can grow to this amount)

Recommended:

  • 1-5 players: 2GB
  • 5-10 players: 4GB
  • 10+ players: 8GB+

Troubleshooting

Cannot Connect to Server

  • Verify server is running (check Console tab)
  • Ensure correct IP and port
  • Check firewall settings
  • Try localhost:25565 from host computer first

Server Keeps Crashing

  • Increase allocated RAM
  • Check Console for error messages
  • Verify Java 17+ is installed
  • Reduce view distance

High Lag

  • Allocate more RAM
  • Reduce view distance
  • Lower max players
  • Check CPU usage in server stats

Port Already in Use

  • Stop other applications using the port
  • Change server port in Configuration
  • Check if another server is already running

Security Considerations

  • Opening ports to the internet exposes your network
  • Use VPN services (Hamachi/ZeroTier) when possible
  • Enable whitelist in Configuration for trusted players only
  • Keep your server software updated
  • Don't share your public IP unnecessarily

Development

Scripts

  • npm run dev - Start development mode
  • npm run build:main - Build Electron main process
  • npm run build:renderer - Build React frontend
  • npm run build - Build everything
  • npm run package - Create distributable package
  • npm start - Start built application

Adding Features

The application uses a layered architecture:

  1. Services Layer (src/main/services/): Business logic
  2. IPC Layer (src/main/ipc/): Communication between processes
  3. UI Layer (src/renderer/): React components

To add a new feature:

  1. Create or modify service in src/main/services/
  2. Add IPC handler in src/main/ipc/handlers.ts
  3. Add frontend hook in src/main/preload.ts
  4. Use in React components via window.electronAPI

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Acknowledgments

  • Minecraft is a trademark of Mojang Studios
  • This is an unofficial tool not affiliated with Mojang or Microsoft
  • Server jar files are downloaded from official Mojang sources

Support

For issues, questions, or suggestions, please open an issue on GitHub.

Roadmap

Future features to consider:

  • Plugin/mod management
  • Automatic backups
  • Scheduled restarts
  • Multiple Java version support
  • Built-in server performance optimization
  • Whitelist/operator management UI
  • World management (backup, restore, delete)
  • Server templates/presets

Happy server hosting! 🎮

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published