在fly.io部署Alist

安装flyctl

此处以Windows安装为例

pwsh -Command "iwr https://fly.io/install.ps1 -useb | iex"

初始化

flyctl launch

按照提示创建一个app
image
选择N会跳出网页要求填写
image
APP name 自己设置
port 为5244
RAM选择256MB

创建一个1G的可持久卷

flyctl volumes create alist_data --region hkg --size 1

编辑fly.toml

参照以下内容编辑

app = "alist"
primary_region = "hkg"

[build]
image = "xhofe/alist:latest"

[env]
PUID = "0"
PGID = "0"
UMASK = "022"

[[mounts]]
source = "alist_data"
destination = "/opt/alist/data"

[http_service]
internal_port = 5244
force_https = true
auto_stop_machines = false
auto_start_machines = true
min_machines_running = 0
processes = ["app"]

[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 256

部署

flyctl deploy

等待完成,会得到一个网址

演示

https://so4.fly.dev

获取管理员密码

进入SSH

flyctl ssh console

执行

./alist admin set NEW_PASSWORD

NEW_PASSWORD为自己设置的密码