Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
I did. I could never get ansible to work when I was setting up the same machine. If you know how to set the inventory file up for that, I'm all ears.
assuming you're setting up a dev instance from a linux PC, edit this line in hosts file:
your_user@localhost domain=localhost letsencrypt_contact_email=you@yourdom.ain lemmy_base_dir=<path to web server root for lemmy>
if you are running this at home and don't have port 80 open you will also need to comment out the certbot/letsencrpyt lines from the lenny.yml file because certbot needs http to issue the cert. Create a self signed cert after the installation and edit the config file under sites_available to use the self signed cert instead of letsencypt.
Lemmy works fine as a local dev instance with a self self-signed ssl cert and will subscribe and read from the fediverse without being able to post anything, of course because you don't have a resolvable name, but it appears fully functional otherwise).
chatGPT 3.5 is surprisingly familiar with lemmy's configuration via ansible (thanks to all of reddit's body of knowldege, presumably). So if you have a specific problem or immediate question, you can try that as well.
I'm just going through it now. I'll keep you posted
I'm currently hitting an issue of lets encrypt failing to authenticate using the .well-known. The domain in the hosts file is lemmy.domain.com though I have a feeling this may have to be the FQDN. the base domain is currently being used by matrix to serve antoher .well-known so it looks like I'll have to add another page there somewhere.
yes, the domain in the hosts file needs to be the fqdn. Let's encrypt will look for the auth file at the root of that. if you are already using this fqdn/webroot you'll need another cname.
I don't think I'm using the root for anything, just domain.com/.well-known/matrix/server. Would I be able to serve the challenge at domain.com/.well-known/acme-challenge/stringofcharacters?
I think so. letsencrypt will only be looking for the file that certbot creates, so as long as it can resolve the fqdn to your host and port 80 (http://yourdoma.in) is navigable, then you should be good.
certbot certonly --manual is what I need though I think cloudflare or something else is making it only resolve to https. I'm going to shelf this for now and come back to it later. Thanks for your help
Ansible was a breeze once I got it going.
Could you post your inventory file?
Sorry that these are screenshots and not files, but I'm working through Chrome Remote Desktop so my options are a bit limited. This is what I get when I execute 'ansible-playbook -i inventory/hosts lemmy.yml' regardless of whether I have it set to terry@ or root@, and whether I use --become or not.
Maybe you've already looked into this, but I checked the playbook and the error above is occuring when Ansible tries to run this command:
test -e /usr/bin/python || (apt -y update && apt install -y python3-minimal python3-setuptools)
If you manually run the part of the command in parentheses above you'll probably get the Release file error also listed above, and from there you might be able to find out what's up. I think that error usually has to do with your repository setup and/or the version of Ubuntu youre running, but Google can hopefully tell you for sure.
So, I'm having what I assume is a very basic issue. Going through the ansible install steps, I've created an /etc/ansible/hosts with
[servers] server1 ansible_host=localhost
[all:vars] ansible_python_interpreter=/usr/bin/python3
My understanding is this should work, but ansible all -m ping is failing.