> For the complete documentation index, see [llms.txt](https://bitcore-btx.gitbook.io/bitcore-btx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bitcore-btx.gitbook.io/bitcore-btx/privatekey-1/bitcore-masternodes-1/systemd-service-for-bitcore-daemon.md).

# Systemd Service for BitCore Daemon

IMPORTANT: This guide only works if you have followed the [Masternode Quick Guide](https://bitcore-btx.gitbook.io/bitcore-btx/bitcore-masternode-guide).\
Personal configurations are not considered in this guide.

**Stop your BitCore Daemon**

`bitcore-cli stop`

**Install Nano for creating/editing files (or use vi)**

`apt install nano`

**Create Systemd Service File**

`nano /etc/systemd/system/bitcored.service`

**and insert this text:**

`[Unit]`\
`Description=BitCore Masternode Service`\
`After=network.target`

`[Service]`\
`User=root`\
`Group=root`

`Type=forking`

`ExecStart=/usr/local/bin/bitcored -daemon -shrinkdebugfile`\
`ExecStop=/usr/local/bin/bitcore-cli stop`

`Restart=always`\
`PrivateTmp=true`\
`TimeoutStopSec=60s`\
`TimeoutStartSec=10s`\
`StartLimitInterval=120s`\
`StartLimitBurst=5`

`[Install]`\
`WantedBy=multi-user.target`

**Close the Editor and save the File with STRG + X**\
**Enable and start the Service (service starts automatically after reboot or Daemon crash)**

`sudo systemctl daemon-reload`\
`sudo systemctl enable bitcored`\
`sudo systemctl start bitcored`

**Check the Service**

`systemctl status bitcored | grep -i "Active" -B 1`

**and you should see (example):**\
\
`Loaded: loaded (/etc/systemd/system/bitcored.service; enabled; vendor preset: enabled)`\
`Active: active (running) since Sat 2020-05-02 14:27:09 UTC; 5h 6min ago`

**Credits:** Thanks <https://t.me/Rammbock1> for his contribution!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bitcore-btx.gitbook.io/bitcore-btx/privatekey-1/bitcore-masternodes-1/systemd-service-for-bitcore-daemon.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
