DEV Community

Cover image for Now you can run a code-server as a service.
Ionut aka BlitzCloud
Ionut aka BlitzCloud

Posted on • Edited on

Now you can run a code-server as a service.

As I mentioned in my last article, I said that code-server lacks a service to run it in the background or at startup. I build a systemd service to solve this issue.

If you want to have the code-server running n the background just follow this steps:

  • Create the systemd service with this command
sudo nano /etc/systemd/system/code-server.service
Enter fullscreen mode Exit fullscreen mode
  • Paste the code below.
[Unit]
Description=Code-Server Service
After=network.target

[Service]
Type=simple
Restart=always
User= yourUser
ExecStart=/usr/local/bin/code-server

[Install]
WantedBy=multi-user.target
Enter fullscreen mode Exit fullscreen mode
  • Start the service
sudo service code-server start
Enter fullscreen mode Exit fullscreen mode
  • Check the status
sudo service code-server status
Enter fullscreen mode Exit fullscreen mode
  • Optional enable the process at startup
sudo systemctl enable code-server
Enter fullscreen mode Exit fullscreen mode

Now you should be able to take you safe development environment on your iPad or on your grandma slow computer,without being afraid that the server will stop.

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay