Fly.io的免费套餐:
| 分类 | 限额 | 说明 |
|---|---|---|
| VM: shared-cpu | 每个月 2340 小时 | 可以全天候运行 3 个 256 MB 内存的共享 CPU 的 VM |
| Volumes | 3GB | 提供 3GB 永久存储 |
| Bandwidth | 160 GB/每月 | 根据各个地方不同分别计算 outbound 流量 |
| Anycast IPs | 无限的 IPv6, 每个应用一个 IPv4 | 每一个额外的 IPv4 地址需要额外每个月 $2 |
| Certificates | 10 个活跃的证书 | 最多 10 个证书 |
安装flyctl工具:
- curl -L https://fly.io/install.sh | sh
- export FLYCTL_INSTALL="/root/.fly"
- export PATH="$FLYCTL_INSTALL/bin:$PATH"
- fly auth login
新建APP:
- fly launch
根据提示可以在临时页面修改app参数,包括app名称、区域选择等。
有了名称后在该app下形成一个持久性的卷,1G大小:
- flyctl volumes create data --size 1 --app APP_NAME
这样,在后台可以看到app及volumes信息了,同时,在根目录下会产生.toml文件,直接修改。
toml写法:
# fly.toml app configuration file generated for nlist on 2025-09-21T17:28:18+08:00## See https://fly.io/docs/reference/configuration/ for information about how to use this file.#app = 'XXXXX'primary_region = 'nrt'[build]image = "openlistteam/openlist:latest"[http_service]internal_port = 5244force_https = trueauto_stop_machines = 'stop'auto_start_machines = truemin_machines_running = 0processes = ['app'][[mounts]]destination = "/opt/openlist/data"source = "data"[[vm]]memory = '1gb'cpu_kind = 'shared'cpus = 1[[services]]http_checks = []internal_port = 5244processes = ["app"]protocol = "tcp"script_checks = [][services.concurrency]hard_limit = 50soft_limit = 35type = "connections"[[services.ports]]force_https = truehandlers = ["http"]port = 80[[services.ports]]handlers = ["tls", "http"]port = 443[[services.tcp_checks]]grace_period = "120s"interval = "15s"restart_limit = 0timeout = "2s"
保存后直接deploy:
- flyctl deploy --remote-only
查看openlist的首次密码,进入 https://fly.io/apps/XXXXX/monitoring 链接,打开 “Search logs in Grafana”查看。
Certificates => “+” Add certificate => 填入域名 => 添加解析
