n8n is an extendable workflow automation tool. With a fair-code distribution model.
Dokku is the smallest PaaS implementation you've ever seen - Docker powered mini-Heroku.
- A working Dokku host
- PostgreSQL plugin for Dokku
- Letsencrypt plugin for SSL (optionnal)
Note: Throughout this guide, we will use the domain n8n.example.com
for demonstration purposes. Make sure to replace it with your actual domain name.
Log into your Dokku host and create the n8n app:
dokku apps:create n8n
# Install postgres plugin on Dokku
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
# Create running plugin
dokku postgres:create n8n
# Link plugin to the main app
dokku postgres:link n8n n8n
dokku config:set n8n N8N_ENCRYPTION_KEY=$(echo `openssl rand -base64 45` | tr -d \=+ | cut -c 1-32)
dokku config:set n8n WEBHOOK_URL=http://n8n.example.com
To enable routing for the n8n app, we need to configure the domain. Execute the following command:
dokku domains:set n8n n8n.example.com
Begin by cloning this repository onto your local machine.
# Via SSH
git clone [email protected]:d1ceward/n8n_on_dokku.git
# Via HTTPS
git clone https://github.com/d1ceward/n8n_on_dokku.git
Now, set up your Dokku server as a remote repository.
git remote add dokku [email protected]:n8n
Now, you can push the n8n app to Dokku. Ensure you have completed this step before moving on to the next section.
git push dokku master
Lastly, let's obtain an SSL certificate from Let's Encrypt.
# Install letsencrypt plugin
dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
# Set certificate contact email
dokku letsencrypt:set n8n email [email protected]
# Generate certificate
dokku letsencrypt:enable n8n
Congratulations! Your n8n instance is now up and running, and you can access it at https://n8n.example.com.