Setting up a server/it

From Minetest Wiki
Jump to navigation Jump to search
Languages Lingua: English • Deutsch • français • italiano • 日本語 • русский

Scegliere l'hardware

Si raccomanda che usiate un VPS o un server dedicato per ospitare un server di gioco che volete rendere pubblicamente disponibile. Le connessioni internet di casa tendono a essere inaffidabili e hanno anche una velocità di upload minore. Potreste anche non essere in grado di mantenere un server in linea 24 ore su 24 e 7 giorni su 7 quando lo ospitate sulla vostra connessione di casa.

Detto questo, ospitarlo sulla vostra connessione di casa andrà bene se avete dell'hardware che potete mantenere in linea, e se avete una connessione internet buona abbastanza.

Ci sono due modi per eseguire un server di Minetest:

  • Tramite il client - questo va bene per i giochi locali/LAN. Il vostro giocatore admin dovrà essere sempre in linea, dato che il server è ospitato dal client di Minetest.
  • Server dedicato - per un server pubblico sicuramente volete questo. Il vostro giocatore admin è solo un altro giocatore, e può entrare e uscire a volontà come qualsiasi altro giocatore.

Eseguire il server

Tramite il client

Se volete ospitare un server su cui giocare con gli amici, allora il modo più semplice di avviarlo è quello di usare il client di Minetest. Si noti che state eseguendo il server sul vostro computer, e il server si spegnerà se lasciate il gioco.

  • Andate nella scheda server
  • Assicuratevi che sia selezionato un mondo
  • Inserite il vostro nome utente e la password
  • Cliccate avvia

Server dedicato

Linux

  1. Aprite un terminale.
  2. Digitate LA/VOSTRA/CARTELLA/MINETEST/bin/minetestserver o rilasciate l'eseguibile minetestserver (posto in /Minetest/bin/) nel terminale (PER FAVORE LEGGETE LE NOTE SOTTOSTANTI!)
    • Se volete specificare un ID di gioco specifico, le scelte degli ID sono poste in /Minetest/games/. Aggiungete --gameid l'IDdelGioco alla fine del comando.
    • Se ricevete l'errore "Sono disponibili mondi multipli.", le scelte dei mondi sono poste in /Minetest/worlds/. Aggiungete --worldname ilMondo alla fine del comando.
  3. Se il vostro server va in crash, controllate il debug.txt in /Minetest/bin/
  4. Assicuratevi di mettere il vostro server al sicuro dai danni.

Per semplicità di utilizzo potete creare un file chiamato minetestserver.sh, aggiungere le righe sottostanti e metterlo nella vostra cartella /Minetest/bin. Per eseguire il server, eseguite il file in un terminale.

#!/bin/bash -x

./minetestserver --gameid minetest --worldname world

Windows

  1. Aprite il prompt dei comandi andando nella cartella di installazione di Minetest, poi nella cartella "bin", tenete premuto Maiusc, fate click di destro su di un file vuoto (non su minetest.exe), cliccate "Apri qui la finestra dei comandi".
  2. Digitate: minetest.exe --server.
    • Se ricevete l'errore "Sono disponibili mondi multipli.", usate invece minetest.exe --server --worldname nome_mondo, dove nome_mondo è il nome del mondo.
  3. Se il vostro server va in crash, controllate il debug.txt in /Minetest/bin/
  4. Assicuratevi di mettere il vostro server al sicuro dai danni.

Se non vi va di avviare il server andato in crash, avviate il server da un file batch che contiene il codice seguente:

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

Permettere a giocatori esterni di connettersi

I giocatori esterni alla vostra rete non saranno in grado di connettersi al server a meno che facciate il forward della porta.

  1. Scegliete una porta su cui eseguire il server. È raccomandata quella predefinita, la 30000
  2. Trovate l'IP interno del computer su cui state eseguendo il sever
    • Linux: aprite un terminale e digitate ifconfig e premete Invio. Cercate "inet adr" vicino "wlan0" o "eth0".
    • Windows:
      • Aprite un prompt dei comandi: Avvio → Esegui ..., inserite cmd.exe e premete invio.
      • Digitate ipconfig e premete Invio.
      • Cercate IPv4 Address.
    • macOS: Aprite il prompt dei comandi e inserite netstat -nr.
  3. Accedete al vostro router, ed eseguite il port forward UDP sulla porta di vostra scelta sull'indirizzo IP interno che avete trovato
  4. Modificate qualsiasi firewall che potreste avere per consentire il traffico sulla porta che scegliete
  5. Fate elencare il vostro server nell'elenco dei server impostando le seguenti impostazioni in minetest.conf
    • server_announce = true - fa sì che Minetest dica del server all'elenco dei server.
    • server_name - impostate questo valore con il nome del vostro server.
    • server_description - impostate questo valore con una decrizione più lunga che descriva il vostro server.
    • server_address - se avete un nome di dominio per il vostro server, allora impostatela al nome di dominio (come ottenere un nome di dominio se ne volete uno per il vostro server).
    • server_url - se avete un sito web per il vostro server, allora impostatela con l'URL del sito web.
    • motd - un messaggio che viene inviato all'accesso dei giocatori. Usatelo per dargli il benvenuto.
    • Dovreste riavviare il server per essere certi che sia stata cambiata ogni impostazione modificata

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