Giter Site home page Giter Site logo

one-click-spigot's Introduction

Minecraft Spigot Server Setup Script

This script automates the setup of a Minecraft Spigot server on a Linux machine. It ensures that all necessary dependencies are installed, checks Java version, downloads and builds the specified Spigot version, and configures the server properties based on user input.

Features

  • Automatically installs required dependencies including sudo, git, wget, screen, and Zulu Java 21 if not present.
  • Prompts the user to enter the Spigot version, game mode, difficulty, and MOTD.
  • Downloads and builds the specified Spigot version using BuildTools.
  • Automatically accepts the EULA.
  • Configures server.properties based on user input.
  • Runs the Minecraft server in a screen session to ensure it continues running after SSH disconnection.

Prerequisites

  • A Linux-based server with root (or sudo) access.

Usage

  1. Download the script:

    wget https://raw.githubusercontent.com/Fkstone/One-click-Spigot/main/setup_minecraft_server.sh
  2. Make the script executable:

    chmod +x setup_minecraft_server.sh
  3. Run the script:

    ./setup_minecraft_server.sh
  4. Follow the prompts to configure your server:

    The script will ask you to enter:

    • The Spigot version you want to install (default: 1.20.1)
    • The game mode (default: survival)
    • The difficulty (default: normal)
    • The MOTD (default: A Minecraft Server)

Example

Here is an example of running the script:

./setup_minecraft_server.sh

You will see prompts like:

Enter the Spigot version you want to install [1.20.1]: 1.20.1
Enter the game mode (survival/creative/adventure/spectator) [survival]: survival
Enter the difficulty (peaceful/easy/normal/hard) [normal]: normal
Enter the MOTD for your server [A Minecraft Server]: My Awesome Server

After answering the prompts, the script will proceed to:

  1. Install dependencies.
  2. Download and build the specified Spigot version.
  3. Configure the server.
  4. Start the server in a screen session.

Finding Your Server

After the script completes, your Minecraft server will be running and accessible at:

<your-server-ip>:25565

Replace <your-server-ip> with the actual IP address of your server.

Managing the Server

Finding the screen Session

To find the screen session running your Minecraft server, you can list all screen sessions with:

screen -ls

You should see a session named minecraft_server. To reattach to this session, use:

screen -r minecraft_server

Stopping the Server

To stop the Minecraft server gracefully, reattach to the screen session and then run:

stop

Detaching from the screen Session

To detach from the screen session without stopping the server, press Ctrl + A followed by D.

Restarting the Server

If you need to restart the server (for example, after installing plugins):

  1. Stop the server gracefully by reattaching to the screen session and running stop.

  2. Detach from the screen session.

  3. Start the server again in a new screen session:

    screen -dmS minecraft_server java -jar /path/to/spigot.jar nogui

    Replace /path/to/spigot.jar with the actual path to your spigot.jar file, typically located in the minecraft_server directory.

Notes

  • Ensure you have adequate permissions to install software and run scripts on your server.
  • The script will automatically attach to the screen session running the Minecraft server. To detach from the session, press Ctrl + A followed by D. To reattach, use screen -r minecraft_server.

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Acknowledgements

  • SpigotMC for providing the Spigot server software.
  • Azul Systems for providing Zulu Java distributions.

one-click-spigot's People

Contributors

fkstone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.