# .env - what to commit, how to onboard new devs

**URL:** <https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628>\
**Category:** Help me!\
**Created:** [October 27, 2021, 11:20am UTC](https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628 "2021-10-27T11:20:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [October 27, 2021, 11:20am UTC](https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628/1 "2021-10-27T11:20:44Z")

</div>

Hi,

I’ve created my forest admin back end for use with my local development environment. The generated code includes a .env files with values for `FOREST_AUTH_SECRET` and `FOREST_ENV_SECRET`.

I don’t understand where these come from. I’ve scoured all the settings I could find in the admin interface, but I can’t see them there. It’s not clear if these are per project, or per developper.

For this reason, it’s also not clear how another develop would check out the project. If I add a developer to the team, would they need the exact same .env file to work locally?

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [October 27, 2021, 12:06pm UTC](https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628/2 "2021-10-27T12:06:40Z")

</div>

Hello @timothyarmes, and welcome to our community 👋

Using `forest-cli`, the generated `.gitignore` ignore the `.env`, and it’s the expected behavior.

`FOREST_AUTH_SECRET` is used for the authentication process, and should be kept secret (And, for security purposes, different for every environment). You can set it to whatever you’d like, and it’s not a value that forest can access.

`FOREST_ENV_SECRET` however, is related to the current environment you are using. When deploying remote (Either staging or production environment), the forestadmin UI will give you new values for this environment variable.

You should also be able to create new development environment, either using `forest-cli`, or the `Project settings > Environments` tabs from the UI. This value can be seen as an API Key, and should not be shared. You should be able to read more infos about this [here](https://docs.forestadmin.com/documentation/reference-guide/project-settings/environments-tab#creating-a-new-environment). A ForestAdmin project will most likely have multiple environments. Usually, one environment per developers, remote environment as you need them, and one production environment.

You can also read this part of the documentation about our [development workflow](https://docs.forestadmin.com/documentation/getting-started/development-workflow), that contains a few commands to help onboard new developers on a projects, as well as collaborative work on your forestadmin UI layout.

Let me know if it was enough, or if you need more details 🙏

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [October 27, 2021, 1:15pm UTC](https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628/3 "2021-10-27T13:15:45Z")

</div>

Hi,

Thanks for your response.

It’s clearer, but not totally clear 🙂 .

So, can/should more than one developer work on the same development environment, or should they create one each?

Can you confirm that once they checked out the project, they’ll need the exact same .env, but with potentially a different FOREST\_ENV\_SECRET (depending on your answer to the above)

I’ve read through the branching page. Can more than one developer work on the same branch? If so, they presumable have to work on the same development environment…

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [October 27, 2021, 1:46pm UTC](https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628/4 "2021-10-27T13:46:52Z")

</div>

> So, can/should more than one developer work on the same development environment, or should they create one each?

This is a potential source of conflict, and even though it may work, I would highly suggest to avoid sharing the same development environment/`FOREST_ENV_SECRET`.

> Can you confirm that once they checked out the project, they’ll need the exact same .env, but with potentially a different FOREST\_ENV\_SECRET (depending on your answer to the above)

A few tweaks might be necessary (`DATABASE_URL, APPLICATION_PORT, ...`), but normally, except for `FOREST_ENV_SECRET` (and `FOREST_AUTH_SECRET` if you consider it useful/have security concerns), other environment variables can remain the same.

> I’ve read through the branching page. Can more than one developer work on the same branch? If so, they presumable have to work on the same development environment…

Currently, it’s not possible to have multiple developers on the same branch. Our branching/development workflow is still “new”, but more features may come in the future.

Hope it’s clearer now, don’t hesitate if you have anymore question regarding this topic

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [October 27, 2021, 1:49pm UTC](https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628/5 "2021-10-27T13:49:02Z")

</div>

Thanks, it’s clear now 🙂

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [October 27, 2021, 1:53pm UTC](https://community.forestadmin.com/t/env-what-to-commit-how-to-onboard-new-devs/3628/6 "2021-10-27T13:53:02Z")

</div>

Good to know.

I’m marking the thread as resolved, but do not hesitate to open a new thread if you have any other questions 🙏
