This is the checklist for turning the Packer-built AMI into an AWS Marketplace
listing. It assumes you have already built an AMI with
../../packer/ (locally or via .github/workflows/image.yml).
Do not commit AMI IDs, AWS account numbers, or credentials. The AMI ID is printed to the workflow job summary at build time.
Build in the seller account (or share the AMI into it):
cd deploy/packer
packer init .
# amd64
packer build -only='amazon-ebs.x-ui' \
-var 'xui_version=vX.Y.Z' -var 'xui_arch=amd64' -var 'instance_type=t3.small' -var 'region=eu-central-1' .
# arm64 (Graviton)
packer build -only='amazon-ebs.x-ui' \
-var 'xui_version=vX.Y.Z' -var 'xui_arch=arm64' -var 'instance_type=t4g.small' -var 'region=eu-central-1' .
You can list both AMIs (amd64 + arm64) as architectures of a single Marketplace product, or as separate products.
The image already satisfies the Marketplace AMI policies enforced by harden.sh
cleanup.sh:
✅ PasswordAuthentication no, PermitRootLogin prohibit-password
✅ no default OS account passwords (all locked)
✅ no baked authorized_keys, no SSH host keys (regenerated on boot)
✅ base OS = current Ubuntu 24.04 LTS, patched at build time
✅ no application default credentials — the panel admin is generated on first
boot on a random high port (no admin/admin, no shipped x-ui.db)
modify-image-attribute
command, or share it from the EC2 console).Common scan findings and where they're handled:
| Finding | Fix (already in the build) |
|---|---|
| Password authentication enabled | harden.sh sshd drop-in |
| Root login with password | harden.sh PermitRootLogin prohibit-password |
| Default user password set | harden.sh passwd -l on all accounts |
| Authorized keys present | cleanup.sh removes them |
| Out-of-date packages | base image is the latest LTS; provision.sh runs apt-get update |
/etc/x-ui/credentials.txt / MOTD after first boot for the generated
admin login, then change the password).sudo cat /etc/x-ui/credentials.txt, open the panel URL, log in,
confirm the panel works and the credentials are unique to that instance.