# Unattended setup wizard

**URL:** <https://talk.getindico.io/t/unattended-setup-wizard/3739>\
**Category:** Administrators\
**Created:** [November 11, 2024, 2:28pm UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739 "2024-11-11T14:28:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeMiro5001](https://talk.getindico.io/user_avatar/talk.getindico.io/demiro5001/32/1701_2.png) [@DeMiro5001](https://talk.getindico.io/u/DeMiro5001)\
**Post date:** [November 11, 2024, 2:28pm UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739/1 "2024-11-11T14:28:56Z")

</div>

Hello everyone  
I am trying to [package indico](https://github.com/YunoHost-Apps/indico_ynh/tree/fix2) for [yunohost](https://yunohost.org/).  
But I failed to get `indico setup wizard` non interactive.  
I don’t remember precisely what I have tried.  
Any help would be very appreciated  
Thanks

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [November 11, 2024, 2:31pm UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739/2 "2024-11-11T14:31:37Z")

</div>

The solution is to not run it at all. Create the config file and directories manually (or rather automatically ;)), and run the `indico setup create-symlinks` command to create the wsgi file and static symlink.

You may also want to create the `~/.indico.conf` symlink pointing to the config file so there’s no need for an `INDICO_CONFIG` env var.

I recommend having a look at the code of `indico/cli/setup.py` to see what the wizard does.

---

<div class="post-metadata">

**Author:** ![DeMiro5001](https://talk.getindico.io/user_avatar/talk.getindico.io/demiro5001/32/1701_2.png) [@DeMiro5001](https://talk.getindico.io/u/DeMiro5001)\
**Post date:** [November 11, 2024, 4:55pm UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739/3 "2024-11-11T16:55:09Z")

</div>

I will check that and come back to you.  
Thanks for the fast reply

---

<div class="post-metadata">

**Author:** ![DeMiro5001](https://talk.getindico.io/user_avatar/talk.getindico.io/demiro5001/32/1701_2.png) [@DeMiro5001](https://talk.getindico.io/u/DeMiro5001)\
**Post date:** [November 15, 2024, 11:51am UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739/4 "2024-11-15T11:51:40Z")

</div>

Thanks, it works. The install goes till the end without noticeable problems.  
YunoHost has a validation process that checks for errors after a successful install. This check fails :

```auto

 > Validating that the app indico can/can't be accessed with its URL...

URL : https://sub.domain.tld/ (redirected to: https://sub.domain.tld/bootstrap)
Title : Indico - Hello there!
Content extract:
Hello there!
Indico needs just a little bit more data from you...

English

Deutsch (Deutschland)

E
Assets :
  - FAIL (code 404) https://sub.domain.tld/dist/css/common.c31173ad.css
  - https://sub.domain.tld/assets/i18n/en_GB.js
Errors :
    - Asset https://sub.domain.tld/dist/css/common.c31173ad.css (automatically derived from the page's html) answered with code 404, expected 200? Effective url: https://sub.domain.tld/dist/css/common.c31173ad.css
FAIL

```

[Full log](https://ci-apps-dev.yunohost.org/ci/job/4042)

I checked on a browser, there are no 404 errors and the file exists.  
The ci checks use curl, in case it matters.

The install script [here](https://github.com/YunoHost-Apps/indico_ynh/blob/testing/scripts/install)

---

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [November 15, 2024, 12:07pm UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739/5 "2024-11-15T12:07:04Z")

</div>

Are you sure your Python versions are correct? I see references to Python 3.11 in the output, but Indico requires 3.12, so while it may technically work on 3.11, installing it correctly should actually fail because of `requires-python = '>=3.12.2, <3.13'` in the package metadata.

Maybe add `indico --version` since there’s right now a very good chance that you are getting an older (and unsupported) Indico version (3.2.x), since only 3.3 declares compatibility with (and requires) Python 3.12.

This one should not be needed at all, it’s covered by `indico setup create-symlinks`:

```auto
ln -s $install_dir/.venv/lib/python$python_version/site-packages/indico/web/static $install_dir/web/static

```

Anyway, for anything that 404s maybe add explicit `ls -l` commands to your setup script to confirm the file exists (and check what else is in the folder if not)…

* * *

BTW, you should run these two commands before running `indico db prepare` etc to get rid of the warnings about a missing logging config:

```auto
indico setup create-symlinks $install_dir
indico setup create-logging-config $install_dir/etc

```

---

<div class="post-metadata">

**Author:** ![DeMiro5001](https://talk.getindico.io/user_avatar/talk.getindico.io/demiro5001/32/1701_2.png) [@DeMiro5001](https://talk.getindico.io/u/DeMiro5001)\
**Post date:** [November 16, 2024, 8:28am UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739/6 "2024-11-16T08:28:46Z")

</div>

I am very grateful for your help.

> [@ThiefMaster](#):
>
> I see references to Python 3.11 in the output, but Indico requires 3.12, so while it may technically work on 3.11, installing it correctly should actually fail because of `requires-python = '>=3.12.2, <3.13'` in the package metadata.

Yes, yunohost uses the default python version shipped with debian 12. I have added an install function for it.

> [@ThiefMaster](#):
>
> Maybe add `indico --version` since there’s right now a very good chance that you are getting an older (and unsupported) Indico version (3.2.x), since only 3.3 declares compatibility with (and requires) Python 3.12.

Yes, when I open the app administration, I get a notification about available updates.

> [@ThiefMaster](#):
>
> Anyway, for anything that 404s maybe add explicit `ls -l` commands to your setup script to confirm the file exists (and check what else is in the folder if not)…

There are no errors anymore using python 3.12.7

> [@ThiefMaster](#):
>
> BTW, you should run these two commands before running `indico db prepare` etc to get rid of the warnings about a missing logging config:

Done 👍

Now I have to make backup, restore, upgrade and change\_url work correctly. This won’t be hard (I hope). It will take time for checking all possible scenarios and debugging.

Btw, can the admin user be created inside the script using `indico user create --name $name --email $email --etc $etc` or should I handle it using curl?

---

<div class="post-metadata">

**Author:** ![DeMiro5001](https://talk.getindico.io/user_avatar/talk.getindico.io/demiro5001/32/1701_2.png) [@DeMiro5001](https://talk.getindico.io/u/DeMiro5001)\
**Post date:** [November 20, 2024, 7:12pm UTC](https://talk.getindico.io/t/unattended-setup-wizard/3739/7 "2024-11-20T19:12:37Z")

</div>

I am very happy to announce that indico is available in the yunohost catalog :  
[https://apps.yunohost.org/app/indico](https://apps.yunohost.org/app/indico)  
Here is the package repo :

> **[GitHub - YunoHost-Apps/indico\_ynh: Indico package for YunoHost](https://github.com/YunoHost-Apps/indico_ynh)**
>
> Indico package for YunoHost

For testing it, you need to install yunohost on a server, vps or pc, virtual machine, raspberry pi, etc…

I am also happy I found indico, I learn new things while packaging it.  
Thanks a lot for your help. I have a lot of questions since I am planning to use it in our university.
