Satisfactory Wiki
Исследовать
Заглавная
Все страницы
Интерактивные карты
Навигация
Заглавная страница
Портал сообщества
Свежие правки
Случайная статья
Запросы к администраторам
Правила Вики
Требования к оформлению
Полезные страницы
Цели
Энергетика
Жёсткий диск
ЧУДО-утилизатор
Космический лифт
Пёсоящер
Карта
Инструменты сообщества
Интернет-ресурсы Satisfactory
Официальный сайт
Epic Games Store
Steam
Humble Bundle
Магазин тематических товаров
Discord
Facebook
Reddit
Gamepedia
Техподдержка Gamepedia
Сообщить о недопустимой рекламе
Справочная Gamepedia
Связаться с нами
FANDOM
Игры
Кино
ТВ
Вики
Исследуйте вики
Вики Сообщества
Создать вики
Нет учётной записи?
Регистрация
Войти
Войти
Регистрация
Satisfactory Wiki
388
страниц
Исследовать
Заглавная
Все страницы
Интерактивные карты
Навигация
Заглавная страница
Портал сообщества
Свежие правки
Случайная статья
Запросы к администраторам
Правила Вики
Требования к оформлению
Полезные страницы
Цели
Энергетика
Жёсткий диск
ЧУДО-утилизатор
Космический лифт
Пёсоящер
Карта
Инструменты сообщества
Интернет-ресурсы Satisfactory
Официальный сайт
Epic Games Store
Steam
Humble Bundle
Магазин тематических товаров
Discord
Facebook
Reddit
Gamepedia
Техподдержка Gamepedia
Сообщить о недопустимой рекламе
Справочная Gamepedia
Связаться с нами
Редактирование:
Выделенные сервера/Запуск как службы
(раздел)
Вернуться на страницу
Править
Визуальный редактор
История
Обсуждение (0)
Редактировать страницу
Выделенные сервера/Запуск как службы
Внимание:
Вы не вошли в систему. Ваш IP-адрес будет общедоступен, если вы запишете какие-либо изменения. Если вы
войдёте
или
создадите учётную запись
, её имя будет использоваться вместо IP-адреса, наряду с другими преимуществами.
Анти-спам проверка.
Не
заполняйте это!
== Запуск как службы == Работа выделенного сервера в качестве службы позволяет вашему серверу автоматически перезапускаться в случае сбоя, а также автоматически запускаться после загрузки. Эта функция отличается в операционных системах Linux и Windows, поэтому убедитесь, что вы используете правильный раздел для вашего ПО. === Linux === ==== Systemd ==== Systemd is the service management system installed for many Linux distributions. Ensure SteamCMD is installed. Once done, some small preparations for Systemd must be made defining the service and configuring it. The following systemd unit file for the Satisfactory service will automatically use SteamCMD to check for updates any time the server is started or restarted. It will also start the server when the host is rebooted. Edit the user and path to reflect the location and owner of the Satisfactory installation. The unit file should be placed at <code>/etc/systemd/system/satisfactory.service</code><syntaxhighlight lang="ini"> [Unit] Description=Satisfactory dedicated server Wants=network-online.target After=syslog.target network.target nss-lookup.target network-online.target [Service] Environment="LD_LIBRARY_PATH=./linux64" ExecStartPre=/usr/games/steamcmd +force_install_dir "/home/your_user/satisfactory" +login anonymous +app_update 1690800 validate +quit ExecStart=/home/your_user/satisfactory/FactoryServer.sh User=your_user Group=your_user StandardOutput=journal Restart=on-failure WorkingDirectory=/home/your_user/satisfactory [Install] WantedBy=multi-user.target </syntaxhighlight> The above configuration will have the server logs written to the system Journal. If you do not wish for this to happen, and would rather have log and error messages sent to files on disk, you can add the following two directives to the [Service] section of the Unit file. Bear in mind that if you do so, the log files will grow without limit if you do not also set up a log rotation scheme such as configuring <code>logrotated</code> to archive and rotate logs for you. That configuration is beyond the scope of this article. With that in mind, to log to disk rather than the journal, add these directives:<syntaxhighlight lang="ini"> [Service] ... StandardOutput=append:/var/log/satisfactory.log StandardError=append:/var/log/satisfactory.err </syntaxhighlight> To enable and start the service, use the following two commands respectively:<syntaxhighlight lang="shell-session"> $ sudo systemctl enable satisfactory $ sudo systemctl start satisfactory </syntaxhighlight> You can check the status with <code>sudo systemctl status satisfactory</code>. If configured correctly the output should look something like:<syntaxhighlight lang="bash"> ● satisfactory.service - Satisfactory dedicated server Loaded: loaded (/etc/systemd/system/satisfactory.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2021-11-02 15:30:13 CET; 2min 21s ago Main PID: 2529 (FactoryServer.s) Tasks: 24 (limit: 7053) Memory: 4.4G CPU: 4min 5.965s CGroup: /system.slice/satisfactory.service ├─2529 /bin/sh /home/steam/SatisfactoryDedicatedServer/FactoryServer.sh └─2536 /home/steam/SatisfactoryDedicatedServer/Engine/Binaries/Linux/UE4Server-Linux-Shipping FactoryGame </syntaxhighlight> ===== Экспериментальная версия ===== To have <code>systemd</code> pre-fetch the Experimental branch of the Dedicated Server upon restart, adjust the <code>ExecStartPre</code> directive to tell SteamCMD to use the <code>experimental</code> branch, as follows (truncated for brevity):<syntaxhighlight lang="ini"> [Service] #... ExecStartPre=/usr/games/steamcmd +force_install_dir "/home/your_user/satisfactory" +login anonymous +app_update 1690800 -beta experimental validate +quit #... </syntaxhighlight> ==== OpenRC ==== OpenRC is a service management system for [https://gentoo.org Gentoo Linux]. Install SteamCMD using Portage, and accept it's license. Its installation directory by default is <code>/opt/steamcmd</code>. The recommended way to get it set up is to link to the already existing SteamCMD init file with <code>ln -s /etc/init.d/steamcmd /etc/init.d/steamcmd.satisfactory</code> and then copying the default config from <code>/etc/conf.d/steamcmd</code> to <code>/etc/conf.d/steamcmd.satisfactory</code>. The completed <code>/etc/conf.d/steamcmd.satisfactory</code> would look something like this:<syntaxhighlight lang="bash"> # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Dtach options, which will used, when the `attach` extra command is called. # By default, CTRL+D is used, and no signal is send, # when you want to detach from the attached console. DTACH_OPTS="-e '^D' -r none" # Specifies, which server binary is used. # This could be 'hlds_run' or 'srcds_run', depending on your game. STEAMCMD_BINARY="FactoryServer.sh" # Path to the files of your started server. STEAMCMD_PATH="/opt/steamcmd/sf" # Options for your server binary. STEAMCMD_OPTS="" </syntaxhighlight> === Windows === ==== КМС ==== You can use [https://nssm.cc/ Крутой Менеджер Серверов] to easily set up auto-restart for the dedicated server. Once you've downloaded and installed NSSM, navigate to the directory containing nssm.exe and run the below command:<syntaxhighlight lang="shell"> nssm.exe install SatisfactoryServerService </syntaxhighlight>This will pull up a GUI for configuration. Set the "'''Path'''" to the location of FactoryServer.exe, Set the "'''Arguments'''" to "-unattended". You can modify other settings if you want, but that's the only required step. Click "install", then run this command.<syntaxhighlight lang="shell"> nssm.exe start SatisfactoryServerService </syntaxhighlight>Other useful <code>nssm</code> commands:<syntaxhighlight lang="shell"> nssm.exe status SatisfactoryServerService # Checks the status of the Service nssm.exe stop SatisfactoryServerService # Stops the service, and prevents it from auto-restarting </syntaxhighlight> === Docker === Docker is a cross-platform utility designed to run services in virtual machines in a compartmentalized fashion. This is an example <code>dockerfile</code> you can use to run the Satisfactory dedicated server inside a docker container<syntaxhighlight lang="dockerfile" line="1"> FROM cm2network/steamcmd:root #BUILD: docker build -t satisfactory . #RUN: mkdir data; docker run -p 15000:15000/udp -p 7777:7777/udp -p 15777:15777/udp -d --name=satisfactory -v $(pwd)/data:/home/steam/Satisfactory-dedicated satisfactory ENV STEAMAPPID 1690800 ENV STEAMAPP Satisfactory ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated" RUN echo -e "export LD_LIBRARY_PATH=${STEAMAPPDIR}/linux64:$LD_LIBRARY_PATH\n\ bash ${STEAMCMDDIR}/steamcmd.sh +login anonymous +force_install_dir ${STEAMAPPDIR} +app_update ${STEAMAPPID} validate +quit\n\ test -d ~/.config/Epic/FactoryGame/Saved || mkdir -p ~/.config/Epic/FactoryGame/Saved\n\ test -d ${STEAMAPPDIR}/saves || mkdir ${STEAMAPPDIR}/saves\n\ test -L ~/.config/Epic/FactoryGame/Saved/SaveGames || ln -s ${STEAMAPPDIR}/saves ~/.config/Epic/FactoryGame/Saved/SaveGames\n\ ${STEAMAPPDIR}/FactoryServer.sh" >> ${HOMEDIR}/entry.sh RUN chmod +x "${HOMEDIR}/entry.sh" && chown -R "${USER}:${USER}" "${HOMEDIR}" USER ${USER} VOLUME ${STEAMAPPDIR} WORKDIR ${HOMEDIR} CMD ["bash", "entry.sh"] EXPOSE 15777/udp 15000/udp 7777/udp </syntaxhighlight>The <code>$STEAMAPPDIR</code> is declared as a volume so that the savegames and the config of the server can be accessed and modified from outside the container. If that is not mapped to a host directory as done with -v, it will go into <code>/var/lib/docker/volumes</code>. You can find exactly where using docker inspect on the running container. More information [https://docs.docker.com/storage/volumes/ here]. ==== Docker-Compose ==== Use the following example docker-compose file in parallel with the Dockerfile and run <code>docker-compose up -d</code> for a detached background server.<syntaxhighlight lang="yaml" line="1"> version: "3" services: satisfactory: build: . restart: always ports: - 15777:15777/udp - 15000:15000/udp - 7777:7777/udp volumes: - ./data:/home/steam/Satisfactory-dedicated </syntaxhighlight> {{ИнженерНав}} [[Категория:Обучения]]
Описание изменений:
Обратите внимание, что все правки на Satisfactory Wiki публикуются по лицензии CC BY-NC-SA
Отменить
Справка по редактированию
(в новом окне)
Follow on IG
TikTok
Join Fan Lab