Skip to content

Systemd

Add a New Service

/usr/local/bin/codeboot.sh

#!/bin/sh 
code tunnel

Add execute perms:

chmod +x /usr/local/bin/codeboot.sh

/etc/systemd/system/code-server.service

[Unit]
After=network.target

[Service]
User=<yourusername>
Group=<yourgroupname>
ExecStart=/usr/local/bin/codeboot.sh
Restart=on-failure
RestartSec=90s

[Install]
WantedBy=default.target

Start

systemctl start code-server

Logs

sudo journalctl -u code-server