this post was submitted on 30 Dec 2024
35 points (90.7% liked)

Selfhosted

44191 readers
570 users here now

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!

founded 2 years ago
MODERATORS
 

I am new to the world of self hosting a site, however I do currently have a web application thing successfully running on a digital ocean droplet with a free domain name.

I would like to attempt to additionally host a lemmy instance and was planning on following this guide: https://github.com/ubergeek77/Lemmy-Easy-Deploy?tab=readme-ov-file

Ideally I would like both of these things to run on the same ubuntu droplet. In my mind this should technically be possible with using docker to give each thing their own little corner being a good way to approach it.

However, I think the easy deploy lemmy uses caddy and the other thing I have users nginx, can both of these things work alongside each other fine if they have their own ports?

Is this a good way of approaching this or should I just make the lemmy instance its own droplet and go from there? Should I use something other than the lemmy easy deploy?

Do you have any other advice?

Thanks, if this is the wrong community for this can someone point me to the right one, I'm relatively new to lemmy.

top 16 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 2 months ago (1 children)

I would probably just skip the Lemmy Easy Deploy and just do a regular deployment so it doesn't mess with your existing. Getting it running with just Docker is not that much harder and you just need to point your NGINX to it. Easy Deploy kind of assumes it's got the whole machine for itself so it'll try to bind on the same ports as your existing NGINX, so does the official Ansible as well.

You really just need a postgres instance, the backend, pictrs, the frontend and some NGINX glue to make it work. I recommend stealing the files from the official Ansible, as there's a few gotchas in the NGINX config as the frontend and backend share the same host and one is just layered on top.

[–] [email protected] 6 points 2 months ago (1 children)

I'm part of the crowd just browsing and have no idea what you just said. Cheers though. You sound like you know what your talking about.

[–] [email protected] 3 points 2 months ago

If you look at my username you'll see I do run my own instance so I've gone through the process :)

[–] [email protected] 12 points 2 months ago

They can if they're using different ports, however, I'd recommend just running Lemmy through the nginx server and route the data to each as needed. There's nginx configuration in the guide.

[–] [email protected] 4 points 2 months ago

You can use nginx just fine, probably need to skip the automatic deployment though.

[–] [email protected] 3 points 2 months ago (1 children)
[–] [email protected] 2 points 2 months ago (1 children)

This seems incredibly intuitive, effective, and might exactly be what I'm looking for. Thanks.

[–] [email protected] 2 points 2 months ago (1 children)

Its not perfect. Im still new to it but have a go. Have you got a community ot two you would like to create?

[–] [email protected] 1 points 2 months ago (1 children)

Another person and I are in the early stages of probably setting one up. The other thing we use is cytube which would be great to see on yunohost, I'd suggest it if I had a trusted account.

[–] [email protected] 2 points 4 weeks ago (1 children)

ill check it lut and suggest it Im early days in writing scripts for Yunohost applications

[–] [email protected] 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

We suggested it on the Yunohost site and they started it. The other person I'm working with I think made some progress but we're new and don't really have the time to try and figure a bunch of stuff out.

I think there's a file you have to delete and there's some stuff in the cytube config the Yunohost installer hasn't been setup to edit properly yet.

[–] [email protected] 2 points 1 week ago (1 children)

Ive finally got a VM box running to spin up some test instances of Yunohost and applications for it.

[–] [email protected] 1 points 1 week ago* (last edited 4 days ago)

https://github.com/calzoneman/sync/issues/996

To get the Yunohost installer to work you have to either use a specific version of node or delete the package-lock.json file. Some of the stuff in the Cytube config wasn't setup by yunohost yet and there was a permissions issue with the certs. I was also going to try it again when I have more time in a few days.

edit:

I've gotten it to work twice with Yunohost now and I think I know what's missing:

Port 8443 needs to be opened in the firewall

In the cytube config: the port in the http section needs to be changed, the https block needs to be uncommented, the root domain name needs to be changed off of localhost, under io socket the domain needs to be changed to https, and the cert paths need to be added under the https socket block (etc/yunohost/certs).

The last thing is the node app/cytube needs access to the certs. It gives an access error without it and I don't know how to do this properly. My friend asked in the yunohost element and I guess this a weird/bad thing, but there is a fix.

[–] [email protected] 2 points 2 months ago (1 children)

I read someone saying the bandwidth is costly.

[–] [email protected] 5 points 2 months ago

Hasn't cost me a penny, hurray for unmetered bandwidth

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago)

If you’d like to run them on the same Ubuntu VM, I’d recommend deploying them using docker, as that will make avoiding port conflicts much easier as well as keeping each application isolated.

You should also look into a reverse proxy so you can reroute traffic from your desired subdomain to non-standard ports (otherwise you’ll need to specify ports in the URL which gets weird). I recommend Nginx Proxy Manager which can also run in docker.

You could spin up another VM for Lemmy if resources get tight and you don’t mind the extra cost.