{"id":18782443,"url":"https://github.com/centminmod/n8n","last_synced_at":"2026-02-04T14:32:52.110Z","repository":{"id":260851644,"uuid":"882527353","full_name":"centminmod/n8n","owner":"centminmod","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-07T10:30:08.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T16:10:53.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centminmod.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-03T02:32:11.000Z","updated_at":"2024-11-07T10:30:12.000Z","dependencies_parsed_at":"2024-11-03T03:23:33.535Z","dependency_job_id":"cb695e17-68f2-47af-a747-a074b7bba6b4","html_url":"https://github.com/centminmod/n8n","commit_stats":null,"previous_names":["centminmod/n8n"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/centminmod/n8n","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fn8n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fn8n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fn8n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fn8n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centminmod","download_url":"https://codeload.github.com/centminmod/n8n/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centminmod%2Fn8n/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263679302,"owners_count":23495025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:36:00.623Z","updated_at":"2026-02-04T14:32:52.103Z","avatar_url":"https://github.com/centminmod.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"* https://docs.n8n.io/hosting/installation/server-setups/docker-compose/\n* https://docs.n8n.io/hosting/installation/docker/#updating\n\n## 1. System Preparation\n\n### Update System\n```bash\nsudo dnf update -y\nsudo dnf upgrade -y\n```\n\n### Install Required Packages\n```bash\n# Install basic requirements\nsudo dnf install -y dnf-utils yum-utils\nsudo dnf groupinstall -y \"Development Tools\"\nsudo dnf install -y git curl wget nano python3 python3-pip\n\n# Install Docker dependencies\nsudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo\nsudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin\n\nsudo mkdir -p /etc/docker\nsudo tee /etc/docker/daemon.json \u003c\u003cEOF\n{\n    \"dns\": [\"172.18.0.1\", \"1.1.1.1\", \"8.8.8.8\"],\n    \"dns-opts\": [\"ndots:1\"],\n    \"dns-search\": [\"k6-support\"],\n    \"log-driver\": \"json-file\",\n    \"log-opts\": {\n        \"max-size\": \"10m\",\n        \"max-file\": \"3\"\n    }\n}\nEOF\n\n# Start and enable Docker\nsudo systemctl start docker\nsudo systemctl enable docker\nsudo systemctl status docker --no-pager -l\n```\n\n### CSF Firewall Integration (Optional)\n\nIf running CSF (ConfigServer Security \u0026 Firewall), run the CSF setup script after Docker installation:\n\n```bash\n./docker.sh csf-setup\n```\n\nThis configures iptables rules for Docker networks to work with CSF. Run `./docker.sh csf-test` to verify the integration.\n\n```bash\ntime docker compose up -d\n[+] Running 5/5\n ✔ Network n8n_network         Created                                                                                                                                                    0.1s \n ✔ Volume \"n8n_data\"           Created                                                                                                                                                    0.0s \n ✔ Volume \"n8n_postgres_data\"  Created                                                                                                                                                    0.0s \n ✔ Container n8n-db-1          Healthy                                                                                                                                                    5.7s \n ✔ Container n8n-n8n-1         Started                                                                                                                                                    5.9s \n\nreal    0m6.134s\nuser    0m0.075s\nsys     0m0.062s\n```\n```bash\ndocker compose ps\nNAME        IMAGE         COMMAND                  SERVICE   CREATED          STATUS                             PORTS\nn8n-db-1    postgres:17   \"docker-entrypoint.s…\"   db        46 seconds ago   Up 46 seconds (healthy)            5432/tcp\nn8n-n8n-1   n8nio/n8n     \"tini -- /docker-ent…\"   n8n       46 seconds ago   Up 40 seconds (health: starting)   0.0.0.0:5678-\u003e5678/tcp, :::5678-\u003e5678/tcp\n```\n\n## 2. Verify Setup\n\n1. Check container logs\n\n```\ndocker compose logs n8n\ndocker compose logs db\n```\n\n2. Check container health status\n```\n# View running containers and health status\ndocker compose ps\n\n# Check n8n health\ndocker inspect n8n-n8n-1 --format \"{{.State.Health.Status}}\"\n\n# Check PostgreSQL health\ndocker inspect n8n-db-1 --format \"{{.State.Health.Status}}\"\n```\n\n3. Test database connectivity\n```\n# Connect to PostgreSQL and check version\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SELECT version();\"\n\n# Check PostgreSQL connections\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"\\conninfo\"\n\n# List PostgreSQL databases\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -c \"\\l\"\n```\n\n```bash\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SELECT version();\"\n                                                       version                                                       \n---------------------------------------------------------------------------------------------------------------------\n PostgreSQL 17.0 (Debian 17.0-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit\n(1 row)\n\n\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"\\conninfo\"\nYou are connected to database \"n8n\" as user \"n8n\" via socket in \"/var/run/postgresql\" at port \"5432\".\n\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -c \"\\l\"\n                                                 List of databases\n   Name    | Owner | Encoding | Locale Provider |  Collate   |   Ctype    | Locale | ICU Rules | Access privileges \n-----------+-------+----------+-----------------+------------+------------+--------+-----------+-------------------\n n8n       | n8n   | UTF8     | libc            | en_US.utf8 | en_US.utf8 |        |           | \n postgres  | n8n   | UTF8     | libc            | en_US.utf8 | en_US.utf8 |        |           | \n template0 | n8n   | UTF8     | libc            | en_US.utf8 | en_US.utf8 |        |           | =c/n8n           +\n           |       |          |                 |            |            |        |           | n8n=CTc/n8n\n template1 | n8n   | UTF8     | libc            | en_US.utf8 | en_US.utf8 |        |           | =c/n8n           +\n           |       |          |                 |            |            |        |           | n8n=CTc/n8n\n(4 rows)\n```\n\n4. Test n8n API health\n```\n# Using curl from host\ncurl -I http://localhost:5678/healthz\n```\n```\n# Using wget inside n8n container\ndocker exec n8n-n8n-1 wget --spider -q http://localhost:5678/healthz\n```\n\n```bash\ncurl -I http://localhost:5678/healthz\nHTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\nContent-Length: 15\nETag: W/\"f-VaSQ4oDUiZblZNAEkkN+sX+q3Sg\"\nDate: Sun, 03 Nov 2024 03:49:24 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n```bash\ndocker inspect n8n-n8n-1 --format \"{{.State.Health.Status}}\"\nhealthy\n```\n\n5. Check network connectivity\n\n```\n# List networks\ndocker network ls | grep n8n\n```\n```bash\ndocker network ls | grep n8n\ndfc9a550c481   n8n_network       bridge    local\n```\n```\n# Inspect n8n network\ndocker network inspect n8n_network\n```\n6. Check resource usage\n```\ndocker stats n8n-n8n-1 n8n-db-1 --no-stream\n```\n```bash\ndocker stats n8n-n8n-1 n8n-db-1 --no-stream\nCONTAINER ID   NAME        CPU %     MEM USAGE / LIMIT   MEM %     NET I/O           BLOCK I/O        PIDS\nf58284967ac5   n8n-n8n-1   0.38%     106MiB / 3.48GiB    2.98%     24.7kB / 24.3kB   4.1kB / 0B       13\n8ab178b53693   n8n-db-1    6.96%     53.62MiB / 2GiB     2.62%     759kB / 605kB     823kB / 61.2MB   7\n```\n\n7. Verify volumes\n```\ndocker volume ls | grep n8n\ndocker volume inspect n8n_data\ndocker volume inspect n8n_postgres_data\n```\n\n8. Check PostgreSQL configuration\n```\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SHOW max_connections;\"\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SHOW shared_buffers;\"\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SHOW effective_cache_size;\"\n```\n```bash\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SHOW max_connections;\"\n max_connections \n-----------------\n 100\n(1 row)\n\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SHOW shared_buffers;\"\n shared_buffers \n----------------\n 512MB\n(1 row)\n\ndocker exec n8n-db-1 psql -U ${DB_POSTGRESDB_USER} -d ${DB_POSTGRESDB_DATABASE} -c \"SHOW effective_cache_size;\"\n effective_cache_size \n----------------------\n 1536MB\n(1 row)\n```\n\n## 3. Troubleshoot n8n service container\n\nCheck n8n logs for error messages\n\n```bash\ndocker compose logs n8n\n```\n\nCheck if n8n process is running inside container\n\n```bash\ndocker exec n8n-n8n-1 ps aux | grep n8n\n```\n\nCheck network binding inside container\n\n```bash\ndocker exec n8n-n8n-1 netstat -tlpn\n```\n\nCheck if n8n can connect to database\n\n```bash\ndocker exec n8n-n8n-1 nc -zv db 5432\n```\n\nView detailed container health check history\n\n```bash\ndocker inspect -f '{{json .State.Health}}' n8n-n8n-1 | jq .\n```\n\nCheck environment variables\n\n```bash\ndocker exec n8n-n8n-1 env | grep N8N_\n```\n\nCheck listening ports\n\n```bash\ndocker exec n8n-n8n-1 ss -tlpn\n```\n\n## 4. Updating n8n\n\nTo update n8n to the latest version, follow these steps.\n\n### Pre-Update Checklist\n\nBefore updating, record your current state:\n\n```bash\n# Navigate to n8n directory\ncd /home/n8n-setup/n8n\n\n# Check current container status and uptime\ndocker ps | grep n8n\n\n# Record current n8n version\ndocker exec n8n-n8n-1 n8n --version\n\n# Check current images\ndocker images | grep -E \"n8nio/n8n|postgres\"\n\n# Optional: Backup volumes before major updates\ndocker run --rm -v n8n_data:/data -v $(pwd):/backup alpine tar czf /backup/n8n_data_backup_$(date +%Y%m%d).tar.gz /data\ndocker run --rm -v n8n_postgres_data:/data -v $(pwd):/backup alpine tar czf /backup/n8n_postgres_backup_$(date +%Y%m%d).tar.gz /data\n```\n\n### Update Commands\n\nRun these commands in sequence:\n\n```bash\n# Pull the latest n8n image\ndocker compose pull\n\n# Stop and remove current containers\ndocker compose down\n\n# Start updated containers\ndocker compose up -d\n```\n\n### Post-Update Verification\n\nAfter updating, verify everything is running correctly:\n\n```bash\n# Check container status\ndocker compose ps\n\n# Verify containers are healthy\ndocker inspect n8n-n8n-1 --format \"{{.State.Health.Status}}\"\ndocker inspect n8n-db-1 --format \"{{.State.Health.Status}}\"\n\n# Check updated n8n version\ndocker exec n8n-n8n-1 n8n --version\n\n# View logs for any errors\ndocker compose logs n8n --tail 50\n\n# Test health endpoint\ncurl -I http://localhost:5678/healthz\n```\n\n### Notes\n\n- Your data is preserved in Docker volumes (`n8n_data` and `n8n_postgres_data`)\n- The `-d` flag runs containers in detached (background) mode\n- If updating PostgreSQL, ensure compatibility with your n8n version\n- For major version upgrades, always backup volumes first\n- Check [n8n release notes](https://github.com/n8n-io/n8n/releases) for breaking changes before updating","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentminmod%2Fn8n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentminmod%2Fn8n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentminmod%2Fn8n/lists"}