Summary
Provision a restricted HestiaCP deployment account and update the CI deployment workflow to use it.
Rationale
.github/workflows/ci.yml currently runs the deploy-hestiacp rsync transfers as root with VPS_SSH_KEY. A compromised CI job or deployment credential could provide root-level access that is not required to deploy static files.
Required changes
- Create a dedicated HestiaCP deployment account on the server.
- Configure its SSH key for deployment access.
- Restrict the account and key so they can access only the required HestiaCP
public_html deployment path.
- Store the deployment account name and scoped SSH key as repository secrets, for example
VPS_DEPLOY_USER and a dedicated deploy-key secret.
- Update the
deploy-hestiacp job in .github/workflows/ci.yml to replace remote_user: root and secrets.VPS_SSH_KEY with the restricted account and its dedicated key.
- Preserve the existing
remote_host and HestiaCP remote_path configuration.
Affected area
.github/workflows/ci.yml — deploy-hestiacp
Acceptance criteria
- The HestiaCP deployment job does not authenticate as
root.
- The workflow uses a dedicated deployment account and a dedicated SSH key.
- The deployment account/key cannot access paths outside the required deployment scope.
- The job still deploys
dist/ and deploy/.htaccess to the existing HestiaCP public_html path.
- A deployment from
main completes successfully after the new credentials are configured.
Backlinks
Requested by: @NesiciCoding
Summary
Provision a restricted HestiaCP deployment account and update the CI deployment workflow to use it.
Rationale
.github/workflows/ci.ymlcurrently runs thedeploy-hestiacprsync transfers asrootwithVPS_SSH_KEY. A compromised CI job or deployment credential could provide root-level access that is not required to deploy static files.Required changes
public_htmldeployment path.VPS_DEPLOY_USERand a dedicated deploy-key secret.deploy-hestiacpjob in.github/workflows/ci.ymlto replaceremote_user: rootandsecrets.VPS_SSH_KEYwith the restricted account and its dedicated key.remote_hostand HestiaCPremote_pathconfiguration.Affected area
.github/workflows/ci.yml—deploy-hestiacpAcceptance criteria
root.dist/anddeploy/.htaccessto the existing HestiaCPpublic_htmlpath.maincompletes successfully after the new credentials are configured.Backlinks
Requested by: @NesiciCoding