> 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/troubleshooting/device-cannot-connect-to-server.md).

# Device cannot connect to server

## **I have provisioned my device with a device.config file per the device setup instructions, however it is not showing in Cloud** C&#xB2;**. The device status indicates "Last seen: never"**

The most common cause for this problem is a routing or firewall issue between the device and server. Here are some troubleshooting tips:

1. Verify that the `device.config` is indeed in `/etc/` on the device (or root of udisk/sd card for Key Croc/Screen Crab), and that it is the correct provisioning file for your server.
2. Start the Cloud C² client on the device, either by rebooting it (WiFi Pineapple, LAN Turtle, Packet Squirrel, Screen Crab, Key Croc) or issuing the `C2CONNECT` command in your payload (Shark Jack, Signal Owl).
3. Verify that the ports specified by your Cloud C² server (from the command line parameters) are open and accessible by the device's network. The common defaults are TCP 80, 8080, 443, 2022.
4. Verify that the device can reach the server's network. For example, if a WiFi Pineapple is deployed on an LAN with the IP address 192.168.1.100, and the Cloud C² server is deployed on the Internet at example.com, verify from a terminal on the WiFi Pineapple that it can reach example.com by issuing "`ping -c4 example.com`"


---

# 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/troubleshooting/device-cannot-connect-to-server.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.
