1. 설정 하기
sudo nano /etc/systemd/system/n8n.service
[Unit]
Description=n8n workflow automation
After=network.target
[Service]
Type=simple
User=kitae
Environment="N8N_HOST=kitae104.work"
Environment="N8N_PORT=5678"
Environment="N8N_PROTOCOL=https"
Environment="N8N_EDITOR_BASE_URL=https://kitae104.work:8000"
Environment="WEBHOOK_URL=https://kitae104.work:8000"
Environment="N8N_SECURE_COOKIE=true"
Environment="NODE_ENV=production"
ExecStart=/usr/bin/n8n start
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
2. 적용 및 재시작
sudo systemctl daemon-reload
sudo systemctl enable --now n8n
sudo systemctl restart n8n
3 기존에 떠 있던 수동 실행 프로세스 종료(중복 방지)
kill 2368
kill 3088
4. 설정 파일
/etc/nginx/sites-enabled/n8n_8000
5. 서버가 살아 있는지 확인
systemctl status n8n --no-pager -l
sudo systemctl daemon-reload
sudo systemctl restart n8n
systemctl show -p MainPID --value n8n