Open folder
Open the project folder in the chat.
You have a program that runs from terminal but not as a service. Devnix Ops writes the unit file, verifies the syntax, reloads the daemon, and runs systemctl enable --now name to start it at boot. The reader approves each command.
Open the project folder in the chat.
Write the unit file with write_file tool.
Check syntax with systemd-analyze verify.
Run sudo systemctl enable --now your service name.
example-app.servicecopiedsystemd-analyze verify example-app.serviceexit 0sudo systemctl daemon-reloadexit 0sudo systemctl enable --now example-appenabled[Unit]
Description=Example app
After=network.target
[Service]
Type=simple
ExecStart=/opt/example-app/run
User=exampleapp
WorkingDirectory=/opt/example-app
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.targetThis unit file defines a simple service that restarts on failure. It runs as a normal user and starts after the network target.
You write the unit file in the chat folder and use write_file to create it with the correct sections for your service so the agent sets the description and target. Verify the syntax. The agent defines the service type and the executable path you provide. It sets the user and working directory for the process. It adds restart rules and shows the file size in bytes. You approve the file creation before it saves to the disk. When the systemd journald service failed to start, you check the logs. You copy the file to the server with scp after approval.
You can modify an existing unit file using systemctl edit service, and the agent prepares the override locally for your careful review before applying changes. Approve changes. sudo enable --now starts it now and at boot for your server. The agent sends the file with scp after you approve. Daemon reload updates the manager configuration on the server effectively. Check the active state to confirm the service is running. View logs to verify correct operation of the application today. Use journalctl -u name -n 50 to check recent output for open ports as part of systemd service.