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

11 points

I would not self-host this on Windows; and if you’re not a seasoned server administrator I definitely wouldn’t use the Ansible (or even docker-compose) methods.

I wrote some bash scripts that will help you deploy on fly.io if you like, which abstracts the hosting layer away a little bit: https://github.com/Veraticus/fly-lemmy

That said if you’re not super comfortable in this space then debugging and correcting problems is also going to feel incredibly frustrating, so, just warning you.

permalink
report
reply
11 points

If you aren’t attached to Ansible, I suggest using Docker to host Lemmy. I found it’s instructions, using Docker Compose, to be quite straight forward.

My other 2 cents is that hosting on Windows isn’t worth the hassle and there will be a lot less to debug on Ubuntu if you’re already comfortable with it.

permalink
report
reply
8 points

Ansible is just a playbook deploying the docker setup. ;)

permalink
report
parent
reply
1 point

I run mine on Docker as well, but I noticed that the documentation has got some issues, at least if you are frontending with nginx like I am

permalink
report
parent
reply
8 points

Install wsl for windows Ubuntu default.(can install wsl in PowerShell).

Install Ansible in wsl, create ssh keys to your VPS, follow those instructions.

On my Ubuntu server I did literally nothing but the ssh key generation.

permalink
report
reply
1 point

Following the instructions using wsl and I get met with the following error after running the playbook:

“fatal: [myuser@example.com]: UNREACHABLE! => {“changed”: false, “msg”: “Failed to connect to the host via ssh: ssh: connect to host example.com port 22: Network is unreachable”, “unreachable”: true}”

Where do I enter my ssh info?

permalink
report
parent
reply
1 point

I think this is one of the more sensible answers here. If your workstation is windows, then utilize WSL for ansible and deploy onto a ubuntu or debian host (I’m assuming it works fine on debian, I used ubuntu). You might run into some issues with ansible dependencies as the readme doesn’t seem to cover everything from what i remember, but once ansible works and has the correct configs, deployment is super easy.

permalink
report
parent
reply
0 points

Yeah Ansible I had to set the path variable and did the ssh key generation. Other than that my lemmy was up and running in like 10 minutes all automated. You can go back and change the config by rebuilding the yaml. It’s not bad at all.

permalink
report
parent
reply
0 points
*

I ran into some dependency issues(needed to install ansible-collection-community-docker on my fedora workstation), but after that it ran fine and installed everything first run. I made some adjustments to the inventory config afterwards, but aside from that it just worked.

permalink
report
parent
reply
6 points

I highly doubt Ansible works on Windows and in general it is really not a good idea to host anything on Windows as it is way to insecure and also not meant for it.

If you install something on your DO VPS maybe try Yunohost: https://yunohost.org/

permalink
report
reply
1 point

Yunohost is awesome. I use it myself for my Lemmy instance. Unfortunately because YunoHost doesn’t use containers and Lemmy now requires psql 15 it’s stuck on Lemmy 0.16.7. So it’s not ideal if you want the latest version of the sure to be quickly changing Lemmy software.

permalink
report
parent
reply
5 points

After a looooong day of trial and error and basically learning all of this from scratch, I am happy to say I have finally gotten my own instance up and running!

HUGE credits goes to @ubergeek77@lemmy.ubergeek77.chat for creating a script to install Lemmy in just a few simply commands. Definitely reccomend checking out his work if you’re brand new to all of this: https://lemmy.world/post/249889

Although I ended up taking the “easy way out”, I do want to take a moment to thank all of you for taking the time to comment and contribute time to help me sort out this problem. This is such a warm and welcoming communtiy and I really appreciate it. Cheers from SoCal!

permalink
report
reply
4 points

Amazing!!! I’m so glad to hear I was able to help you get things set up! You’re my first success story, good to know it’s actually working for people!

Welcome to the self-hosted Fediverse!

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create 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!

Community stats

  • 4.8K

    Monthly active users

  • 3.5K

    Posts

  • 78K

    Comments