N8N Admin Dashboard
A small admin dashboard for managing an n8n instance. It provides:
- Monitor n8n container status and uptime
- Update n8n Docker image version
- Create and upload data backups to S3
- One-click deploy of the admin dashboard itself
Tech stack
- Server: Node.js (Express)
- Frontend: React (Vite + Tailwind)
- Shell scripts: backup, update version, deploy
Requirements
- Node.js >= 22
- Docker + Docker Compose
- AWS CLI configured (for backups to S3)
- Git (for self-deploy from repo)
Quick start (development)
# install deps
npm install
# run server and Vite client
npm run dev
- Server: http://localhost:3333
- Client (Vite): http://localhost:5173
Environment configuration
The server reads environment variables from your shell or a .env in the project root. The backup and update scripts read .env from your n8n data/stack folder.
Server (project root) variables:
# .env (project root)
PORT=3333 # optional, default 3333
DATA_FOLDER=/path/to/n8n-stack # folder containing n8n .env and docker-compose.yml
REPO_FOLDER=/absolute/path/to/this/repo # required for Deploy Updates action
n8n stack/data folder variables (used by backup + update):
# ${DATA_FOLDER}/.env (required for backup and version update)
# for backups
BACKUP_PREFIX=n8n-prod
S3_BUCKET=your-bucket
S3_REGION=us-east-1
# optional
S3_FOLDER=backups/n8n
# for version updates; this will be edited in-place by the script
N8N_DOCKER_VERSION=1.64.0
AWS CLI must be configured on the host running backups:
aws configure
Running in production
Install the service
cd /root
git clone [email protected]:herculift/automation.git
cd automation
npm install
npm run build
node --inspect server.js >> server.log & (OR npm run start)
Alternatively, use the in-app “Deploy Updates” button (see below) which runs the scripts/deploy.sh script:
- Pulls latest
origin/<branch>(defaultmain) - Installs deps and builds
- Restarts the Node server (systemd service configured)
Configure systemd service for node app
- Create a file at
/etc/systemd/system/n8n-manager.servicewith the following content:
[Unit]
Description=N8N Admin Dashboard
[Service]
ExecStart=/root/.nvm/versions/node/v23.11.0/bin/node server.js >> server.log
Restart=always
User=root
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/root/automation
[Install]
WantedBy=multi-user.target
- Enable and Start the Service.
systemctl enable n8n-manager
systemctl start n8n-manager
systemctl status n8n-manager
- Troubleshooting if you have any error running the service.
journalctl -u n8n-manager # Error tracking
systemctl daemon-reload # Reloading daemon config
EXPOSE the port for web service
sudo ufw allow 3333
Configure caddy to make the webservice accessible from internet
- Create a domain for the webservice
- Point the domain to the same server as N8N.
- Update
/root/n8n-docker-caddy/caddy_config/Caddyfileby adding the following line:
webservice.buink.com {
reverse_proxy {HOST_IP}:3333
}
- Restart docker to apply changes
docker compose down
docker compose up -d
In case there is nginx server configured as reverse proxy, you need to update the nginx configuration
Long-running Data Backup endpoint (timeouts)
The POST /api/runBackupData endpoint can take a few minutes. If you are behind a reverse proxy (Caddy or Nginx), increase the proxy timeouts for this path so the connection is not closed early.
Caddy (inside your site block):
# Allow the backup endpoint to run for ~3 minutes
route /api/runBackupData* {
reverse_proxy {HOST_IP}:3333 {
transport http {
read_timeout 190s
write_timeout 190s
}
}
}
Nginx (inside your server config):
# Increase timeouts for the backup endpoint only
location /api/runBackupData {
proxy_pass http://{HOST_IP}:3333;
proxy_read_timeout 190s;
proxy_send_timeout 190s;
}
After updating, reload your proxy:
- Caddy:
caddy reload(or restart your Caddy container) - Nginx:
nginx -s reload(orsystemctl reload nginx)
Access the webservice
Open the browser and hit webservice.buink.com. Follow the screen guide to upgrade n8n version.
Features
Status
- Endpoint:
GET /api/status - Returns
{ success: true, status: "running" | "stopped", version, uptime, lastDeployTime } - Internally parses
docker psand findsdocker.n8n.ioimage line
Version Manager
- Lists available Docker tags from Docker Hub
- Endpoint:
GET /api/getAvailableN8NVersions
- Endpoint:
- Update version:
- Endpoint:
POST /api/updateN8NVersion - Body:
{ "version": "TAG" } - Effect:
- Edits
${DATA_FOLDER}/.envreplacingN8N_DOCKER_VERSION - Stops container
docker-caddy-n8n-x - Runs
docker compose up -d
- Edits
- Endpoint:
Important:
- Make sure
${DATA_FOLDER}points to your n8n deployment folder that contains.envanddocker-compose.yml - Confirm your reverse proxy/container name
docker-caddy-n8n-xmatches your setup
Data Backup
- Endpoint:
POST /api/runBackupData - Runs
scripts/backup_n8n_data.shwhich:- Creates tarball from
n8n_dataDocker volume - Uploads to
s3://$S3_BUCKET/$S3_FOLDER/$BACKUP_PREFIX-YYYYmmddHHMMSS.tar.gz
- Creates tarball from
- Requires
${DATA_FOLDER}/.envto includeBACKUP_PREFIX,S3_BUCKET,S3_REGION - Requires AWS CLI credentials present in
~/.aws/credentials
Deploy Updates (self-deploy)
- Endpoint:
POST /api/deployUpdates - Requires
REPO_FOLDERto be set - Script
scripts/deploy.sh:git fetch --all --prunegit checkout <branch>(defaultmain)git pull --rebase --autostash origin <branch>npm ciornpm installnpm run build- Restart
node server.jsin background
Scripts (manual usage)
# update n8n version (edits ${DATA_FOLDER}/.env and restarts compose)
bash scripts/update_n8n_version.sh <VERSION> [DATA_FOLDER]
# create and upload backup to S3
bash scripts/backup_n8n_data.sh [DATA_FOLDER]
# deploy this dashboard from repo path and optional branch (default main)
bash scripts/deploy.sh <REPO_PATH> [BRANCH]
Troubleshooting
- Backups failing:
- Ensure
~/.aws/credentialsexists andS3_BUCKET,S3_REGION,BACKUP_PREFIXset in${DATA_FOLDER}/.env - Check
/tmp/n8n_backupand the upload step
- Ensure
- Version update not taking effect:
- Confirm
N8N_DOCKER_VERSIONis present in${DATA_FOLDER}/.env - Confirm your compose project and container names match your environment
- Check
docker compose up -doutput
- Confirm
- Deploy Updates not working:
- Ensure
REPO_FOLDERis a valid git repo path with correct permissions - Check logs:
/tmp/n8n-dashboard-deploy.logand/tmp/n8n-admin-server.log
- Ensure
License
MIT