This guide explains how to configure the VPS for the app and set up backups.
-
Install Ansible:
brew install ansible cd infrastructure/02-configure ansible all -m ping # -> Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
-
Install Ansible collection for Docker network management:
ansible-galaxy collection install community.docker ansible-galaxy collection list | grep community.docker
-
In your DNS provider, add A records for the
domain.com
andgrafana.domain.com
pointing to the server's IP address, specified in02-configure/hosts
. -
At Sentry, create a new project
n8n-shortlink
and note down its DSN.
To run all playbooks at once:
ansible-playbook main.yml
To run them one by one, see below. Running playbooks one by one is only necessary for debugging.
ansible-playbook 01-user-setup.yml
Important
Take note of the non-root user name and sudo
password.
Add this entry to ~/.ssh/config
, replacing the all-caps values:
Host n8n-shortlink-infra
HostName SERVER_IP_ADDRESS
User NON_ROOT_USER
IdentityFile ~/.ssh/id_ed25519_n8n_shortlink_infra
Now you can use ssh n8n-shortlink-infra
to SSH in as the non-root user.
ansible-playbook 02-system-setup.yml -e "ansible_user=NON_ROOT_USER" --ask-become-pass
ansible-playbook 03-tooling-setup.yml -e "ansible_user=NON_ROOT_USER" --ask-become-pass
ansible-playbook 04-app-dir-setup.yml -e "ansible_user=NON_ROOT_USER"
ansible-playbook 05-backup-setup.yml -e "ansible_user=NON_ROOT_USER" --ask-become-pass