# Setting up FTP with Amcrest Camera

### Overview

Amcrest cameras can be fully configured to operate with no internet access, and can store videos and motion recordings locally on an SD card, via FTP, or on a NAS device. This post details how to set up the Amcrest camera to store motion events on a remote server via FTP, which can be displayed in Home Assistant.

<img src="/files/5HZ8YWYVHEAGSVJE08Dk" alt="" data-size="original">

{% hint style="info" %}
The Amcrest camera model used in this blog is the Amcrest 1080P WiFi Security Camera 2MP Indoor Pan/Tilt Wireless IP Camera, IP2M-841W, however the configuration options for various Amcrest cameras are likely very similar.
{% endhint %}

### Configuring an FTP Server

There are a multitude of articles detailing how to set up an FTP server. The main FTP requirements for Amcrest are:

* Network access from the Amcrest camera to the FTP server
* An FTP username and password the Amcrest camera can use
* Permissions to read and write over FTP on the remote server&#x20;

See the following articles for how to set up FTP:

* <https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-for-a-user-s-directory-on-ubuntu-20-04>
* <https://phoenixnap.com/kb/install-ftp-server-on-ubuntu-vsftpd>

### FTP as an Amcrest Storage Destination

Once an FTP server is set up, the Amcrest camera can be configured to store videos on the FTP server. Browse to the web server running on the camera's IP address on web 80 and authenticate as the admin user.&#x20;

**Storage Schedule** - Navigate to the storage schedule tab, and set the motion and alarm options to 24/7. This causes the camera to record motion events all day.

<figure><img src="/files/msrkhN2lqg7OeMntmzeM" alt=""><figcaption></figcaption></figure>

**Storage Destination** - Navigate to the storage destination tab, and enter the FTP connection details of the recently configured FTP server.

<figure><img src="/files/3AAqcvOqVqz8d6Seakls" alt=""><figcaption></figcaption></figure>

For various reasons, the Amcrest connection over FTP could be unsuccessful. Use the "test" option to verify the Amcrest camera can successfully connect to the FTP server and write files. When troubleshooting, run the following tcpdump command on the FTP server:

```
 sudo tcpdump -i eno1 port 21
```

And look for FTP commands being performed by the Amcrest Camera, such as:

<pre><code>FTP: 230 Login successful.
FTP: 257 "/" is the current directory
<strong>FTP: CWD uploads/FTP_TEST/1663706237_44757228270
</strong>FTP: stor ftp_test.txt
FTP: DELE ftp_test.txt
</code></pre>


---

# Agent Instructions: 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:

```
GET https://www.blakejarvis.com/home-assistant/setting-up-ftp-with-amcrest-camera.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
