app icon indicating copy to clipboard operation
app copied to clipboard

Recommended version to install?

Open thecosmicfrog opened this issue 1 year ago • 17 comments

Hi folks. What is the recommended version of SimpleLogin to install for self-hosted? It's a bit confusing at the moment as the latest images are either simplelogin/app:4.6.5-beta or simplelogin/app-ci:4.28.0 depending on where you look on Docker Hub.

Also, the current documentation on the master branch refers to the latest version being 3.4.0:

https://github.com/simple-login/app/blob/master/docs/upgrade.md#upgrade-to-the-latest-version-340

The number of critical and high vulnerabilities against the 3.4.0 image is quite concerning too:

Thanks.

thecosmicfrog avatar May 09 '23 19:05 thecosmicfrog

@nguyenkims Could you possibly comment on this? Thanks.

thecosmicfrog avatar May 16 '23 18:05 thecosmicfrog

Hi the simplelogin/app-ci is the SaaS version run on app.simplelogin.io, it contains new features but hasn't been tested for self hosting. The next self hosting version is on the branch new-self-host-version and its current docker version is simplelogin/app:4.6.5-beta. We recommend using this version as it contains a more up to date code and it is quite stable. We're going to merge it back to the main branch soon and update our README.

nguyenkims avatar Jun 04 '23 19:06 nguyenkims

Thanks @nguyenkims. Do you have a rough ETA on when the merge to the main branch will happen? Thanks.

thecosmicfrog avatar Jun 07 '23 00:06 thecosmicfrog

@thecosmicfrog hi unfortunately we don't have an ETA on when the merge will happen.

nguyenkims avatar Jun 14 '23 16:06 nguyenkims

UPDATE I was able to upgrade using these other update instructions https://github.com/simple-login/app/blob/4.6.2-beta/docs/upgrade.md

I tried upgrading from 3.4.0 to 4.6.5-beta and encountered the error below. I followed these upgrade instructions. Are there updated upgrade instructions (for 4.6.5-beta) or did I make a mistake somewhere?

localhost:~$ docker-compose exec sl-app flask db upgrade
>>> URL: https://app.simplelogin.dedyn.io
MAX_NB_EMAIL_FREE_PLAN is not set, use 5 as default value
Paddle param not set
Upload files to local dir
>>> init logging <<<
2023-07-23 18:24:31,590 - SL - DEBUG - 29 - "/code/app/utils.py:14" - <module>() -  - load words file: /code/local_data/words.txt
Traceback (most recent call last):
  File "/usr/local/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 426, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask_migrate/cli.py", line 134, in upgrade
    _upgrade(directory, revision, sql, tag, x_arg)
  File "/usr/local/lib/python3.10/site-packages/flask_migrate/__init__.py", line 96, in wrapped
    f(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask_migrate/__init__.py", line 269, in upgrade
    config = current_app.extensions['migrate'].migrate.get_config(directory,
KeyError: 'migrate'

caheredia avatar Jul 23 '23 18:07 caheredia

Is it possible to upgrade from 4.6.2-beta to 4.6.5-beta using migrations or should we always upgrade from the previous stable version ?

springcomp avatar Sep 22 '23 07:09 springcomp

To piggyback on @caheredia comment above, for anyone else finding their way here -- the key to a successful upgrade from 3.4.0 to 4.6.x is two-fold:

  1. The addition of the alembic upgrade head command, which replaces the previous flask db upgrade.
  2. The addition of a new service command, python job_runner.py.

Also, for those using the iOS app as well -- SimpleLogin 2.0.1 (iOS) is the most recent version compatible with 4.6.5-beta. All versions beyond that will toss an error when trying to access the 'My account' tab within the app.

magn2o avatar Oct 04 '23 18:10 magn2o

@nguyenkims any information on when 4.6.x will become stable?

muhlba91 avatar Oct 10 '23 06:10 muhlba91

@muhlba91 This version is actually quite stable, it's just we haven't had the time to test it in a selfhosting mode yet.

nguyenkims avatar Oct 12 '23 19:10 nguyenkims

i will help you to setup this application contact me https://www.fiverr.com/s/9W3PNA simple

MuhammadNaeem42 avatar Nov 30 '23 00:11 MuhammadNaeem42

@nguyenkims Hey. Is there an update on this? I hate to see that the latest version of simple login hasn't yet been tested for self-hosted instances. I am currently at 3.4.0 since June of 2021, and would really like to upgrade to the latest version.

Also, the link https://github.com/simple-login/app/blob/4.6.2-beta/docs/upgrade.md seems to be broken. Is there an updated guide to upgrade from 3.4.0 to the latest version?

Also, I am willing to help you test the latest version for self-hosting. Please help me with the major changes to installation methods, services (cron, migration, webapp, admin, etc) and I can set it up to test them and help to prepare an updated installation guide for the community. Please let me know if you'd be interested.

Autopilot9369 avatar Feb 04 '24 11:02 Autopilot9369

i'm running 4.38.0 in my kubernetes cluster without any issues. i started off with 4.x already and didn't need to migrate though...

you can find my kubernetes config using fluxcd and kustomize here: https://github.com/muhlba91/muehlbachler-public-services-cluster-applications/tree/main/applications/simplelogin

muhlba91 avatar Feb 04 '24 12:02 muhlba91

So, you are using app-ci instead of the app docker image? Hows this working for you? Also, did you initially start with installation guide of 3.4.0 (master) and then updated them using the instructions under the new-self-host-version branch?

Autopilot9369 avatar Feb 04 '24 12:02 Autopilot9369

i started directly with app-ci and 4.x. i just wanted to avoid a migration and went straight to trying out the 4.x version. after all, it was a new setup and in the worst case i could simply delete everything and install it using 3.x.

tbh, the app-ci version runs smoothly for me and without any problems at all so far. from the initial installation to all updates so far, there was never an issue. i usually wait a few days though to perform a new update just in case...

in the end, i took the instructions from main and mixed it with https://github.com/simple-login/app/issues/1803 because i need to support multiple domains.

you can find my postfix related config here: https://github.com/muhlba91/muehlbachler-public-services-infrastructure/tree/main/assets/edge/postfix

muhlba91 avatar Feb 04 '24 12:02 muhlba91

@muhlba91 thanks. I am going to take a full system backup and try to upgrade to v4.6.5-beta. If everything works smoothly, I am going to flip to using app-ci images. I will keep you posted.

Autopilot9369 avatar Feb 04 '24 12:02 Autopilot9369

okay, I was able to successfully upgrade to v4.6.5-beta docker image tag, and everything seems to be working as expected. I will wait for a week or two and see if I face any issues and after that will upgrade to app-ci image tag

Autopilot9369 avatar Feb 04 '24 14:02 Autopilot9369