---
title: "Comment by Rishabh Mishra on \"How to install n8n with Docker on a VPS\" | Hashnode"
description: "The Caddy + Compose setup is a solid starting point. One thing I'd add before going live is a backup for the Postgres volume and the n8n encryption key, since l"
url: "https://hashnode.com/posts/install-n8n-docker-vps/6af468f6639dae59eef07689/comment/6af52b8b8004a8abdeba97af"
---

[Discussion](https://hashnode.com/posts/install-n8n-docker-vps/6af468f6639dae59eef07689)

Comment [How to install n8n with Docker on a VPS](https://hashnode.com/posts/install-n8n-docker-vps/6af468f6639dae59eef07689)

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[Nov 12](https://hashnode.com/posts/install-n8n-docker-vps/6af468f6639dae59eef07689/comment/6af52b8b8004a8abdeba97af)

The Caddy + Compose setup is a solid starting point. One thing I'd add before going live is a backup for the Postgres volume and the n8n encryption key, since losing that key makes stored credentials unreadable even if the database survives.

[Fernando Chagas](https://hashnode.com/@fernandochagas)

[Nov 12](https://hashnode.com/posts/install-n8n-docker-vps/6af468f6639dae59eef07689/comment/6af52b8b8004a8abdeba97af#reply-6af5a9f4c2444806424f1e18)

The guide covers both, in "Update and back up". It dumps the database with `pg_dumpall`, archives the `.n8n` folder and copies the `.env` with the encryption key off the VPS. The `.env` section also warns that without `N8N_ENCRYPTION_KEY` a restored backup still loads, but none of the stored credentials can be decrypted. Running the backup on a schedule with cron is in the next steps.

[Rishabh Mishra](https://hashnode.com/@rushdeploy)

[Nov 13](https://hashnode.com/posts/install-n8n-docker-vps/6af468f6639dae59eef07689/comment/6af52b8b8004a8abdeba97af#reply-6af67c9a8e0395cb3d77caed)

Good catch, Fernando — I missed that section. The one extra step I would still add is a test restore on a spare container, since a backup that has never been restored is only a hope. If the credentials decrypt there, the cron job is doing its job.

[Fernando Chagas](https://hashnode.com/@fernandochagas)

[5d ago](https://hashnode.com/posts/install-n8n-docker-vps/6af468f6639dae59eef07689/comment/6af52b8b8004a8abdeba97af#reply-6b08a0a8c36097ef4cd53c1c)

Agreed. I followed up with a separate guide on this blog ("Automatic n8n backups: cron, encrypted copies and a tested restore") covering the automated cron backup, encrypted off-site copies, and a restore test in a throwaway stack that checks credential decryption.
