-
Notifications
You must be signed in to change notification settings - Fork 1
Install
Lajos Sánta edited this page Mar 21, 2023
·
2 revisions
- python v3.10
- virtualenv (optional, but recommended)
sudo pip install virtualenv- pick some folder for the virtualenv's files (eg /var/www/claude)
virtualenv /var/www/claudesource /var/www/claude/bin/activate
pip install claude-0.4.2.tar.gz
- make writable
/var/www/claude/by the www-data user (chown www-data /var/www/claude/) - create a proper Claude config file in
/var/www/claude/config.yaml - create systemd service file
/etc/systemd/system/claude.servicewith this content:
[Unit]
Description=Claude service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=www-data
Environment=CLAUDE_CONFIG_FILE=/var/www/claude/config.yaml
ExecStart=/var/www/claude/bin/uvicorn claude.app:get_app --factory --port 5002 --workers 4 --host 0.0.0.0
[Install]
WantedBy=multi-user.target
- start:
systemctl start claude - automatically get it to start on boot
systemctl enable claude - Follow logs:
journalctl -u claude.service -f
- server config example for nginx
server {
listen 80;
server_name your.name.local;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:5002;
}
}file: /etc/xdg/lxsession/LXDE-pi/autostart
(the xset lines to about disable screen saver and screen blank, etc)
extra content:
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --start-fullscreen --start-maximized http://your.name.local/