# MAX\_PRIVATE\_PROJECTS\_PER\_USER for Docker installation

**URL:** <https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520>\
**Category:** Self hosted Taiga\
**Tags:** docker\
**Created:** [January 24, 2024, 11:44am UTC](https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520 "2024-01-24T11:44:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maryisdead](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/maryisdead/32/2043_2.png) [@maryisdead](https://community.taiga.io/u/maryisdead)\
**Post date:** [January 24, 2024, 11:44am UTC](https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520/1 "2024-01-24T11:44:40Z")

</div>

Hi there!

For clarification, I’m talking about

```auto
# PUBLIC OR PRIVATE NUMBER OF PROJECT PER USER
MAX_PRIVATE_PROJECTS_PER_USER = 1 # None == no limit
MAX_PUBLIC_PROJECTS_PER_USER = 0 # None == no limit
MAX_MEMBERSHIPS_PRIVATE_PROJECTS = None # None == no limit
MAX_MEMBERSHIPS_PUBLIC_PROJECTS = None # None == no limit

```

which can be found in `taiga-back/settings/config.py.prod.example`.

I’m having trouble restricting project creation for a Docker installation. I tried exposing the responsible variables via `.env` and reading them in through `docker-compose.yml`/`docker-compose-inits.yml` but without any effect.

Then again, skimming the code, it appears to me that these variables can only be set through a dedicated config.py. Can somebody confirm this? That would be a real pity.

Would that then mean that I’d have to dump the current `.env`-based installation and switch to a configuration via the Python configuration file?

It seems I can’t run both together and the [corresponding documentation](https://github.com/kaleidos-ventures/taiga-docker?tab=readme-ov-file#advanced-configuration) seems to confirm this.

---

<div class="post-metadata">

**Author:** ![yami](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/yami/32/289_2.png) [@yami](https://community.taiga.io/u/yami)\
**Post date:** [January 25, 2024, 8:58am UTC](https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520/2 "2024-01-25T08:58:21Z")

</div>

hi @maryisdead welcome to our community.

I can see two options:

1. change `config.py` in `taiga-back/docker`.  
Add those variables in the file, reading from `os.getenv` (check the file and follow other examples).  
Then build your own taiga docker image and use it in your docker-compose.yml

2. use the advanced configuration and map a `config.py` file with all the configurations you want/need

Cheers!

---

<div class="post-metadata">

**Author:** ![maryisdead](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/maryisdead/32/2043_2.png) [@maryisdead](https://community.taiga.io/u/maryisdead)\
**Post date:** [January 25, 2024, 9:57am UTC](https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520/3 "2024-01-25T09:57:06Z")

</div>

Alright, thanks.

What’s the best place to suggest having those four variables exposed in `.env` as well?

---

<div class="post-metadata">

**Author:** ![yami](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/yami/32/289_2.png) [@yami](https://community.taiga.io/u/yami)\
**Post date:** [January 25, 2024, 10:31am UTC](https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520/4 "2024-01-25T10:31:10Z")

</div>

if you’re using option 1, you should write those variables in the `.env` file so they get to the docker process and sent to the container.

if you’re using option 2, you should write those variables in the `config.py` file mapped into the container.

Cheers!

---

<div class="post-metadata">

**Author:** ![maryisdead](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/maryisdead/32/2043_2.png) [@maryisdead](https://community.taiga.io/u/maryisdead)\
**Post date:** [January 31, 2024, 12:29pm UTC](https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520/5 "2024-01-31T12:29:04Z")

</div>

> [@yami](#):
>
> if you’re using option 1, you should write those variables in the `.env` file so they get to the docker process and sent to the container.

This is not working. It’s actually what this topic is about. 🙂 I’ll open a ticket.

Thank you anyways.

---

<div class="post-metadata">

**Author:** ![yami](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/yami/32/289_2.png) [@yami](https://community.taiga.io/u/yami)\
**Post date:** [February 2, 2024, 8:47am UTC](https://community.taiga.io/t/max-private-projects-per-user-for-docker-installation/2520/6 "2024-02-02T08:47:18Z")

</div>

hi @maryisdead

which part is not working? there are some parts involved:

- can you change the taiga-back/docker/config.py file?
- can you rebuild the image without errors?
- did you change the docker-compose.yml to use the new image?
- can you get the containers up & running? can you navigate to this taiga locally?
- can you check the environment variables inside a running container?
- are those variables in the environment inside the container?

cheers!
