If your using docker I recommend getting a docker-compose file that does 98% of the config work for you. Pretty sure there's one in the install docs.
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!
I've been having trouble understanding how the docker-compose thing works, and the whole... impermanence of docker containers. Got any tutorials you'd recommend? Note I'm on Windows.
Are you planning to host it on a Windows machine?
If you don't have experience with docker, don't jump straight to docker compose. Start simpler.
If you want to have data persist after a container is killed, have a look at the -v option of "docker run". It allows you to mount a volume.
I had some luck with the prebuilt images from dessalines' dockerhub and using the compose file in the repo with logging commented out.
It was stable for about a week before I tried to update and broke my database and federation completely. I might try again when 0.18 stable drops.
always make a database backup before performing upgrade.
another docker user here. Why does our thumbnails look the same :) I know there is something wrong with my setup. I made a post here https://leddit.minnal.icu/post/1045 but still no idea.
What are the errors?
I tried with the official docker way, and failed too many times :) . Then I decided to lurk around some public instances and let the platform mature for a little bit more. The problem is usually the docker build fails.
Post your docker-compose file and error message here so people can actually provide advises for your setup.
The docker compose stack is pretty straightforward, i just use the images dessalines/lemmy:0.17.4 and dessalines/lemmy-ui:0.17.4 instead of trying to build them
If you post your configs and errors we might be able to help you. I set up a vm with docker compose and proxy it through traefik instead of nginx
I've been having issues with 0.17.4. I saw people suggesting a non-docker, build from git method but really wanted docker to work.
I'm now using 0.18.0-rc.4. Built without issue using the dockerhub image and has been stable for 24hrs
I was able to get it running from source on Gentoo (without docker). Building from source is an option but you need to manage the dependencies and daemons yourself. This is my first comment! Good luck with your setup
You are using two technologies that have a bad of working like shit, together; Ubuntu/snap and docker. You can try podman if you want, or a different distro. Or, at least, install the official docker way.
Will self-hosting Lenny have the limitation that you’ll be missing a lot of comments when subscribing to magazines from other instances? I am considering it tough
Comments federate to instances with subscribed users for that community. The first time a user subscribes to the community federation will start and future comments will begin to show up on the instance. Can’t see old comments… on smaller/self instances that problem will be more visible.
I spawned up a LXC in my Proxmox for it as soon as the Reddit fiasco began. Originally tried the Docker way, failed... My Docker is installed the official way by the way. Tried the "install from scratch" way, also failed... Finally gave the source a casual read and decided to compile it from source.
The pict-rs
bit is a hassle. It has taken me some time to get all the dependencies right and compile Imagemagick version 7 for Ubuntu 22.04 from source. But it worked eventually.
I then installed the rust toolchain and checked out the latest stable release tag at the time aka 0.17.3 and compiled lemmy
. Nothing went astray and I followed the remaining steps in the "install from scratch" doc to complete the setup.
P.S. Oh right you need to make the lemmy
PostgreSQL user SUPERUSER
otherwise the database migration script would not work. A commit was already made to make it unnecessary. It will make its way to 0.18.0 release I guess.
I initially encountered some issues in federation. Subscriptions stuck at pending for remote instances, regardless of their size and traffic. I tried many ways and still it did not work. I have thought of axing the container and restarting from the beginning.
While I was weighing my options, I found an advice in an issue at lemmy GitHub repo that suggested the problem was leftover from previous hostname changes and dumping the existing database and recreating from sketch would help. I have indeed altered the hostname once or twice during setup. So I followed the advice and federation is working now.
So far not a butter smooth experience but not the worst I have ever encountered. It does take some troubleshooting capacity and patience. But heck selfhosting has been like that since time immemorial.
I got mine running via Docker by copying the docker-compose, nginx, and lemmy.hjson files from the lemmy-ansible repo. Everything is working so far except votes and comments from other instances. They won't sync for some reason.
Here is mine https://gist.github.com/jeena/6179470a8d616455f30635a5c71f5f64 which had a similar problem with the comments, although I couldn't post comments on my own instance either.
For me the thing was that I had to add:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
and
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
And also change the nginx in the docker to port 8080 so my normal nginx could keep running on 80 and handle all the ssl certificate stuff.
My setup is:
Browser -> native Nginx -> docker Nginx -> lemmy
I've been trying for more than a week. LemmyEasyDeploy worked. But now i'm stuck with ssl certificate.
Lemmy Easy Deploy handles the SSL certificates for you. You don't need to buy them
I get ssl errors when i try to access the site.
Maybe start from scratch? Maybe you could ask the developer. I bought SSL tickets but ended up not needing them
I've started from scratch several times. Never get further than the build command. :) But i will try again later today.