Valheim

Valheim – Jak utworzyć serwer i zarządzać nim za pomocą Menedżera serwerów gier

Ten przewodnik opisuje proces konfiguracji serwera Valheim za pomocą Game Server Managera, co uprości sprawę i będzie zawierało wiele przydatnych zasobów i funkcji ułatwiających obsługę serwera.

Należy pamiętać, że jest to coś innego niż ten przewodnik jak będzie używał program Menedżer serwera gier. Ten program automatyzuje pracę właściciela serwera i oferuje szereg przydatnych narzędzi i funkcji, które znacznie ułatwiają konfigurację i działanie serwera.

Początkowe ustawienia

  1. Pobierz stąd Gamer Server Manager połączyć.
  2. Po pobraniu, wyodrębnij pliki do wybranej lokalizacji i uruchom program.
  3. Pobierz stąd SteamCMD połączyć.

Instalowanie plików serwera Valheim

Uruchom Menedżera serwera gier (GSM) i idź do Ustawienia/Narzędzia > Czas ponownego uruchomienia i konserwacji. Kliknij trzy kropki pod Lokalizacja programu i wybierz lokalizację pliku wykonywalnego SteamCMD. This will setup the Game Server Manager and use Steam SteamCMD for updating.

In the command-line parameters box at the bottom of the screen, add the following command:

+login anonymous +force_install_dir "C:\Valheim" +app_update 896660 +quit

You can change the installation folder by simply changing the path of C:\Valheim.

Idź do Narzędzia tab and allow SteamCMD to update and automatically install the game for you. If this is the first time that you performed this action on your PC, you may be getting a Steam guard verification.

Port Forwarding and Firewall

You will need to forward the following ports (usually from the admin page of your router) to the computer where you are running the server:

TCP/UDP 2456-2458

These are the ports that are set to default. If you change them, don’t forget to change the port forwarding rules as well.

Musisz także upewnić się, że Serwer Valheim.exe wykonywalny (znajdujący się w podfolderze bin głównego folderu instalacyjnego) jest dozwolone przez wszystkie aktywne zapory sieciowe.

Konfigurowanie Menedżera Serwera Gier

Musimy teraz powiedzieć GSM kilka rzeczy o serwerze. Zmierzać do Szczegóły serwera na ekranie ustawień i wybierz plik wykonywalny Valheim valheim_server.exe. Plik ten będzie znajdował się w folderze, w którym zainstalowałeś grę.

Serwer Valheim

Aby program poprawnie odpytywał, w odpowiednim polu wpisz adres IP serwera i port zapytania. Jeśli prowadzisz własny serwer, zwykle tak będzie 127.0.0.1:2457 i wybierz Wspólny jako Typ zapytania. Jeśli zmieniłeś domyślne porty, być może będziesz musiał to zrobić również tutaj. Port zapytania to 2457 domyślnie.

Kleszcz Wykryj za pomocą zapytania w Monitorowanie tab if you want the status of the server to be detected by a server query, rather than seeing if the program is running.

Monitoring and Restarting

It is recommended that you tick “Check server status, każdy” w “Monitorowanietab under settings. You may want to increase the interval at which the check is performed if your server takes longer to begotowy“. This actively monitors the server and updates theGłówny” oraz “Players Onlinetabs and gives you access to the following:

  • Automatically restarting the server if it goes down/crashes
  • Players online graph
  • Wydajność (RAM and CPU) graph
  • Network bandwidth graph
  • Ability to output the status to a file (to share or embed, na przykład)

Serwer Valheim

Konfiguracja serwera

W tej chwili, you can set a number of options via the command-line (accessed via the “Szczegóły serwera” patka).

Enter the following here, altering as necessary:

-nographics -batchmode -name "YourServerName" -Port 2456 -świat "YourWorldName" -hasło "YourServerPassword"

Notatka: the contents of the included batch file “start_headless_server.bat” contains these for reference. The next time you start the server, the settings you selected will be directly applied to the server.

General Use

To start the server simply click onStart Server” na “Główny” patka. To stop the server, use the button next to start.

The main screen is split into tabs, showing different information on your server. Here you can see the number of players online, up-time, server status, performance and bandwidth details, graphs and access to various tools and functions.

The Game Server Manager was designed to be highly configurable and there are many things you can do with it. Some of those features are discussed in the sections below.

Backing Up Game Data (Opcjonalny)

The program has a built-in incremental backup system for game files. To use this you must set up the locations first. Iść do “Ustawienia/Narzędzia” i kliknij “Program Settings“. Przejdź do “Kopia zapasowa” patka. Click the button to the right of the variousFolder to backup” (““) to browse for the folder you wish to backup.

The default folder for game data is:

C:\Użytkownicy(Your Username)\AppData\LocalLow\IronGate\Valheim\worlds

Serwer Valheim

Ensure you select the folders you want to backup in Game Server Manager (you can choose up to 5). Next set the location that you want the backups to be saved to in the box below.

Opcjonalny: If you want the program to automatically backup game data daily, you can set the relevant option on this screen. Simply tickBackup data, w” and enter a time (24-hour clock). You can then manually perform a backup by clickingBackup Game Data” pod “Ustawienia/Narzędzia” patka.

Updating and Timed Restarts (Opcjonalny)

The program has a built-in feature to restart a server at a specific time of day. Można to znaleźć w “Czasowe ponowne uruchomienie” w ustawieniach programu.

Ustaw godzinę, w której chcesz to zrobić, i zaznacz “Ponowne uruchomienie w określonym czasie, w” pole wyboru, jeśli chcesz to zrobić.

Serwer Valheim

Nawet jeśli nie chcesz ustawiać restartu czasowego, nadal możesz korzystać z tego ekranu. Wybierając program i wprowadzając opcjonalne parametry wiersza poleceń w pliku “Uruchom program przed uruchomieniem serwera” Sekcja, możesz włączyć aktualizację serwera – ręcznie lub automatycznie.

Na przykład, jeśli używasz SteamCMD do aktualizacji swojej gry, wybierz tutaj plik wykonywalny SteamCMD i wprowadź szczegóły wiersza poleceń w odpowiednim polu (zobacz sekcję Konfiguracja wstępna).

Gdy to zostanie ustawione, masz teraz możliwość wykonania tej akcji przy ponownym uruchomieniu komputera. Zrobi to wszystko za Ciebie! Możesz wtedy również użyć “Uruchom program konserwacji” pod “Ustawienia/Narzędzia” tab to run this program manually at any time.

Additional tip: if you have also set a backup location you can use thePerform Maintenance Now” pod “Ustawienia/Narzędzia” tab to perform the following sequence:

  1. Back up game data
  2. Stop Server
  3. Uruchom “maintenanceprogram
  4. Start the server back up again

Using SteamCMD to Update the Game (Opcjonalny)

Regardless of whether you installed the game via the Steam client or some other method, you can still use SteamCMD to update Valheim. As long as you point SteamCMD to the location of your Valheim installation, it will update it from there.

Head to the “Program Settings” and navigate to “Czasowe ponowne uruchomienie” patka. Select the SteamCMD executable under “Lokalizacja programu“. Następny, you need to tell SteamCMD what game we are updatingand where it is. Aby to zrobić, we can add a number of commands in the command-line parameters field. Here are some of the ones you may need to use (wstaw spacje pomiędzy oddzielnymi poleceniami – i pomiń dowolne < oraz > pokazane w poleceniach):

+Zaloguj sie <Nazwa Użytkownika> <hasło>

lub

+zaloguj się anonimowo

Spowoduje to zalogowanie się do Steam i umożliwi pobranie gry.

Proszę zanotować: Po raz pierwszy jest wykonywany na maszynie, może być konieczne wprowadzenie a “Kod Strażnika Steam” zanim uzyskasz dostęp. Jest to dodatkowa warstwa zabezpieczeń Steam, w ramach której wyśle ​​Ci wiadomość e-mail z kodem do wprowadzenia. Wprowadź go po wyświetleniu monitu przez SteamCMD.

+force_install_dir "<ścieżka>"

Informuje SteamCMD, że gra znajduje się tutaj. Wprowadź tutaj pełną ścieżkę Valheim.

+app_update 896660

Powie SteamCMD, aby kontynuował i zaktualizował Valheim

uprawomocnić

Sprawdź, czy wszystkie pliki gry są obecne i prawidłowe. Oznacz to na końcu powyższego stwierdzenia, bez “+” podpisać.

+quit

Mówi SteamCMD, aby zakończył działanie – powinno to być zawsze ostatnie polecenie na liście.

Więc, przykładową linią poleceń może być:

+login MySteamUsername MySteamPassword +force_install_dir "C:\MyGameLocation" +app_update 896660 validate +quit

Once this has been set up you can use both the “Uruchom program konserwacji” (simply runs the program) oraz “Perform Maintenance” (will Back up game data, stop the server, run themaintenanceprogram, and finally start the server back up again) buttons under the “Ustawienia/Narzędzia” tab to update the game. Ponadto, if you have set a timed restart, it will update the game before starting the server back up!

Enabling Automatic Update

Once you have the above set, you can also tell the program to check for game updates at a regular interval. When an update is found it will automatically stop the server, update it and restart it again.

Aby to zrobić, head to the “SteamCMD Auto-Updates” tab under “Program Settings” and fill out the details on this screen. You will need to enter your Steam username and password here, along with anappid” (896660) oraz “branch” (publiczny).

Once entered, select a time frame for how often the program should check for updates and tick the “Check for game updates, każdy” skrzynka. You are now good to go!

You can even make the program delay an update once found, for a configurable time period, in order to broadcast a message to players on your server, warning them of the impending update.

Remote Commands (Opcjonalny)

This will allow you to start, zatrzymywać się, backup and run maintenance (aktualizacja) your server remotely (regardless of any built-in features a game has).

Aby to zrobić you will need to have access to the folder that the program is running in via VPN, FTP or some other means. I will not cover how to do that here, since that is really another topic altogether. I will assume that for this guide, you already have access to the folder.

The program periodically looks to see if any of the files listed below are sitting in the folder with it. If it sees any of them it will perform the corresponding actions (and remove the file). Więc, to perform any of the actions listed below all you have to do is create/copy a file into the Game Server Manager folder with the corresponding name (contents of file makes no difference). The program will see the file and perform the action. Simple as that!

Start the server

Plik: start.txt

Stop the server

Plik: stop.txt

Perform a backup

Plik: backup.txt

Full maintenance cycle (backup, stop server, run maintenance program, start server)

Plik: update.txt

Restart the server

Plik: restart.txt

UWAGA: Ensure you have set a sufficient delay in the “Server Shutdown” tab or else the server may attempt to restart before it has properly shut down.

Uruchom ponownie serwer z zestawem parametrów wiersza poleceń #1

Plik: parm1.txt

Parametr wiersza poleceń służący do tego jest ustawiony w pliku “Polecenia Telnetu” patka. Dostęp do tej funkcji można także uzyskać poprzez “Szybkie zadania” przycisk rozwijany na “Główny” patka.
UWAGA: Ensure you have set a sufficient delay in the “Server Shutdown” tab or else the server may attempt to restart before it has properly shut down.

Uruchom ponownie serwer z zestawem parametrów wiersza poleceń #2

Plik: parm2.txt

Parametr wiersza poleceń służący do tego jest ustawiony w pliku “Polecenia Telnetu” patka. Dostęp do tej funkcji można także uzyskać poprzez “Szybkie zadania” przycisk rozwijany na “Główny” patka.
UWAGA: Ensure you have set a sufficient delay in the “Server Shutdown” tab or else the server may attempt to restart before it has properly shut down.

Wyślij polecenie(s) do serwera

Plik: telnetsend.txt

Program odczyta cały tekst z tego pliku i wyśle ​​go do konsoli serwera (pod warunkiem, że ustawisz to pod “Początkowe ustawienia > Konfigurowanie GSM“)

Podstawowy przewodnik dotyczący przekierowania portów

Przekierowanie portów należy wykonać tylko wtedy, gdy dostęp do serwera będzie uzyskiwany przez Internet. Jeśli hostujesz grę LAN, nie jest to wymagane.

  1. Znajdź sieć LAN swojego komputera hostującego (wewnętrzny) – wyświetlane na “Główny” zakładka GSM.
  2. Zaloguj się na stronę administracyjną routera w przeglądarce internetowej. To jest zmienne – ale większość routerów jest w standardzie, zapisz gdzieś szczegółowe informacje na samym urządzeniu (Naklejka). Będzie coś takiego 192.168.0.1 lub 192.168.0.255… lub cokolwiek. Bez wątpienia będziesz potrzebować hasła, co bez wątpienia jest również na naklejce. Jeśli na samym routerze nie ma żadnych informacji, być może będziesz musiał skontaktować się ze swoim dostawcą usług internetowych (jeśli jest to router dostawcy usług internetowych) lub Google, aby uzyskać domyślne dane logowania dla konkretnego modelu routera.
  3. Po wejściu na strony administracyjne routera, wyszukaj coś o nazwie “przekierowanie portów” wśród menu. Trudno powiedzieć dokładnie, gdzie by to było, ponieważ wszystkie routery są różne. Ponownie, Google może być tutaj Twoim przyjacielem.
  4. Ustawić “reguła” pod ekranem przekierowania portów, aby skierować UDP / Ruch TCP z wymaganych portów do adresu LAN, który znalazłeś #1.
  5. Zapisz zasady i wszystko powinno być gotowe.

Uwaga końcowa: If your hosting machine is set up to dynamically retrieve a LAN address on your network then it is possible that subsequent boots will alter your LAN address and cause port forwards to be pointing to the wrong machine. Jeśli to się zdarzy, you can either alter the port forwards again or, even better, change your LAN address to static (and set an address manually). Another Google can help you with this.

Rozwiązywanie problemów

If your friends cannot join the game.

  • If you can connect locally but your friends cannot, it is almost always a firewall, AV or port forwarding issue. Ensure all is configured as it should be.

Things to check

  1. Have you let the server executable through any firewalls you have (Okna, router etc.)? Remember that Windows firewall has 3 differentprofiles” (Domena, Private and Public), so ensure you have the correct ones tickedor tick them all. Również, upewnić się, że jest przepuszczany w obu kierunkach (przychodzące i wychodzące).
  2. Czy przekierowałeś wszystkie wymagane porty na prawidłowy wewnętrzny adres IP serwera??
  3. Czy lokalny adres IP Twojego serwera jest statyczny?? Jeśli nie, może się zmienić przy ponownym uruchomieniu i zepsuć reguły przekierowania portów. Najlepiej ustawić go na statyczny, aby zapobiec dalszym zmianom. Tak czy inaczej, sprawdź, czy Twój lokalny adres IP nie uległ zmianie, a następnie nie unieważnił reguł przekierowania portów.
  4. Czy masz jakieś inne oprogramowanie (Antywirus, Oprogramowanie VPN lub VLAN, takie jak Hamachi) które mogą zakłócać komunikację sieciową serwera?

Menedżer serwera gier twierdzi, że mój serwer jest “Nieaktywny” kiedy tak nie jest

  • Upewnij się, że wprowadziłeś poprawny adres IP i port w obszarze Szczegóły serwera (1) dla adresu IP:Port serwera do zapytania. To powinno być 127.0.0.1:2457 domyślnie, ale jeśli zmieniłeś porty lub hostujesz na innym adresie IP, będziesz musiał to zmienić.

Nie mogę połączyć się z serwerem z tego samego komputera, na którym hostuję

  • Może wystąpić konflikt portów. Możesz spróbować zmienić porty używane przez serwer.

O autorze