Last active
November 27, 2020 05:20
-
-
Save janaSunrise/4d64e5a36ca455964595824b024ffd2a to your computer and use it in GitHub Desktop.
This is the systemd service, That will enable the process to keep running, until Manually stopped, and Also Automatically will bind to the port specified.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=code-server | |
After=network.target | |
[Service] | |
Type=simple | |
Environment=PASSWORD=your_password_here | |
ExecStart=/usr/bin/code-server --bind-addr 0.0.0.0:8080 --user-data-dir /var/lib/code-server --auth password | |
Restart=always | |
RestartSec=10 | |
User=<your-user> | |
Group=<your-group> | |
WorkingDirectory=<working-dir> | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now follow these steps:
⚠️ Remember to replace
your_password_here
with your desired password. And<you-user>
with the user name.sudo systemctl enable code-server
sudo systemctl status code-server
sudo systemctl enable code-server
sudo ufw allow 8080
or the Port you added, and thensudo ufw reload
😁 And You can access it here ➡️
<your_ip>:<your_port_specified>