n8n VPS template on HostAfrica
Implementing and using n8n on HostAfrica
Russell
Last Update 3 months ago
Overview
We designed and deployed n8n on KVMs managed by an hypervisor. The n8n application itself was deployed as container in the KVM using docker containerization software. The application in the container is further provision by cloud-init upon the KVMs first boot.
| Component | Description |
| Docker | Containerizat. The service is expose on HTTPS port 443ion software |
| n8n | Containerized n8n app |
| Caddy | Containerized reverse proxy and SSL creation |
| Cloud-init | Software to provision the n8n app |

The deployment files, including the docker-compose.yml, Caddyfile, and env, are stored in the /root/ directory. Hence, this makes the /root/ directory the working directory. The service is expose on HTTPS port 443. The service is expose on HTTPS port 443.
Cloud-init passes the client’s generated domain and auth key to the KVM .env file for the n8n deployment. These variables recreate the n8n application.
Accessing your n8n dashboard:
After purchasing, a free domain automatically provided. Just head “n8n.(generated domain)/setup” to open the n8n GUI. This will bring you to a password-protected setup page, where it’s best to create a username and password right away for added security.

SSH into your VM.
Open /root/docker-compose.yml.
Add or modify variables in the .env file.
Save changes.
Run:
