rystaf / mlmym

a familiar desktop experience for lemmy
GNU Affero General Public License v3.0
256 stars 16 forks source link

Permanent Install and Certbot Instructions? #35

Open EuphoricPenguin opened 1 year ago

EuphoricPenguin commented 1 year ago

Hey, For people like myself, who are admittedly behind the curve on proper Certbot installs with Let's Encrypt and permanently installing a docker container like this, do you think you could add more detailed instructions? I got the one-off command working, but I would like to be able to exit the container and leave it running (like the rest of the Docker containers for a normal Lemmy instance). And, of course, setting up proper TLS certs and renewal is something that is totally lost on me; would it be possible to add instructions on how to do that as well? This looks super promising, but I'm still left scratching my head a bit.

- EuphoricPenguin22

elmicha commented 1 year ago

To run it permanently (whenever your docker daemon is started), you can use:

docker run -d --name mlmym --restart unless-stopped -e LEMMY_DOMAIN="lemmydomain.com" -p "8080:8080" ghcr.io/rystaf/mlmym:latest
EuphoricPenguin commented 1 year ago

To run it permanently (whenever your docker daemon is started), you can use:

docker run -d --name mlmym --restart unless-stopped -e LEMMY_DOMAIN="lemmydomain.com" -p "8080:8080" ghcr.io/rystaf/mlmym:latest

That's nice to know, but do you know how I would set up Certbot for it as a subdomain of a current domain I have? Like, a sub.main.tld domain? I believe an A record could point to the IPv4:port, but I'm clueless as to how I can set up TLS with Certbot/Let's Encrypt.

elmicha commented 1 year ago

DNS translates hostnames to IP addresses, but not ports. You probably want a reverse proxy like traefik or nginx, and you can find tutorials for them easily.

EuphoricPenguin commented 1 year ago

DNS translates hostnames to IP addresses, but not ports. You probably want a reverse proxy like traefik or nginx, and you can find tutorials for them easily.

The Ansible install already sets Nginx up for the regular Lemmy install. Does that mean that there is no way to map Mlmym to a subdomain?

elmicha commented 1 year ago

You can use the same nginx as a reverse proxy for mlmym. nginx also can serve different things for different (sub) domains. That's not special for mlmym, so you can find tutorials easily.

EuphoricPenguin commented 1 year ago

You can use the same nginx as a reverse proxy for mlmym. nginx also can serve different things for different (sub) domains. That's not special for mlmym, so you can find tutorials easily.

To be honest, I'm not really sure where to start. I've never really done much with Nginx past some really basic config changes. Is this something that you configure inside or outside of the Docker container? Any search terms I should find? I'm also still unsure on what I should search for to figure out the Certbot side of things. If anything, that's the part I know the least amount about.