User Tools

This is an old revision of the document!


Lemmy

Lemmy

Please note that Lemmy requires a dedicated subdomain that cannot be changed afterward, because that is the unique identifier of your instance.

Installation

Following this guide.

Create the usual dedicated user. Also, all data needs to be located in a dedicated folder that will be /data/lemmy:

useradd -d /data/daemons/lemmy -m lemmy
mkdir /data/lemmy
mkdir /data/lemmy/pictr
chown lemmy:lemmy /data/lemmy -R
chmod o+w /data/lemmy/pictr  # need to be improved in the future

There are four files that you need to edit, download the raw ones:

su - lemmy
wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/examples/config.hjson -O /data/lemmy/lemmy.hjson
wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx_internal.conf -O /data/lemmy/nginx_internal.conf
wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/files/proxy_params -O /data/lemmy/proxy_params
wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/examples/customPostgresql.conf -O /data/lemmy/customPostgresql.conf
wget https://raw.githubusercontent.com/LemmyNet/lemmy-docs/main/assets/docker-compose.yml

then edit the first three following the guide linked above. Please pay attention that you moved the files to /data/lemmy and not in the same folder of the docker-compose.yml file.

I will post here my docker-compose.yml since it's the one that gets the most edits:

docker-compose.yml

Last, edit the customPostgresql.conf with the output generated from this page.

Now pull it:

podman compose pull

Reverse Proxy

Lemmy not only must have it's own (sub-)domain, but that also identifies your instance. This means that you need to carefully plan the domain name and/or subdomain because you will not be able to change it afterward.

I assume it will be reachable as https://lemmy.mydomain.com.

Following this page create a NGINX config file called /etc/nginx/com.mydomain/lemmy/lemmy.conf like this:

grist.conf

Autostart

To start it, and set it up on boot, as usual follow my indications Using Containers on Gentoo, so link the user-containers init script:

ln -s /etc/init.d/user-containers /etc/init.d/user-containers.lemmy

and create the following config file:

/etc/conf.d/user-containers.lemmy
USER=lemmy
DESCRIPTION="Decentralized forum"

Add the service to the default runlevel and start it now:

rc-update add user-containers.lemmy default
rc-service user-containers.lemmy start

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information