Gateway timeout error on backup

I’m running a self-hosted instance on a Digital Ocean droplet. Never had a problem with backups before, but now I’m getting a “504 Gateway Timeout” error when backing up via CLI. I was on 5.120.x prior to this. Tried backing up, restarting, backing up again. Was able to upgrade to the latest version of Ghost via ghost update, but still the same timeout error. The CLI logs don’t show any more than the output below, and the ghost instance logs show nothing. ghost doctor reports everything is normal.

Any thoughts?

ghost-mgr@ryansouthwickauthor-newsletter:/var/www/ghost$ ghost backup --verbose

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org

MySQL: running query > SELECT @@version AS version

+ sudo systemctl is-active ghost_newsletter-ryansouthwickauthor-com
+ sudo mkdir -p /var/www/ghost/backup
? Enter your Ghost administrator email address [redacted]
? Enter your Ghost administrator password [hidden]
✖ Backing up site
An error occurred.
Message: 'Response code 504 (Gateway Time-out)'

Stack: HTTPError: Response code 504 (Gateway Time-out)
    at EventEmitter.<anonymous> (/usr/lib/node_modules/ghost-cli/node_modules/got/source/as-promise.js:74:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Path: /ghost/api/admin/session/

Debug Information:
    OS: Ubuntu, v22.04.1 LTS
    Node Version: v18.18.2
    Ghost Version: 5.121.0
    Ghost-CLI Version: 1.27.0
    Environment: production
    Command: 'ghost backup --verbose'

Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2025-06-06T15_14_33_268Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.

Here’s the bug:

Thanks Cathy. The bug mentions a 403 error output, while I’m getting a 504, but the timing of when my backup began breaking fits. I’ll keep an eye on this and try again once it’s resolved.