Steam挂卡软件 ArchiSteamFarm ARM服务器安装配置

编辑 / games / 发布于2023-01-20 / 更新于2023-03-16 / 阅读 408

个人服务器:Oracle ARM 64
系统: ubuntu
个人挂卡页面: https://steamfarm.mortal.live/
各种说明在wiki里面写的非常清楚,还有中文版

下载运行

https://github.com/JustArchiNET/ArchiSteamFarm
Release页面选择合适的下载链接,
arm服务器选择arm版本的 https://github.com/JustArchiNET/ArchiSteamFarm/releases/download/5.4.1.11/ASF-linux-arm64.zip

下载后解压运行即可,其他所有的配置现在都可以在webui上进行配置。

域名访问

设置域名访问前需要设置 IPCPassword (ASF配置-远程访问-IPCPassword )
asf只绑定本地,想要域名访问需要在服务器上运行web服务器,然后进行反代。
caddy服务器反代配置

xxx.xxx {
	reverse_proxy localhost:1242
}

服务配置

原来的服务是想以用户身份执行,但我运行后还是有点问题,为了方面直接改成root执行了。

找到下载的目录里面的 ArchiSteamFarm@.service 文件,改成如下所示
把里面的your-path 改成你下载的ArchiSteamFarm解压的目录,也就是可执行程序ArchiSteamFarm所在的目录

[Install]
WantedBy=multi-user.target

[Service]
EnvironmentFile=-/etc/asf/root
ExecStart=your-path/ArchiSteamFarm --no-restart --process-required --service --system-required
Restart=on-success
RestartSec=1s
SyslogIdentifier=asf-root
User=root

# ASF security hardening, all of the below entries are optional, but their existence improves security of your system
CapabilityBoundingSet=
DevicePolicy=closed
LockPersonality=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateIPC=yes
PrivateMounts=yes
PrivateUsers=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=read-only
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict
ReadWritePaths=your-path /tmp
RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
UMask=0077

# TODO: Requires systemd v247+ due to https://github.com/systemd/systemd/issues/16666 and https://github.com/JustArchiNET/ArchiSteamFarm/issues/2739
# Since we don't want to enforce OS upgrade for everybody just yet, it's commented out for now
# We'll likely enforce it when .NET switches to Debian 11+ requirement
#SecureBits=noroot-locked
#SystemCallFilter=@system-service
#SystemCallFilter=~@privileged

[Unit]
After=network.target
Description=ArchiSteamFarm Service (on %I)
Documentation=https://github.com/JustArchiNET/ArchiSteamFarm/wiki

然后复制到服务目录

sudo cp ArchiSteamFarm@.service /lib/systemd/system/asf.service

设置服务开机运行

sudo systemctl enable asf

启动服务

sudo systemctl start asf

其他

在修改机器人配置是可能会出现 write error ,denied 的情况,可能是asf配置文件的问题,修改目录权限即可

sudo chmod -R 777 your-path

我可以选择挂哪些游戏吗?

https://github.com/JustArchiNET/ArchiSteamFarm/wiki/FAQ-zh-CN#我可以选择挂哪些游戏吗

我对挂卡不感兴趣,但我需要挂游戏时长,有办法做到吗?

https://github.com/JustArchiNET/ArchiSteamFarm/wiki/FAQ-zh-CN#我对挂卡不感兴趣但我需要挂游戏时长有办法做到吗