Aliyun SWAS
About 1 min
Configure Aliyun Simple Web Application Server (SWAS).
Apply for AccessKey
- Visit Aliyun RAM AccessKey Management.
- Click Create AccessKey.
- Record the generated AccessKey ID and AccessKey Secret.

Obtain Instance ID and Region ID
- Go to SWAS Management Console.
- Click the target server card title to access details page.
- Find Instance ID in the Basic Information section.

- At the same time, check the browser address bar URL to obtain Region ID (e.g.
cn-hongkong
).
For example, for the following URL, the Region ID is cn-hongkong
:
https://swasnext.console.aliyun.com/servers/cn-hongkong/314548fe211%20f4293aafc10c34e140026/dashboard
Configure Firewall Rules
- In server details page, select Firewall from the menu.
- Set dedicated remark names for port rules that need to be automatically managed by Solo (for rule identification).
- Record all remark names for rules to be managed.
For example, to protect ports 22
(SSH) and 3306
(MySQL), configure ssh
and mysql
:

Duplicate Remarks Allowed
Multiple rules can share the same remark. Solo will modify all matching rules.
Edit Configuration File
Add this configuration to Solo's TOML file:
[[servers]]
name = "Server Name"
machine_type = "aliyunswas"
machine_id = "Instance ID"
region = "Region ID"
secret_id = "AccessKey ID"
secret_key = "AccessKey Secret"
protocol = "v4"
rules = [
"rule_remark1", # e.g. ssh
"rule_remark2", # e.g. mysql
]
Parameter Reference
name
: Custom server identifiermachine_type
: Must bealiyunswas
machine_id
: Server Instance IDregion
: Server Region IDsecret_id
: Your AccessKey IDsecret_key
: Your AccessKey Secretprotocol
: Firewall protocol version, fixed asv4
(SWAS firewall only supports IPv4)rules
: List of firewall remark names
Configuration Example
Based on previous examples:
[[servers]]
name = "Aliyun SWAS"
machine_type = "aliyunswas"
machine_id = "314548fe211f4293aafc10C34e140026"
region = "cn-hongkong"
secret_id = "LTA15t9Bk3XGIWVYbDzKumin"
secret_key = "bOjlt4RbICjsdNp90s)(IOxjl)(Cqnnz"
protocol = "v4"
rules = [
"ssh",
"mysql",
]