I believe that self-hosting will take some of the load off of the wefwef server. That will be a win-win for everyone. At the same time, I understand that wefwef is still so very new that it might not be mature enough to let loose on other people’s servers.

I am looking for instructions on how to self-host wefwef, ideally as a docker container, ideally using a ready-to-use docker-compose.yml file.

7 points

If you prefer to use docker compose you can write your own docker-compose.yml file like I did.

version: "3"

services:
  wefwef:
    container_name: wefwef
    image: ghcr.io/aeharding/wefwef:latest
    ports:
      - 5314:5314
    restart: unless-stopped # remove this is you don't want wefwef to run always

You should be able to access wefwef with http://localhost:5314 if you’re running on your local machine, or if you have it running on something else access it with http://<ip address>:5314.

permalink
report
reply
6 points
*

pull image docker pull ghcr.io/aeharding/wefwef:latest start container: docker run --rm -it -p 5314:5314 wefwef

Source : https://github.com/aeharding/wefwef#prebuilt

permalink
report
reply
1 point

Instead of doing 5314:5314 do 127.0.0.1:5314:5314. The setting provided in your post bypasses your firewall settings (assuming you’re on Ubuntu Server, that’s ufw) and set up a nginx reverse proxy with certbot.

permalink
report
parent
reply
1 point
*

To clarify a couple of things, and hopefully help anyone else doing this on macOS:

Start by installing Docker desktop

Open Terminal and type in:

docker pull ghcr.io/aeharding/wefwef:latest

Then, you want to use a Docker run command like this to get things started. In this example, I put my local IP in as “192.168.1.2” but you’ll need to adjust that value to whatever your machine’s IP is.

docker run --rm -d -p 192.168.1.2:5314:5314 -e "CUSTOM_LEMMY_SERVERS=lemmy.world,sh.itjust.works,lemmy.ml" ghcr.io/aeharding/wefwef:latest

At that point, I went to my iPhone, opened Safari and went to 192.168.1.2:5314 and boom, there’s wefwef. Install this as PWA and name it (local) or something and you’re good to go.

permalink
report
parent
reply
1 point

When I self host in my private network, wefwef should work from abroad as it‘s loaded on my phone - but does it pull new posts then?

permalink
report
parent
reply
2 points
*

Isn’t the whole JavaScript just in the device in PWAs? That’s why it needs an “update” action from the user to change to a new version.

permalink
report
reply
2 points

You pull the code to your device but until CORS is properly implemented, the web server serves as a proxy to pull new content

permalink
report
parent
reply
1 point

Yeah how do PWA’s actually work? Where is the code hosted? Is my login information stored on someone else’s server? I can easily spin up the wefwef container, but does that means anyone can then start leveraging my instance?

permalink
report
parent
reply
4 points

PWAs are basically caching the assets on your phone. The code is kept on your phone but for any web requests you still phone home until CORS is properly implemented on Lemmy’s side. Hard to say about your login information, because that depends on if the code was modified before the instance was put up. If you compile from source, then no, no information is collected. However, as of now wefwef is the one that’s sending your password to the lemmy instance for authentication. You can easily spin up a wefwef container, whether you grant permissions for others to use it is based on your firewall rules as by default wefwef is open for anyone to use. But, you can restrict ports 80 and 443 to only work with your IP if it’s static or set up a VPN. My instance is open but I don’t advertise it anywhere as I’m not sure it’s ready to carry the load, so just my friends use it.

permalink
report
parent
reply
1 point

Thanks for the explanation.

permalink
report
parent
reply
2 points

Check the GitHub repo. They have a docket file you can build and self host alongside some instructions on how to change the radiotherapy servers.

If you want a prebuilt image, search on docket hub. There is at least one I have seen.

Note that the default image doesn’t come with a reverse proxy, so you will want to put it behind something like nginx or caddy to take care of the SSL stuff.

permalink
report
reply

wefwef

!wefwef@lemmy.world

Create post

wefwef is now Voyager! Subscribe to !voyagerapp@lemmy.world.

Community stats

  • 1

    Monthly active users

  • 372

    Posts

  • 2.8K

    Comments