# MAC Invalid Error

**URL:** <https://community.dreamfactory.com/t/mac-invalid-error/5602>\
**Category:** uncategorized\
**Created:** [January 23, 2025, 10:55am UTC](https://community.dreamfactory.com/t/mac-invalid-error/5602 "2025-01-23T10:55:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![df-shvasm](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@df-shvasm](https://community.dreamfactory.com/u/df-shvasm)\
**Post date:** [January 23, 2025, 10:55am UTC](https://community.dreamfactory.com/t/mac-invalid-error/5602/1 "2025-01-23T10:55:22Z")

</div>

Hello team, I keep getting MAC Invalid error. I simply followed the instructions given in the github page [GitHub - dreamfactorysoftware/df-docker: Docker container for DreamFactory.](https://github.com/dreamfactorysoftware/df-docker?tab=readme-ov-file) under Installing the DreamFactory Docker Container topic.  
Steps:

1. DId git clone and download df-docker
2. Sudo docker-compose build
3. Sudo docker-compose up -d
4. Then verified that all 4 containers are running (made web and postgres exposed to host) and ports are working
5. executed to sudo docker-compose exec web cat .env | grep APP\_KEY
6. Copied the key and pasted it on line 28 in dockerfile.
7. Browsed the Admin portal
8. When i click on API generation & Connections → API Types → Database it throws 500 error in the browser and when i checked the repose it is invalid MAC address.

I had registered my email earlier and i am using the same email ID. I am unable to change in mySQL database as the Connection field in sql\_db\_config is encrypted.  
Please help me. Thanks a lot

---

<div class="post-metadata">

**Author:** ![jacob\_yi\_df](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jacob\_yi\_df](https://community.dreamfactory.com/u/jacob_yi_df)\
**Post date:** [February 25, 2025, 11:05pm UTC](https://community.dreamfactory.com/t/mac-invalid-error/5602/2 "2025-02-25T23:05:32Z")

</div>

Hey!

You will need the APP\_KEY value from the `.env` file in `/opt/dreamfactory`. This can be done with the following command:  
`docker-compose exec web cat .env | grep APP_KEY`

Set this value as the APP\_KEY value in the docker-compose.yml file (line 28), encapsulating it in single quotes, to avoid receiving “The MAC is invalid” errors within your instance should you ever need to rebuild.

If this does not work you might need to restart the container:

```auto
sudo docker-compose down -v
sudo rm -rf storage/ bootstrap/cache/
git pull origin main
sudo docker-compose build --no-cache
sudo docker-compose up -d

```

---

<div class="post-metadata">

**Author:** ![df-shvasm](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@df-shvasm](https://community.dreamfactory.com/u/df-shvasm)\
**Post date:** [February 28, 2025, 1:31pm UTC](https://community.dreamfactory.com/t/mac-invalid-error/5602/3 "2025-02-28T13:31:53Z")

</div>

Thanks Jacob. I didn’t copy APP\_KEY at the first installation and proceeded with changes. None of the measures for cleaning and generating new APP\_KEY succeed in my case. So had to finally reinstall only worked.
