claude-memory/graph/configurations/discord-bot-systemd-service-with-environment-variables-d0e2e9.md
2026-02-13 14:35:29 -06:00

36 lines
1.2 KiB
Markdown

---
id: d0e2e9ab-9a46-44b3-b749-8c2a562d0a1b
type: configuration
title: "Discord bot systemd service with environment variables"
tags: [discord-bot, systemd, deployment, claude-cli, configuration, claude-coordinator]
importance: 0.7
confidence: 0.8
created: "2026-02-13T20:35:20.868552+00:00"
updated: "2026-02-13T20:35:29.511829+00:00"
relations:
- target: 7b6d183b-e221-471a-8078-e8639ebdd55a
type: RELATED_TO
direction: incoming
strength: 0.8
---
Systemd service setup for Claude Discord Coordinator bot running as non-root user.
Service: /etc/systemd/system/claude-coordinator.service
Key config:
- User=discord-bot (required for Claude CLI bypassPermissions)
- EnvironmentFile=/opt/projects/claude-coordinator/.env
- WorkingDirectory=/opt/projects/claude-coordinator
- Restart=always with RestartSec=10
Environment variables (.env):
- DISCORD_TOKEN=<bot-token-from-discord-developer-portal>
- CLAUDE_CODE_OAUTH_TOKEN=<anthropic-token>
Git credentials (~/.git-credentials):
- Format: https://cal:{GITEA_TOKEN}@git.manticorum.com
- git config --global credential.helper store
Critical: Claude CLI requires non-root user for --permission-mode bypassPermissions
Discord tokens start with MTI..., Anthropic tokens start with sk-ant-oat01-