Cart

    Sorry, we could not find any results for your search querry.

    using n8n on your VPS

    n8n is a workflow automation platform that lets you connect apps, APIs and AI models without having to write separate scripts for every step.

    If you have ordered a VPS with n8n pre-installed, you no longer need to install n8n yourself. In this guide, you will log in for the first time, create your administrator account, connect your first LLM and immediately build a simple AI workflow.

    • n8n also works without an LLM. You only need a model provider such as OpenAI when you use AI nodes, for example AI Agent, AI Transform or a chat model node.
       
    • You can also connect an LLM without an API, for example by using Ollama.
       
    • n8n automatically saves changes while you are editing. However, a workflow only truly goes live after you publish it.
     

     

    What am I going to use n8n for?

     

    In this guide, we show a very simple workflow in which an AI Agent responds to chat messages. Once your first workflow is working, you can use n8n for much more, for example to:

    Without AI

    • Retrieve data from APIs and send it to other systems.
    • Perform recurring tasks based on a schedule.
    • Send periodic notifications to, for example, Slack or email.
    • Combine forms, webhooks and AI agents in a workflow.

    With AI

    All the examples above can benefit from AI, but what about the following options?

    • You receive a message from a customer (via WhatsApp, email, etc.), automatically create a ticket (for example in Freshdesk), have an AI Agent draft a reply (using knowledge via RAG), send a message to a colleague via a chat channel (Slack, Mattermost), and the colleague checks the reply and sends it. 
    • Generate social media content based on trending messages coming in through channels of your choice (Instagram, Reddit, etc.)
    • Logging & alerting for IT systems.
    • Automation of your smart home.

    And much more… the possibilities are almost endless; as long as your use case is ‘something’ digital involving computers and/or servers, there is a very good chance you can automate it with n8n. 


     

    Logging in to your n8n VPS for the first time

     

    Steps 1 and 2 are optional and allow you to set a new password for your VPS (not n8n) and connect a (sub)domain to n8n. However, you can choose to go straight to step 3 and get started with n8n directly in your browser.

     

     

    Step 1

    After ordering your VPS with n8n, you will receive an email with your login details. Log in to your VPS and update your password. You will first see the following on your screen:

    Although optional, we recommend following the instruction and, before continuing with step 2, already pointing a (sub)domain to the IP address of your VPS. Do you host your domain with TransIP and create a new DNS record for n8n? Then this change will be processed within a few minutes. 

    Enter the password for your VPS to continue. The required ports will be opened automatically and you will see a confirmation like the one below.


     

    Step 2

    Are you not using a (sub)domain to connect to n8n? Then continue with step 3.

    Now open /opt/n8n/.env as shown in the earlier screenshot:

    sudo nano /opt/n8n/.env

    In the file, change the following settings (especially do not change the N8N_ENCRYPTION_KEY). 

    • N8N_PROTOCOL: https
    • N8N_SECURE_COOKIE: true
    • DOMAIN_NAME: the domain name that you connect to your n8n VPS. Are you using a subdomain? Then only enter the fully qualified domain name here, for example example.com
    • N8N_SUBDOMAIN: the name of the subdomain without the fully qualified domain name, for example n8n.
    • SSL_EMAIL: the email address on which you want to receive updates regarding SSL certificate renewals. 

     

    Step 3

    Open the URL of your n8n installation in your browser. Use the IP address of your VPS, or the (sub)domain that you optionally used in steps 1 and 2.

    First, create a new account. Enter your email address, first and last name, and a password, and optionally select ‘I want to receive security and product updates’. This creates the administrator account with which you manage workflows, credentials and settings. Then click ‘Next’.

    You will see two additional onboarding windows. In the first one, you tell n8n more about your organisation:

    In the final window, you get the option to receive a free licence key for paid features. Optionally enter your email address to make use of this.

    Are you using the offer for a free licence key? Then check your email and click the link in the confirmation.


     

    Step 4

    After logging in, you will arrive at the overview of your n8n installation. This is where you create and manage your workflows. Some useful sections here are:

    1. Create workflow or credentials
    2. Expand menu
    3. Workflow templates
    4. Settings (here you manage users, SSO and instance settings, among other things)

     

    Creating your first AI workflow

     

    In this example, we will create a simple AI chat workflow. This will immediately teach you the basics of the n8n editor and how to connect an LLM.

     

    Step 1

    Click ‘+' > ‘Workflow’ or ‘Start from scratch’.


     

    Step 2

    Click ‘Add first step’ and add the ‘On chat message’ node. This is the trigger that allows you to test your workflow directly from within n8n. 

    Optionally, you can also replace this with other triggers (via ‘Search nodes’) such as ‘Telegram message’. 

    The window below will appear. Simply click the cross to close it.


     

    Step 3

    Then click the plus and ‘AI’. 

    Then select the ‘AI Agent’ node.


     

    Step 4

    The AI Agent Parameters window will appear. At the bottom, click ‘Chat Model’.

    You now have three important components:

    • A trigger that starts the workflow.
    • An AI Agent that processes the prompt.
    • A chat model that generates the actual AI response.

    Your workflow now looks something like this (with an Ollama model):

    Are you happy with your workflow? Then press 'Shift' + 'P' to publish your workflow.


     

    Customising the AI Agent

     

    The AI Agent comes with a default instruction:

    You're a helpful assistant

    Would you like to change this? Then double-click AI Agent in your workflow. Then, under ‘Add Option’, select the ‘System Message’ option. 

    You can now adjust your AI Agent’s instruction in real time. 


     

    Troubleshooting

     

    Your LLM node is not working

    Check whether your API key has been entered correctly and whether your account with the LLM provider (for example OpenAI) is active for API use.


     

    Your workflow is not responding automatically

    Check whether the workflow has a trigger node and whether you have actually published the workflow.


     

    You do not know why a workflow is failing

    Open Executions in n8n and check which node is causing the error for each run. In most cases, you will immediately see the error message and the input/output there.

    Need help?

    Receive personal support from our supporters

    Contact us