Setting up a server/ja

From Minetest Wiki
< Setting up a server
Revision as of 16:14, 30 August 2021 by Nogajun (talk | contribs) (update japanese translation)
Jump to navigation Jump to search
Languages 言語: English • Deutsch • français • italiano • 日本語 • русский

ハードウェアの選択

ゲームサーバーを公開する場合、VPSもしくは専用サーバーの利用をお勧めします。家庭用インターネット回線は信頼性が低く、アップロード速度も低い傾向があります。また、自宅でホスティングを行う場合、24時間、常にサーバーを稼働させることができない可能性もあります。

とはいうものの、オンラインにできるハードウェアがあり、十分なインターネット接続環境があれば自宅でのホスティングはうまくいきます。

Minetestクライアントを使ってサーバーのホスティングはできますが(LAN内のゲームでは問題ありません)、Minetestの専用サーバーモードを使って公開サーバーをホスティングすることをお勧めします。

サーバーを起動する

Linux

  1. 端末(ターミナル)を開きます。
  2. YOUR/MINETEST/DIRECTORY/bin/minetestserver (/YOUR/MINETEST/DIRECTORYは実際のディレクトリの場所に置き換えて)と入力するか、(/Minetest/bin/ディレクトリにある)minetestserverの実行ファイルを端末にドロップします。(以下の注意も読んでください)
    • 特定のゲームIDを指定する場合は、コマンドの最後に--gameid thegameidを追加してください(ゲームIDは、/Minetest/games/ディレクトリにあります)。
    • "Multiple worlds are available."(複数のワールドが利用可能です)というエラーが表示された場合、コマンドの最後に--worldname theWorldを追加してください(ワールドのリストは、/Minetest/worlds/ディレクトリにあります)。
  3. サーバーがクラッシュした場合は、/Minetest/bin/にあるdebug.txtを見てください。
  4. サーバーをダメージから保護するようにしてください。

簡単に実行できるように、minetestserver.shという名前のファイルを作成します。そして、以下の行を追加して、/Minetest/bin/ディレクトリ以下に置きます。サーバーを実行するには、ターミナルでこのファイルを実行するだけです。

#!/bin/bash

while true
do
    ./minetestserver --gameid minetest --worldname world
    sleep 10
done

Windows

  1. Minetestをインストールしたフォルダを開きます。「bin」フォルダの中でShiftキーを押しながら空ファイル(minetest.exeではありません)を右クリックして「コマンドウィンドウをここで開く」を選び、コマンドプロンプトを開きます。
  2. minetest.exe --serverと入力します。
    • "Multiple worlds are available."(複数のワールドが利用可能です)というエラーが表示された場合、変わりにminetest.exe --server --worldname world_nameを使ってください(world_nameはワールドの名前です)。
  3. サーバーがクラッシュした場合は、/Minetest/bin/にあるdebug.txtを見てください。
  4. サーバーをダメージから保護するようにしてください。

クラッシュしたサーバーを起動したくない場合は、以下のコードのバッチファイルからサーバーを起動します。

@echo off
:crash
minetest.exe --server --worldname world_name
goto crash

外部のプレーヤーの接続を許可する

ポートフォワードしない限り、ネットワークの外にいるプレーヤーはサーバーに参加できません。

  1. Choose a port to run the server on. The default of 30000 is recommended
  2. Find out your internal IP of the computer you are running the server on
    • Linux: open a terminal and type ifconfig and hit enter. Look for "inet adr" near "wlan0" or "eth0".
    • Windows
      • Open command prompt: Start → Run …, enter cmd.exe and hit enter.
      • Type ipconfig and hit enter.
      • Look for IPv4 Address.
    • macOS: Open the command prompt and enter netstat -nr.
  3. Login to your router, and port forward UDP on your chosen port to the internal IP you found
  4. Alter any firewalls you may have to allow traffic to the port you choose
  5. Make your server listed in the server list by setting the following settings in minetest.conf
    • server_announce = true - makes Minetest tell the server list about the server.
    • server_name - set the value of this to your server's name.
    • server_description - set the value of this to a longer description describing your server.
    • server_address - if you have a domain name for your server, then set this to the domain name (how to get a domain name if you want one for your server).
    • server_url - if you have a website for your server, then set this to the website URL.
    • motd - a message that is sent to the player when they join. Use this to welcome them.
    • You should restart the server to make sure any changed settings changed

サーバーを保護する

Minetestのワールド/サーバーを守る

新しいサーバーをセットアップするとき、どのような保護が必要であるか、検討する必要があります。これは公開サーバーにとって非常に重要なことです。 なぜなら、誰が接続して、彼らがあなたのサーバーで何をするのか予想できないからです。

一般的な問題点としては以下のことがあります。

  • Accidental or intentional damage to other players' work (griefing).
  • Chat spam (may include swearing or advertisements).
  • Aggression, harassment or other unwanted behaviours between players.
  • Trouble makers who evade bans.
  • Impersonation of well known people within the MT community.
  • Bugs, for example caused by mods, which allow a malicious player to execute arbitrary system commands.

これらの問題の多くは、事前の計画と問題を認識しておくことで、取り除いたり最小限に留めることができます。

  • Install a protection mod, such as areas or protectors. These allow players to protect areas. Protected areas cannot be changed by other players.
  • Enable rollback by adding enable_rollback = true to minetest.conf. Rollback can tell you which player placed a node, and allows a player's actions to be reverted.
  • Install a mod to help you manage bans, such as xban2.
  • Create rules for your server and make sure you have enough time (or a team of moderators) to supervise your server and watch for players who breaks your rules.
  • Never grant privileges to a player just because they use a name you recognise. Player names are not reserved between servers, so you should always confirm who the player is.
  • Install and configure a chat filter mod like filter, to prevent swearing and/or sexual chat. This is useful to inform players of the rules rather than actual enforcement, as working around filters is fairly easy.

なお、シングルプレイではデフォルトで有効になっているTNTと燃え広がる炎は、サーバーのデフォルトでは無効になっています。

ContentDBのServer Moderation and Toolsも参照ください。

ホストマシンを守る

  • Linux/Windowsサーバーセキュリティにについて標準的な勧告が適用されます。
  • Linuxでは、Minetestサーバーを実行する専用ユーザーを追加できます。
  • modセキュリティを絶対無効にしないでください。
  • secure.trusted_modsに追加するmodが信頼できることを確認してください。

サーバーを管理する

サーバー設定

サーバー設定ファイルの詳細な説明は、minetest.confのページを参照してください。

また、ワールドのために別のデータベース バックエンドの使用も検討できます。

サーバーコマンド

役に立つコマンド一覧は、サーバーコマンドのページを参照してください。

また、/giveまたは/givemeコマンドで使用するitemstringsについては、Itemstringsを参照してください。

特権システム

特権システムの詳細については、特権のページを参照してください。

関連項目