If you want to run your own app on a Debian system, like a RaspberryPi, you'll need to build the binary for the given device then setup systemd to run the binary.
Given you have an app called myapp, first create a service file to run your app, say at myapp.service on your local system:
[Unit]
Description=Some description here...
After=network.target
[Service]
Restart=always
RestartSec=3
# setup any env vars the process needs:
Environment=PORT=80 SOMETHING_ELSE=true
# path to binary to run:
ExecStart=/usr/local/sbin/myapp
[Install]
WantedBy=multi-user.targetThen, in the terminal, copy over the binary and your service file and then configure them to run.
Build your app (e.g. with golang, "go build ."), then make it executable (if needed):
sudo chmod +x myappCopy to device:
scp myapp myapp.service user@host.local:~/SSH into your device:
ssh user@host.localMove files where they need to go:
sudo mv myapp /usr/local/sbin/
sudo mv myapp.service /etc/systemd/system/Enable system service:
sudo systemctl enable myapp --nowRestart your app if needed (e.g. after an update):
sudo systemctl restart myapp