EDIT: Thanks everyone for your time and responses. To break as little as possible attempting to fix this I’ve opted to go with ZeroSSL’s DNS process to acquire a new cert. I wish I could use this process for all of my certs as it was very quick and easy. Now I just have to figure out the error message lemmy is throwing about not being able to run scripts.

Thank you all for your time sincerely. I understand a lot more than I did last night.


Original Post

As the title says I’m unable to renew a cert on a self-hosted lemmy instance. A friend of mine just passed away and he had his hands all up in this and had it working like magic. I’m not an idiot and have done a ton of the legwork to get our server running and working - but lemmy specifically required a bit of fadanglin’ to get working correctly. Unfortunately he’s not here to ask for help, so I’m turning to you guys. I haven’t had a problem with any of my other software such as nextcloud or pixelfed but for some reason lemmy just refuses to cooperate. I’m using acme.sh to renew the cert because that’s what my buddy was using when he had set this all up. I’m running apache2 on a bare metal ubuntu server.

Here’s my httpd-ssl.conf:

https://pastebin.com/YehfTPNV

Here’s some recent output from my acme.sh/acme.log:

https://pastebin.com/PESVVNg4

Here’s the terminal read out and what I’m attempting to execute:

https://pastebin.com/jfHfiaE0

If you can make any suggestions at all on what I might be missing or what may be configured incorrectly I’d greatly appreciate a nudge in the right direction as I’m ripping my hair out.

Thank you kindly for your time.

Johannes Jacobs
link
fedilink
English
2
edit-2
1d

Oh my god… i completely overlooked the config in your original message!!

Un any case, look at this: https://join-lemmy.org/docs/administration/caddy.html

Someone done the work, and they would be glad if you made use of it :)

And if you start with: lemmy.domain.tld:81 {

You can even have it run on a different port, so you can test it without risking your apache config.

Sol 6 VI StatCmd
creator
link
fedilink
English
21d

This is brilliant thank you. This is going to save me dozens of hours.

Sol 6 VI StatCmd
creator
link
fedilink
English
21d

Only thing I’m having trouble with so far is handling a line like this > <FilesMatch \.php$> # Apache 2.4.10+ can proxy to unix socket SetHandler "proxy:unix:///run/php74-fpm.sock|fcgi://localhost/" </FilesMatch> Not really sure how caddy handles this.

Johannes Jacobs
link
fedilink
English
211h

Look here: https://caddyserver.com/docs/caddyfile/directives/php_fastcgi

I’m not near a computer right now, but tomorrow i can show an example of my nextcloud setup. Its also php with Caddy :)

Sol 6 VI StatCmd
creator
link
fedilink
English
110h

thank you for taking the time to share, I actually moved over to nginx… all over the place >_> a few people have made it pretty clear I’m going to overwhelm caddy quickly with the number of different domains and sites we host so I’m starting over with nginx now.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 132 users / day
  • 404 users / week
  • 1.38K users / month
  • 3.83K users / 6 months
  • 1 subscriber
  • 4.03K Posts
  • 82.7K Comments
  • Modlog