# Pods automatic Creation

**URL:** <https://forum.solidproject.org/t/pods-automatic-creation/6263>\
**Category:** General Discussion\
**Created:** [March 7, 2023, 11:20am UTC](https://forum.solidproject.org/t/pods-automatic-creation/6263 "2023-03-07T11:20:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohamedRagab](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@MohamedRagab](https://forum.solidproject.org/u/MohamedRagab)\
**Post date:** [March 7, 2023, 11:20am UTC](https://forum.solidproject.org/t/pods-automatic-creation/6263/1 "2023-03-07T11:20:46Z")

</div>

Hello, I am new to Solid, and I want to create a script that automates creation/deletion of the pods inside a Community Solid Server machines.

---

<div class="post-metadata">

**Author:** ![A\_A](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/a_a/32/786_2.png) [@A\_A](https://forum.solidproject.org/u/A_A)\
**Post date:** [March 7, 2023, 12:50pm UTC](https://forum.solidproject.org/t/pods-automatic-creation/6263/2 "2023-03-07T12:50:42Z")

</div>

Welcome 🙂

You can create accounts with the JSON api by making a POST request to `/idp/register`: [Identity provider - Community Solid Server](https://communitysolidserver.github.io/CommunitySolidServer/5.x/usage/identity-provider/#json-api).  
For example, here’s the script I’ve used for automated testing: [solid-client-credentials-py/css\_utils.py at 3561923de61b1c4bba7a7100e93be87bbca83b7c · Otto-AA/solid-client-credentials-py · GitHub](https://github.com/Otto-AA/solid-client-credentials-py/blob/3561923de61b1c4bba7a7100e93be87bbca83b7c/tests/css_utils.py#L30-L62)

For deletion, I think it’s not possible yet. I’ve found this related issue: [Deleting user account from web interface · Issue #1132 · CommunitySolidServer/CommunitySolidServer · GitHub](https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1132)

---

<div class="post-metadata">

**Author:** ![MohamedRagab](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@MohamedRagab](https://forum.solidproject.org/u/MohamedRagab)\
**Post date:** [March 7, 2023, 2:27pm UTC](https://forum.solidproject.org/t/pods-automatic-creation/6263/3 "2023-03-07T14:27:36Z")

</div>

Thanks for the reply and your answer!

I think this solution would require creating new account whenever creating a new pod?

Is there a way to create multiple pods on the server with the same webID, or create the webIDs first, then assign/create pods using those account (identified by their webIDs)?

Thanks a lot for your kind reply!

Best,  
Ragab

---

<div class="post-metadata">

**Author:** ![A\_A](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/a_a/32/786_2.png) [@A\_A](https://forum.solidproject.org/u/A_A)\
**Post date:** [March 7, 2023, 5:57pm UTC](https://forum.solidproject.org/t/pods-automatic-creation/6263/4 "2023-03-07T17:57:49Z")

</div>

Hi Ragab

> [@MohamedRagab](#):
>
> I think this solution would require creating new account whenever creating a new pod?

Yes, it does. It looks like currently CSS requires a 1 webid ↔ 1 pod relationship and does not support multiple pods per webId ([Pod management authentication · Issue #972 · CommunitySolidServer/CommunitySolidServer · GitHub](https://github.com/CommunitySolidServer/CommunitySolidServer/issues/972)).

However, if you want to invest more time, you could achieve a nearly identical behaviour by creating n pods and n webIds, and afterwards changing the permissions such that one webId has Read+Write+Control permissions to all pods. So essentially, this one webId controls all the pods even though it didn’t create them. The steps would be:

1. Create 1 pod with webId `MyWebId`.
2. Create n other pods and store their usernames and passwords
3. For each of the other pods:  
4.1 Authenticate this pod (e.g. via [client credentials](https://communitysolidserver.github.io/CommunitySolidServer/5.x/usage/client-credentials/))  
4.2 Go through all revelant files and folders in this pod  
4.3 Give `MyWebId` Read,Write,Control permissions to these files, folders and contents of folders
4. Use `MyWebId` with all the pods, ignore the other web ids

---

<div class="post-metadata">

**Author:** ![A\_A](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/a_a/32/786_2.png) [@A\_A](https://forum.solidproject.org/u/A_A)\
**Post date:** [March 7, 2023, 6:16pm UTC](https://forum.solidproject.org/t/pods-automatic-creation/6263/5 "2023-03-07T18:16:56Z")

</div>

And a general tip: If you ask a question on multiple platforms it can be helpful for others if you link them, so they know what’s already been said and also future readers could look for further info there (Here’s the corresponding github issue to this thread: [Automatic Creation of pods in CSS · Issue #1585 · CommunitySolidServer/CommunitySolidServer · GitHub](https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1585))
