Skip to content

Update procedure of selfhosting#1909

Open
hoyohayo wants to merge 2 commits intosimple-login:masterfrom
hoyohayo:master
Open

Update procedure of selfhosting#1909
hoyohayo wants to merge 2 commits intosimple-login:masterfrom
hoyohayo:master

Conversation

@hoyohayo
Copy link
Copy Markdown

@hoyohayo hoyohayo commented Oct 7, 2023

No description provided.

Copy link
Copy Markdown
Contributor

@nguyenkims nguyenkims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please target this branch new-self-host-version instead? It contains the latest version of the doc and will be merged back to master soon.

reject_unauth_destination,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client zen.spamhaus.org=127.0.0.[2..11],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have any doc on spamhaus pointing to this change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not. Sorry, will revert.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @hoyohayo : if using an open resolver almost every email would get blocked (https://www.spamhaus.org/news/article/788/spamhaus-dnsbl-return-codes-technical-update) and the standard return codes are available here.

Copy link
Copy Markdown

@Metabaron1 Metabaron1 Nov 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm an error when using open resolvers, here is the error:
554 5.7.1 Service unavailable; Client host [xxx] blocked using zen.spamhaus.org; Error: open resolver; https://www.spamhaus.org/returnc/pub/172.71.133.37;
I'm using google DNS for my docker as recommended workaround here
https://www.spamhaus.com/resource-center/successfully-accessing-spamhauss-free-block-lists-using-a-public-dns/
but I don't really like using google DNS...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Metabaron1 I would recommend something like this alongside a PTR and you're good to go ;)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


```bash
openssl genrsa -out dkim.key 1024
openssl genrsa -traditional -out dkim.key 1024
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nguyenkims since dkimpy v1.1.0, PKCS#8 is supported. What about you increase the minimum version instead?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if it's compatible with the old key that people generated? I want to make sure that when people upgrade SL, they don't have any issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a try/except trying the old key standard first so still compatible :D.

Copy link
Copy Markdown

@paulius-valiunas paulius-valiunas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the docker commands are a bit unclear

POSTFIX_SERVER=10.0.0.1
```

Now it is time to build the latest docker. Replace the tag by latest version released (as of writing 4.35.2).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Now it is time to build the latest docker. Replace the tag by latest version released (as of writing 4.35.2).
Now it is time to build the latest docker image. Replace the tag by latest version released (as of writing 4.35.2) or any other tag that you prefer.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is it safe to build directly from master? How stable is it?

-v $(pwd)/simplelogin.env:/code/.env \
--network="sl-network" \
simplelogin/app:3.4.0 flask db upgrade
simplelogin/app:4.35.2 alembic upgrade head
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the same tag as above (here and below). Users might forget to replace the version number.

@Chinoman10
Copy link
Copy Markdown

Chinoman10 commented Feb 26, 2026

As a self-hosting enthusiast, and while I'd typically prefer paying the $36/yr for 'managed SimpleLogin' (too critical of infra to be worried of downtime), I very much prefer having a simple/single Docker Compose file to copy-paste and use/customize, than multiple steps that require DB migrations and running specific commands inside the containers, etc... that allows us to keep the setup as portable as possible, and keeping the config's (and even the data, if we use named volumes) extremely easy to backup and service.

@chrisblech
Copy link
Copy Markdown
Contributor

I very much prefer having a simple/single Docker Compose file

Check this repo: https://github.com/springcomp/self-hosted-simplelogin

@springcomp baked most steps inside a Compose file, and added the missing postfix container (instead of having postfix as host dependency). In the next few weeks (depending on my spare time 😅 ) I will contibute another PR there that will simplify setup by automate creating a DKIM key, set admin flag to the first user and use docker volumes instead of host mounts (goal: get this project up and running via Portainer, without a bash on the host)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants