476 文字
2 分
Debian amd64にMinecraft modpackのStoneBlock4をインストールする
2026-02-09
2026-02-09

Debian amd64にMinecraft modpackのStoneBlock4をインストールする#

6Core/8GBのDebian13にインストールする。

javaとmodpackをFTBのserverinstallを使ってインストールする#

https://docs.feed-the-beast.com/docs/support/Guides/Server/ を参考にすすめる。

  1. https://feed-the-beast.com/modpacks/server-files/linux 開いて、FTB StoneBlock 4を選択
    1. image
  2. modpack versionを選んで、Servers Intel / AMD のコマンドをコピー
  3. インストールしたいDebian上のディレクトリ(今回は /opt/minecraft) にcdしたうえでコマンドを実行し、serverinstall_* を実行
    1. image
  4. 雑にyでインストール進める

modpackの情報と、インストールpath問題なければyで進める。Javaもインストールしてくれる。便利

SUCCESS Modpack installed successfully

で正常終了していればOK

image

サーバーを起動する#

インストールが完了したらrun.bat, run.shが生成される。今回はDebianなのでrun.shを実行すればサーバーが起動する。

root@stoneblock4:/opt/minecraft# ls -lsa run.*
4 -rw-r--r-- 1 root root 359 Feb 9 11:18 run.bat
4 -rwxr--r-- 1 root root 387 Feb 9 11:18 run.sh

jvmのオプションをいじりたかったら、user_jvm_args.txt を修正するとよい。

root@stoneblock4:/opt/minecraft# cat user_jvm_args.txt
# Xmx and Xms set the maximum and minimum RAM usage, respectively.
# They can take any number, followed by an M or a G.
# M means Megabyte, G means Gigabyte.
# For example, to set the maximum to 3GB: -Xmx3G
# To set the minimum to 2.5GB: -Xms2500M
# A good default for a modded server is 4GB.
# Uncomment the next line to set it.
# -Xmx4G

初回起動時はEULAの承諾が必要。true を入力しEnterすればOK.

<snip>
[11:23:14] [main/INFO] [minecraft/Eula]: By answering 'true' to this prompt you are indicating your agreement to Minecraft's EULA (https://account.mojang.com/documents/minecraft_eula)
EULA:
true

さいごに#

run.shをbackgroundで動作させたいならtmuxを入れるか、systemd service unitを作成するとよい。 サーバー初期設定するうえでserver consoleにコマンド入れたいケースがあると思うので最初は生で起動するかtmuxがおすすめ。

sudo tee /etc/systemd/system/minecraft-stoneblock4.service << 'EOF'
[Unit]
Description=Minecraft StoneBlock 4 Server
After=network.target
[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/opt/minecraft/run.sh
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft-stoneblock4
  • 実際に起動させる場合はminecraft ユーザーを作成し、権限を絞っておくのがよい。