Dit is een oude revisie van het document!
Install with the bash script from the opencode website:
curl -fsSL https://opencode.ai/install | bash
reload your shell (or login again) exec zsh
verify with:
opencode --version
The install script from the opencode repository has a fixed location for the binary located in the users homedirectory together with the user settings. changing this would involve ajusting the script at:
... INSTALL_DIR=$HOME/.opencode/bin mkdir -p "$INSTALL_DIR" ...
Create a systemd Service File
sudo vi /etc/systemd/system/opencode.service
add:
[Unit] Description=OpenCode AI Assistant After=network.target [Service] Type=simple User=abel ProtectHome=false WorkingDirectory=/home/abel/opencode/projects ExecStart=/home/abel/.opencode/bin/opencode web --port 4096 --hostname 0.0.0.0 Restart=always RestartSec=10 [Install] WantedBy=multi-user.target
User=abel seems unsafe but that is how it works, and seeing as it is on the personal workstation any sequrity risk is minimal.
Start and enable opencode by:
sudo systemctl enable opencode --now
This systemd unit started a web interface on http://localhost:4096/
there is also a VSCodium plugin. how to set this up you can find here.