simple-login / app

The SimpleLogin back-end and web app
https://simplelogin.io
GNU Affero General Public License v3.0
5.05k stars 421 forks source link

Deployment/selfhosting guide is outdated #1205

Open akash07k opened 2 years ago

akash07k commented 2 years ago

So I'm banging my head on the wall since yesterday morning and getting numerous issues while selfhosting SimpleLogin on my server. I would like to bring this into attention that the deployment/selfhosting guide and instructions are very outdated and should be updated so that new hosters can get accurate and up-to-date information. Couple of issues which I've observed in the readme:

  1. The mentioned commands for DKIM key generation in the readme are misleading because those commands are targetted for openssl 1.X and whereas recent Ubuntu releases such as 22.04 come with openssl 3.X by default. If we generate the keys with openssl 3.X then we'll get errors and won't be able to receive any emails. Installing openssl 1.X manually is quite time taking and hectic. Also, if SL doesn't have any plans to ship the support for openssl 3.X then it should be mentioned in the readme that we'll need openssl 1.X for this.
  2. The instructions in the readme mentions about simplelogin/app:3.4.0 image which is more than 1 and half year older. Whereas the latest version is 4.11.0 which is a very major difference.
  3. There's no mention in the readme that how to obtain the latest images and if we manually target the latest tags such as simplelogin/app:latest or simplelogin/app:4.11.0 then we get errors because those images are not available.
  4. Still if user manually builds the image and runs the database migration, then they get the error because readme mentions the older upgrade command targetting flask which doesn't apply to the latest versions. Latest command is alembic upgrade head
  5. Even if we succeed to build and run the stuff successfully, we won't receive any emails on our aliases and sl-email containers will throw many errors about MAILBOX_OR_URL is not reachable etc.
  6. There's no troubleshooting guide for fixing this as well.
  7. There's no mention in the readme about running SL with reverse proxies such as nginx-proxy or others.
  8. No mention of docker-compose too.
Spitfireap commented 2 years ago

Hey,

As for version 3.4.0 you have 4.6.2-beta available if you want . You can see the latest self-host container here. If you want to have the latest version released on GitHub you'll want to pull app-ci instead of app, but these are not tested for self-hosting, and you'll might encounter more bugs.

akash07k commented 2 years ago

@Spitfireap Thanks, I'll follow this beta guide and will check if I face any issues.

Hey,

As for version 3.4.0 you have 4.6.2-beta available if you want . You can see the latest self-host container here. If you want to have the latest version released on GitHub you'll want to pull app-ci instead of app, but these are not tested for self-hosting, and you'll might encounter more bugs.

akash07k commented 2 years ago

@Spitfireap In this release's readme too, DKIM instructions are not given in accordance with openssl 3.X

Spitfireap commented 2 years ago

You're right, I'll try to propose changes to the doc :). You need to use openssl 1.X to generate the keys since simplelogin uses dkimpy and the bug is upstream.

Spitfireap commented 2 years ago

actually, could you try this with openssl3 ? openssl genrsa -traditional --out dkim.key 4096.

akash07k commented 2 years ago

Wonderful. I'll track this bug.

You're right, I'll try to propose changes to the doc :). You need to use openssl 1.X to generate the keys since simplelogin uses dkimpy and the bug is upstream.

akash07k commented 2 years ago

@Spitfireap yep, I'll try it soon.

frankhinek commented 2 years ago

The upstream bug fix was committed to the dkimpy repo on 01-Aug-2022.

Posted a question to the dkimpy forum about the approximate timeline to update the PyPI package so that SimpleLogin can pull in the new version.

Spitfireap commented 2 years ago

I'm working on it :). I'll tell you when it's done. We want to add utf8-support before next version release.

akash07k commented 2 years ago

Thanks @frankhinek @Spitfireap I'm following up :-)

akash07k commented 2 years ago

So should I close this issue as of now or we should wait for the fix to arrive on the package manager?

StuartHaire commented 2 years ago

Is there any chance we can get updated to v4.14.9 as per the image here https://hub.docker.com/r/simplelogin/app-ci/tags thanks

nguyenkims commented 2 years ago

@StuartHaire the next version we're going to release is https://github.com/simple-login/app/tree/4.6.2-beta which is a little bit behind the 4.14.9. The version on app-ci is the one we run on simplelogin.io and hasn't been tested for self-hosting yet.

StuartHaire commented 2 years ago

@nguyenkims I've just updated to use app-ci v4.14.9 and so far so good.

lazee486 commented 2 years ago

is there anywhere the updated self hosted guide is posted? i just tried with the github and a youtube video as reference and have a server i cant use now...using the latest tags has me at the webui etc but i cant create a user, think the migrated data, might be wrong, and my dkim key based on reading up... honestly this looks amazing :) was looking forward to running it

nguyenkims commented 2 years ago

@lazee486 the latest version is https://github.com/simple-login/app/tree/4.6.2-beta that should be released soon (i.e. removing the "beta" mention)

frankhinek commented 1 year ago

I was able to self-host successfully using Ubuntu 20.04 LTS and the latest commits to the master branch.

I ended up using the postgres:13 container image and built my own custom Docker image so that I could use an arm64 instance.

LordChunk commented 1 year ago

@frankhinek how did Postgres 13 run for you over the past few months? Did you run into any issues?

frankhinek commented 1 year ago

@frankhinek how did Postgres 13 run for you over the past few months? Did you run into any issues?

Working great. Running Postgres 13 and have no issues.

FWIW, it also appears that Simple Login uses Postgres 13 in their test suite:

https://github.com/simple-login/app/blob/master/.github/workflows/main.yml#L42