> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/cloud-c2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/cloud-c2/guides/enabling-cloud-c-as-a-service-on-boot-and-exfiltration.md).

# Enabling Cloud C² as a service on boot and Exfiltration

## VIDEO GUIDE

{% embed url="<https://youtu.be/rgmL75ZBfSI>" %}

## ENABLING CLOUD C2 AS A SERVICE ON BOOT WITH SYSTEMD

Note: From version 3.0.0 onward all, Cloud C² editions (Community, Edition, Teams) use the same binary. Filenames for Cloud C² will differ from example - however all parameters remain the same.

```
# Enabling Cloud C2 as a service on a Linux-64 host with SystemD
# Builds on Hak5 episodes 2701 and 2702 with credit to Void-Byte
# https://forums.hak5.org/topic/50283-u...
# Expects Cloud C2 Community edition has run once before, generating c2.db
#
# Move Cloud C2 binary.
sudo mv c2-3.2.0_amd64_linux /usr/local/bin

# Create directory for database file
sudo mkdir /var/cloudc2

# Move database file
sudo mv c2.db /var/cloudc2/

# Create systemd service file. 
sudo vi /etc/systemd/system/cloudc2.service

# Replace parameters as necessary for your instance
[Unit]
Description=Hak5 Cloud C2
After=cloudc2.service
[Service]
Type=idle
ExecStart=/usr/local/bin/c2-3.2.0_amd64_linux -hostname example.com -https -db /var/cloudc2/c2.db
[Install]
WantedBy=multi-user.target

# Reload, enable on boot, start and inspect the newly created Cloud C2 service
sudo systemctl daemon-reload
sudo systemctl enable cloudc2.service
sudo systemctl start cloudc2.service
sudo systemctl status cloudc2.service
```


---

# 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://documentation.hak5.org/cloud-c2/guides/enabling-cloud-c-as-a-service-on-boot-and-exfiltration.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.
