{"id":16377793,"url":"https://github.com/seyfahni/minecraft-server-scripts","last_synced_at":"2025-08-04T06:35:04.751Z","repository":{"id":51062087,"uuid":"280168086","full_name":"seyfahni/minecraft-server-scripts","owner":"seyfahni","description":"Linux shell scripts and systemd units to help with setting up and maintaining minecraft servers.","archived":false,"fork":false,"pushed_at":"2021-06-09T17:06:14.000Z","size":67,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T12:11:58.529Z","etag":null,"topics":["analysis","boot","downloader","log-analysis","maintenance","minecraft","minecraft-server","papermc","r","ramdisk","setup","shell","shell-script","shell-scripts","systemd","systemd-service","systemd-timer","systemd-unit"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seyfahni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-16T13:57:32.000Z","updated_at":"2024-05-29T16:07:55.000Z","dependencies_parsed_at":"2022-08-02T23:30:19.496Z","dependency_job_id":null,"html_url":"https://github.com/seyfahni/minecraft-server-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seyfahni/minecraft-server-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seyfahni%2Fminecraft-server-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seyfahni%2Fminecraft-server-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seyfahni%2Fminecraft-server-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seyfahni%2Fminecraft-server-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seyfahni","download_url":"https://codeload.github.com/seyfahni/minecraft-server-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seyfahni%2Fminecraft-server-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268658029,"owners_count":24285620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","boot","downloader","log-analysis","maintenance","minecraft","minecraft-server","papermc","r","ramdisk","setup","shell","shell-script","shell-scripts","systemd","systemd-service","systemd-timer","systemd-unit"],"created_at":"2024-10-11T03:43:59.304Z","updated_at":"2025-08-04T06:35:04.678Z","avatar_url":"https://github.com/seyfahni.png","language":"Shell","readme":"# Minecraft Server Scripts\n\nHelper scripts to do various things.\n\n## Disclaimer\n\n\u003e You should **never** trust these scripts, as with all scripts on the Internet. Double-check them and use them at your own risk.\n\n## Scripts\n\n- [Minecraft server as systemd service](#minecraft-server-as-systemd-service)\n- [Downloader](#downloader)\n- [World in Ramdisk](#world-in-ramdisk)\n- [Logfile analysis tools](#logfile-analysis-tools)\n\n## Minecraft server as systemd service\n\nRun your Minecraft server as non-privileged user inside a screen managed by systemd, so it starts on server-startup and\nstops on server shutdown. Allows as many servers as you like to run in parallel. `minecraftctl` offers starting and\nstopping servers, creating new instances and opening the terminal by multiple users in parallel.\n\n### Files\n\nInside folder `systemd/screen/minecraft/multiple`:\n- `minecraftctl`\n- `minecraft@.service`\n\n### Installation\n\n- Create a unix user and group `minecraft`\n  - You can use different a java version, working directory, user and group names; adjust `minecraft@.service`'s `Environment=\"JAVA_RUNTIME=\"`, `WorkingDirectory=`, `User=` and `Group=` settings\n- Put `minecraft@.service` into `/etc/systemd/system/`\n- Put `minecraftctl` into `/usr/local/bin/` and ensure it is executable by everyone and owned by root\n  - You can put `minecraftctl` somewhere else, but you then need to adjust the `SAFE_SELF` constant inside the script\n  - You need to set the same environment as defined in your service file; adjust `minecraftctl`'s `WORKING_DIRECTORY=`, `MINECRAFT_USER=` and `SYSTEMD_UNIT_NAME=`  and `SCREEN_NAME` constants accordingly\n- Create a sudoers entry to allow users or a group of your choice to execute `minecraftctl` with elevated permissions\n\n### Usage\n\n- `minecraftctl`: show help\n- `minecraftctl console \u003cserver-id\u003e`: open the console of the server with given id, Use `Ctrl` + `a` followed by `d` to close\n- `minecraftctl start \u003cserver-id\u003e`: start the server with given id\n- `minecraftctl stop \u003cserver-id\u003e`: stop the server with given id\n- `minecraftctl restart \u003cserver-id\u003e`: restart the server with given id\n- `minecraftctl status \u003cserver-id\u003e`: show the status of the server with given id\n- `minecraftctl enable \u003cserver-id\u003e`: enable the server with given id to be started automatically on system boot\n- `minecraftctl disable \u003cserver-id\u003e`: disable the server with given id to be no longer started automatically on system boot\n- `minecraftctl create \u003cserver-id\u003e \u003cexecutable\u003e`: create a new server instance with given id and executable\n\n## Downloader\n\nDownload or compile the latest or a specific build of bukkit, spigot, paper or tuinity server.\n\n### Note\n\n`spigot-download` will create additional folders and files, you might want to execute it in its own folder.\n\n### Files\n\nInside folder `downloader`:\n- `spigot-download`\n- `paper-download`\n- `tuinity-download`\n\n### Installation\n\n- Put `spigot-download` into `/usr/local/bin/` and ensure it is executable by everyone\n- Put `paper-download` into `/usr/local/bin/` and ensure it is executable by everyone\n- Put `tuinity-download` into `/usr/local/bin/` and ensure it is executable by everyone\n- You might want to create a symlink for `bukkit-download`: `ln -sf -T spigot-download bukkit-download`\n- Install `jq` on your system (for paper and tuinity, optional for bukkit and spigot)\n- Install `git` (for bukkit and spigot)\n\n### Usage\n\n- `spigot-download`: compile bukkit and spigot for the latest minecraft version available\n- `spigot-download \u003cminecraft-version\u003e`: compile bukkit and spigot for the given minecraft version\n- `paper-download`: download latest paper build of the latest minecraft version available\n- `paper-download \u003cminecraft-version\u003e`: download latest paper build of the given minecraft version\n- `paper-download \u003cminecraft-version\u003e \u003cbuild\u003e`: download the given paper build of the given minecraft version\n- `tuinity-download`: download latest tuinity build available\n- `tuinity-download \u003cbuild\u003e`: download the given tuinity build\n\n## World in Ramdisk\n\nPut your worlds into a ramdisk for faster load and save times.\n\n### Files\n\nInside folder `world-ramdisk`:\n- `minecraft-ramdisk-prepare.service`\n- `minecraft-ramdisk.timer`\n- `minecraft-ramdisk.service`\n\n### Installation\n\n- Put `minecraft-ramdisk-prepare.service`, `minecraft-ramdisk.timer` and `minecraft-ramdisk.service` into `/etc/systemd/system/`\n- Adjust paths inside both service units to match your world storage\n- Tell your server to use the worlds inside your ramdisk\n  - Either use `--world-dir /dev/shm/minecraft/` if your server supports it\n  - Or create symlinks to your worlds from the server directory to the shared memory worlds\n\n## Logfile analysis tools\n\nAnalyse minecraft server logs to extract some information.\n\n### Files\n\nInside folder `logfile-analysis`:\n- `userjoins.sh`\n- `process-userjoins.r`\n\n### Installation\n\n- Ensure you have `bash` installed\n- Put `userjoins.sh` and `process-userjoins.r` somewhere you have easy access (e.g. `~/.bin/` or `/usr/local/bin/`) and ensure it is executable\n  - I don't recommend installing it globally, but it is possible and won't break anything\n- Install [R](https://www.r-project.org/) on your system\n  - If you analyze files on a remote server you might want to install R locally instead\n  - Required R libraries:\n    - Either `readr` and `tibble`\n    - Or [the complete `tidyverse` library](https://www.tidyverse.org/)\n\n### Usage\n\n1. Create a directory for analysis files (e.g. `mkdir -p ~/server/analytics`)\n2. Change directory into your analysis folder (e.g. `cd ~/server/analytics`)\n3. Execute `userjoins.sh \u003clog dir\u003e` (e.g. `~/.bin/userjoins.sh ../logs/`)\n4. If you want to download all files, pack them: `tar -czf analysis.tar.gz *.csv`\n5. Execute `process-userjoins.r` (e.g. `~/.bin/process-userjoins.r`)\n6. The R script writes the output to `analysis.csv`\n\n#### Additional information\n- Note that consecutive executions of `process-userjoins.r` will fails, as the script can't differentiate between the old `analysis.csv` and the input data.\n- If you don't specify the log directory to `userjoins.sh` it will assume `../logs` by default.\n- You can adjust the logging level of `userjoins.sh` by setting the `LOG_LEVEL` environment variable:\n  ```shell script\n  LOG_LEVEL=2 userjoins.sh /path/to/logs\n  ```\n  Valid levels are:\n  - `0` for `DEBUG`\n  - `1` for `INFO`\n  - `2` for `WARNING`\n  - `3` for `SEVERE`\n- To set a custom time zone set the `TIMEZONE` environment variable: \n  ```shell script\n  TIMEZONE='+05:30' userjoins.sh /path/to/logs\n  ```\n  The default is the system's time zone.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseyfahni%2Fminecraft-server-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseyfahni%2Fminecraft-server-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseyfahni%2Fminecraft-server-scripts/lists"}