Difference between revisions of "Server/ja"

From Minetest Wiki
Jump to navigation Jump to search
(mv)
(Japanese translation for "dedicated server, linux")
Line 27: Line 27:
 
* 「ゲームホスト」をクリック
 
* 「ゲームホスト」をクリック
  
=== Dedicated Server ===
+
=== 専用サーバーを用意する方法 ===
  
 
==== Linux ====
 
==== Linux ====
  
#Open a terminal.
+
#端末を開く
#Type in <code>YOUR/MINETEST/DIRECTORY/bin/minetestserver</code> or just drop the minetestserver executable (located in <code>/Minetest/bin/</code>) into the terminal '''(PLEASE READ THE NOTES BELOW!)'''
+
#<code>YOUR/MINETEST/DIRECTORY/bin/minetestserver</code> と打ち込む、もしくは、minetestserver の実行ファイル(<code>/Minetest/bin/</code> にあります)を端末にドラッグアンドドロップする(下の注意書きを読んでください!)
#*If you want to specify a specific game ID, the game ID choices are located in <code>/Minetest/games/</code>. Add in <code>--gameid '''thegameid'''</code> to the end of the command.
+
#*特定の game ID を指定したいならば、選択可能な game ID <code>/Minetest/games/</code> にあります。<code>--gameid '''thegameid'''</code> をコマンドの末尾に付け加えてください。
#*If you get the error “Multiple worlds are available.”, the world choices are located in <code>/Minetest/worlds/</code>. Add in <code>--worldname '''theWorld'''</code> to the end of the command.
+
#*“Multiple worlds are available.” というエラーが出た場合は、<code>/Minetest/worlds/</code> にあるワールドから選ぶ必要があります。<code>--worldname '''theWorld'''</code> をコマンドの末尾に付け加えてください。
#If your server crashes, then look at the <code>debug.txt</code> in <code>/Minetest/bin/</code>
+
#サーバーがクラッシュした場合は、<code>/Minetest/bin/</code> 内にある <code>debug.txt</code> を見てください。
#Make sure you make your server [[#Protecting your server|safe from damage]].
+
#サーバーを[[#Protecting your server|攻撃から保護]]してください。
  
For easy use you can create an file named minetestserver.sh, add the lines below and put it in your /Minetest/bin/ folder. To run the server, just run the file in a terminal.
+
下記のような内容で /Minetest/bin フォルダー内に minetestserver.sh というファイルを作成することで、簡単にサーバーを起動できるようになります。サーバーを起動するには、端末内で作成したファイルを実行するだけです。
 
  #!/bin/bash -x
 
  #!/bin/bash -x
 
   
 
   

Revision as of 12:13, 21 June 2021

Languages 言語: English • Deutsch • español • français • italiano • 日本語 • Bahasa Melayu
Mbox style.png これは不完全な翻訳です。
お時間があるときに翻訳を完了させてください。

ハードウェアを選ぶ

もし、あなたがホストするゲームサーバーを一般公開したいなら、VPSか専用サーバーを用意することをおすすめします。 家庭用インターネット接続は通信の信頼性が低く、通信速度も遅くなりがちです。自宅からホストする場合は24時間365日サーバーをオンラインにしておくことができないかもしれません。

ですが、ホスティング中はオンラインにしておくことができ、ある程度十分なネットワーク環境をお持ちならば家からでも十分にホスティングは可能です。

Minetestサーバーをホスティングする手段として、以下の2つが用意されています:

  • Minetestクライアントを利用する方法 - これは身内で楽しむ場合や限られたLAN内でプレイする場合に適しています。サーバーのホスティングはMinetestクライアントに依存するため、管理者プレイヤーは常にワールドに参加する必要があります。
  • 専用サーバーを用意する方法 - サーバーを公開したいなら間違いなくこちらを選んだほうがいいでしょう。管理者プレイヤーは他のプレイヤーと同じように、自由にサーバーに参加・離脱を行うことができます。

サーバーを実行する

クライアントを利用する方法

もしあなたが友達と遊ぶためにサーバーをホストしたいなら、これが最も簡単な方法です。 あなたのコンピュータ上でサーバーとしてのシステムが稼働することに注意してください。これはあなたがMinetestを終了するとサーバー自体が終了されてしまうということです。

  • 「ホストサーバ」にチェックを入れる
  • ホストしたいワールドが選択されていることを確認
  • 名前とパスワードを入力
  • 「ゲームホスト」をクリック

専用サーバーを用意する方法

Linux

  1. 端末を開く
  2. YOUR/MINETEST/DIRECTORY/bin/minetestserver と打ち込む、もしくは、minetestserver の実行ファイル(/Minetest/bin/ にあります)を端末にドラッグアンドドロップする(下の注意書きを読んでください!)
    • 特定の game ID を指定したいならば、選択可能な game ID は /Minetest/games/ にあります。--gameid thegameid をコマンドの末尾に付け加えてください。
    • “Multiple worlds are available.” というエラーが出た場合は、/Minetest/worlds/ にあるワールドから選ぶ必要があります。--worldname theWorld をコマンドの末尾に付け加えてください。
  3. サーバーがクラッシュした場合は、/Minetest/bin/ 内にある debug.txt を見てください。
  4. サーバーを攻撃から保護してください。

下記のような内容で /Minetest/bin フォルダー内に minetestserver.sh というファイルを作成することで、簡単にサーバーを起動できるようになります。サーバーを起動するには、端末内で作成したファイルを実行するだけです。

#!/bin/bash -x

./minetestserver --gameid minetest --worldname world

Windows

  1. Open command prompt by going in the Minetest installation folder, then in the “bin” folder, hold Shift, do a right click on a empty file (not on minetest.exe), click “Open command window here”.
  2. Type this: minetest.exe --server.
    • If you get the error “Multiple worlds are available.”, use minetest.exe --server --worldname world_name instead, where world_name is the name of the world.
  3. If your server crashes, then look at the debug.txt in /Minetest/bin/
  4. Make sure you make your server safe from damage.

If you don't like to start the crashed server, simply start the server out of a batch file which contains the following code:

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

Allowing external players to connect

Players outside of your network won't be able to join the server unless you port forward.

  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

Protecting your server

When setting up a new server, you should consider which protections are needed. This is extremely important for public servers, because you cannot predict who will connect or what they will do on your server.

Common problems include:

  • 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.


Many of these problems can be removed or minimised by advanced planning and awareness:

  • 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.
  • On Linux you can add a dedicated user for running the minetest server.


Note that tnt and fire spreading, which are both enabled by default in singleplayer, are disabled by default on servers.

Managing your server

Server Configuration

For a detailed explanation of the server configuration file, see the minetest.conf page.

You may also want to consider to use a different database backend for your world.

Server Commands

See the Server commands page for a list of useful commands.

Also see Itemstrings for the itemstrings for use with the /give and /giveme commands.

Privilege System

See the privileges page for detailed information on the privilege system.

See also