Loading…
Loading documentation...
Automate build, test, and SSH or REST API deployment stages to a Servers Are Up Linux server from GitLab CI/CD.
Deploy tested artifacts from GitLab CI/CD (.gitlab-ci.yml) to an existing Linux server on Servers Are Up using pinned OpenSSH keys or scoped v1 REST API tokens.
What you can create today: Buy any product marked Available in checkout and it is set up automatically; products marked Coming soon have no checkout yet. The
sauCLI does not create instances.
In your GitLab project, open Settings, choose CI/CD, expand Variables, and add protected variables restricted to your main branch:
DEPLOY_HOST — public IPv4 address for your server's port forwardDEPLOY_PORT — forwarded TCP port for SSHDEPLOY_USER — non-root deploy user on the serverSSH_PRIVATE_KEY — Ed25519 private key (store as a File or masked variable)SSH_KNOWN_HOSTS — pinned output of ssh-keyscan -p PORT HOST.gitlab-ci.ymlstages:
- test
- deploy
test_app:
stage: test
image: node:22-alpine
script:
- npm ci
- npm test
deploy_production:
stage: deploy
image: alpine:3.20
rules:
- if: $CI_COMMIT_BRANCH == "main"
before_script:
- apk add --no-cache openssh-client rsync curl
- install -m 700 -d ~/.ssh
- printf '%s
' "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- printf '%s
' "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- rsync -az --delete --exclude .git ./ -e "ssh -p $DEPLOY_PORT -i ~/.ssh/id_ed25519" "$DEPLOY_USER@$DEPLOY_HOST:/srv/app/"
- ssh -p "$DEPLOY_PORT" -i ~/.ssh/id_ed25519 "$DEPLOY_USER@$DEPLOY_HOST" "cd /srv/app && sudo systemctl restart app && curl -fsS http://127.0.0.1:3000/health"
POST /api/v1/instances/{id}/exec with a scoped sau_... token created under Account settings > API keys.SSH_PRIVATE_KEY as Protected so untrusted merge requests from forks cannot read production credentials.Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.