56
submitted 3 years ago by Eddie@lemmy.world to c/selfhosted@lemmy.world

So I've been scratching my head for two days trying to get my own lemmy server up and running.

I have limited server hosting experience but I used to design html websites back in high school through wordpress and was able to successfully set up my own mastadon instance so I'm pretty decent at following instructions, but what keeps tripping me up is ansible and how the heck it works.

The instructions (https://github.com/LemmyNet/lemmy-ansible) are telling me to install ansible on my local machine using python3. On my windows machine I installed ansible using python but when i type the ansible command into terminal it gives me no command found. Is linux required as a host machine?

I have an account over at digitalocean and I'm willing to host my own ubuntu machine over there to get my instance running but I cannot for the life of me figure out how ansible is supposed to set up a server on my windows machine. ANY help would be GREATLY appreciated.... I'm tearing my hair out and feel incredibly stupid right now :D

you are viewing a single comment's thread
view the rest of the comments
[-] jeena@jemmy.jeena.net 2 points 3 years ago

I totally feel you, it took me 4 days on different computers until I gave in and got a new clean server just for lemmy. Then I used the Docker way of hosting. But even with that the documentation didn't tell me everything, so I had to change the second nginx config file (the one with server_name my_domain.tld;) so now this is working even with the web-workers (for posting comments) and federation with SSL:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}
server {
    server_name jemmy.jeena.net;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header    X-Forwarded-for $remote_addr;
	proxy_set_header Host $http_host;
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/jemmy.jeena.net/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/jemmy.jeena.net/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
    if ($host = jemmy.jeena.net) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    server_name jemmy.jeena.net;
    return 404; # managed by Certbot
}

this post was submitted on 17 Jun 2023
56 points (100.0% liked)

Selfhosted

60210 readers
705 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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

Resources:

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

Questions? DM the mods!

founded 3 years ago
MODERATORS