---
title: "Deploy n8n + LinkedIn MCP"
description: "n8n workflow automation with Postgres and a LinkedIn MCP server"
category: "Automation"
url: https://railway.com/deploy/n8n-linkedin-mcp
---

# Deploy n8n + LinkedIn MCP

n8n workflow automation with Postgres and a LinkedIn MCP server

**[Deploy n8n + LinkedIn MCP on Railway](https://railway.com/template/n8n-linkedin-mcp)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/n8n-linkedin-mcp/manifest.json

- **Creator:** Sunday Johnson's Projects
- **Category:** Automation
- **Total deploys:** 2

## Template content

### n8n https://devicons.railway.app/n8n?variant=light

- **Image:** n8nio/n8n
- **Health check:** /healthz
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:latest

### linkedin-mcp

- **Image:** stickerdaniel/linkedin-mcp-server:latest
- **Start command:** `bash -c 'rm -f /home/pwuser/.linkedin-mcp/profile/SingletonLock /tmp/.X99-lock /tmp/.X11-unix/X99; MODE="${MODE:-prod}"; if [ "$MODE" = "auth" ]; then VNC=1; fi; if [ "${VNC:-1}" != "0" ]; then VNC=1; HEADLESS=false; else VNC=0; HEADLESS=true; fi; export MODE VNC HEADLESS; echo "launch: MODE=$MODE VNC=$VNC HEADLESS=$HEADLESS"; if [ "$VNC" = "1" ]; then mkdir -p /tmp/.X11-unix; Xvfb :99 -screen 0 "${XVFB_RES:-1024x600x24}" -nolisten tcp >/tmp/xvfb.log 2>&1 & for i in $(seq 1 50); do [ -S /tmp/.X11-unix/X99 ] && break; sleep 0.2; done; export DISPLAY=:99; echo "xvfb ready: $(ls /tmp/.X11-unix 2>&1 | tr "\n" " ")"; cat /tmp/xvfb.log; fi; if [ "$MODE" = "auth" ]; then echo "starting login viewer"; exec python -m linkedin_mcp_server --log-level DEBUG --login --login-viewer --user-data-dir /home/pwuser/.linkedin-mcp/profile --claim-profile-root; fi; if [ "$VNC" = "1" ]; then for wm in openbox fluxbox icewm twm; do if command -v $wm >/dev/null 2>&1; then echo "starting WM: $wm"; $wm >/tmp/wm.log 2>&1 & break; fi; done; (umask 077; printf %s "$VNC_PASSWORD" > /tmp/vncpw); x11vnc -display :99 -forever -shared -rfbport 5900 -localhost -passwdfile /tmp/vncpw -quiet -noxdamage -noxrecord -noxfixes & websockify --web /usr/share/novnc 6080 localhost:5900 & fi; sed -i "/window_placement/,/}/c\"window_placement\": { }" /home/pwuser/.linkedin-mcp/profile/Default/Preferences 2>/dev/null || true; rm -rf /home/pwuser/.linkedin-mcp/profile/Default/Service\ Worker/ /home/pwuser/.linkedin-mcp/profile/Default/Cache/; echo IyEvYmluL3NoCmV4ZWMgIiRDSFJPTUVfUkVBTCIgIiRAIiBcCiAgLS1kaXNhYmxlLWRldi1zaG0tdXNhZ2UgXAogIC0tZGlzYWJsZS1ncHUgXAogIC0tZW5hYmxlLWxvdy1lbmQtZGV2aWNlLW1vZGUgXAogIC0tcmVuZGVyZXItcHJvY2Vzcy1saW1pdD0yIFwKICAtLWpzLWZsYWdzPS0tbWF4LW9sZC1zcGFjZS1zaXplPTUxMiBcCiAgLS1kaXNhYmxlLWV4dGVuc2lvbnMgXAogIC0tZGlzYWJsZS1iYWNrZ3JvdW5kLW5ldHdvcmtpbmcgXAogIC0tZGlzYWJsZS1jb21wb25lbnQtdXBkYXRlIFwKICAtLWRpc2FibGUtc3luYyBcCiAgLS1kaXNhYmxlLWJyZWFrcGFkIFwKICAtLWRpc2FibGUtY3Jhc2gtcmVwb3J0ZXIgXAogIC0tZGlzay1jYWNoZS1zaXplPTEgXAogICRDSFJPTUVfRVhUUkFfRkxBR1MK | base64 -d > /tmp/chrome-wrap.sh; chmod +x /tmp/chrome-wrap.sh; CHROME_REAL=$(find / -xdev -type f -name chrome -perm -u+x 2>/dev/null | grep -v -e headless -e chrome-wrap | head -1); echo "chrome real binary: $CHROME_REAL"; if [ -n "$CHROME_REAL" ]; then export CHROME_REAL CHROME_PATH=/tmp/chrome-wrap.sh; echo "chrome wrapper enabled"; fi; exec python -m linkedin_mcp_server --log-level DEBUG --transport streamable-http --host 0.0.0.0 --port 8765 --user-data-dir /home/pwuser/.linkedin-mcp/profile'`
- **Public domain:** Yes

## Documentation

# Deploy and Host n8n + LinkedIn MCP on Railway

n8n is a fair-code workflow automation platform. It lets you connect apps and APIs through a visual editor, trigger workflows from webhooks or schedules, and add custom code or AI steps. This template pairs n8n with a LinkedIn MCP server so your workflows and AI agents can reach LinkedIn through MCP.

## About Hosting n8n + LinkedIn MCP

This template deploys three services on Railway: n8n, a Postgres database, and a linkedin-mcp service. n8n stores its workflows, execution history and encrypted credentials in Postgres, which keeps its data on a persistent volume so it survives redeploys. The linkedin-mcp service runs a headless Chrome browser and exposes an MCP server over HTTP, with optional VNC settings for remote desktop access. The services share Railway's private network, and the database variables are linked for you. On deploy, Railway generates the n8n encryption key, the Postgres password and the VNC password, and sets the webhook URL from your n8n public domain.

## Common Use Cases

- Automate LinkedIn research and outreach workflows driven by n8n
- Give AI agents in n8n access to LinkedIn tools through MCP
- Build webhook-driven workflows and API integrations
- Run scheduled jobs, reports and data pipelines

## Dependencies for n8n + LinkedIn MCP Hosting

- [n8n](https://github.com/n8n-io/n8n) ([documentation](https://docs.n8n.io))
- Postgres database, included in this template
- linkedin-mcp service, included in this template

### Implementation Details

The `N8N_ENCRYPTION_KEY` variable is generated on first deploy and encrypts every credential you save in n8n. Copy it from the n8n service's Variables tab and store it safely. If you lose it, n8n can't decrypt your saved credentials.

The linkedin-mcp service needs a LinkedIn session to be useful, and `VNC_PASSWORD` is generated for the optional VNC desktop. Keep that password private, and only expose the service as widely as you need.

Automating LinkedIn can conflict with LinkedIn's terms of service. Review them before you use this template.

## Why Deploy n8n + LinkedIn MCP on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying n8n + LinkedIn MCP on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/n8n-linkedin-mcp
