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. 

Software Components:
ComponentDescription
DockerContainerizat. The service is expose on HTTPS port 443ion software
n8nContainerized n8n app
CaddyContainerized reverse proxy and SSL creation
Cloud-initSoftware 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.

What cloudinit does:


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.
Environment variables:
All n8n settings are managed via environment variables in the docker-compose.yml file located in the /root/ directory on your n8n VM.
Sample of the .env file:
Updating the variables:
  • SSH into your VM.

  • Open /root/docker-compose.yml.

  • Add or modify variables in the .env file.

  • Save changes.

  • Run:

Changing your n8n domain:
I’d recommend using DNS CNAME records to point it to the randomly generated Hostafrica domain. Alternatively, kindly update the domain in /root/caddy/Caddyfile
Updating the n8n application:
For more information about n8n, kindly visit n8n docs page.

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us