Skip to content

Add start_server.sh script for dedicated headless server support#47

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-46
Draft

Add start_server.sh script for dedicated headless server support#47
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-46

Conversation

Copy link
Contributor

Copilot AI commented Aug 30, 2025

This PR adds comprehensive dedicated server support for the cwagecraft modpack by implementing a start_server.sh script and updating the README with detailed server documentation.

Key Features

Automated Server Setup:

  • Downloads and installs Forge server (MC 1.20.1 + Forge 47.3.22) automatically
  • Intelligently filters and downloads only server-compatible mods (121 mods)
  • Excludes client-only mods (9 mods: shaders, overlays, UI enhancements)
  • Copies all mod configurations and datapacks to server
  • Configures server.properties with sensible defaults
  • Automatically accepts EULA for headless operation

Multiple Operation Modes:

./start_server.sh          # Setup and start server
./start_server.sh setup    # Setup only without starting
./start_server.sh test     # Analyze mod compatibility (dry run)
./start_server.sh clean    # Remove server files
./start_server.sh version  # Show version and status info

Robust Implementation:

  • Color-coded logging for better user experience
  • Retry logic for failed downloads with exponential backoff
  • Comprehensive error handling and user guidance
  • Optimized JVM arguments for server performance
  • Generates helper scripts for manual server restarts

Documentation Enhancements

Updated README.md with complete server administration guide:

  • Prerequisites: Java 17+ installation instructions for Ubuntu/Debian
  • System Requirements: RAM, CPU, storage, and network requirements
  • Setup Process: Step-by-step server installation guide
  • Firewall Configuration: UFW and iptables examples for port 25565
  • Server Management: Starting, stopping, monitoring commands
  • Troubleshooting: Common issues and solutions
  • Configuration: Customization options and backup procedures

Technical Details

The script intelligently processes the packwiz mod configuration files to:

  • Filter mods by side property ("both" and "server" included, "client" excluded)
  • Download mods directly from their source URLs with hash verification
  • Handle network failures gracefully with automatic retries
  • Provide detailed progress tracking and error reporting

Mod Analysis Results:

  • Server-compatible mods: 121 (all core tech, magic, and utility mods)
  • Client-only exclusions: 9 (Embeddium, Oculus, Light Overlay, Mouse Tweaks, etc.)

The implementation follows the project's architecture by leveraging the existing packwiz configuration rather than duplicating mod management logic.

Fixes #46.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.minecraftforge.net
    • Triggering command: curl -L -o server/forge-1.20.1-47.3.22-installer.jar REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 30, 2025 22:42
…ntation

Co-authored-by: cwage <190973+cwage@users.noreply.github.com>
…ocumentation

Co-authored-by: cwage <190973+cwage@users.noreply.github.com>
Copilot AI changed the title [WIP] Add start_server.sh script for dedicated headless server Add start_server.sh script for dedicated headless server support Aug 30, 2025
Copilot AI requested a review from cwage August 30, 2025 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add start_server.sh script for dedicated headless server

2 participants

Comments