Easiest Lemmy Install

We are going to use Lemmy-Easy-Deploy

This install is soooo easy, but it does have its limitations as you can't do specific configurations like we did on this pi, but it is super easy if you just want a lemmy instance.

To host it all you will need:

  • A VPS (virtual private server) with appropriate power for the size of your community. This can be very low for small communities.
  • Very basic understanding of how to work in Bash (in terminal).

ssh into your server

You are normally given/give an ssh key to get into your server. Use this key to get onto your server to start to deploy lemmy. If you need more help with ssh [In-grids ssh notes(https://github.com/In-grid-collective/servPubWiki)] are handy.

Choose a directory to install and run lemmy from

As lemmy works behind a reverse proxy (it runs from a port which we link to the web) it can be almost anywhere on the system. For today though we will just put it in a users base directory.

To open the users home directory cd (change directory) to return to ~ (home directory):

cd ~

Use git to clone the code

If you don't know git, it is a very awesome versioning tool to update and collaborate on code, but today we are going to use it very simply to just pull their code.

if you haven't got git installed do (you may need to enter a password and say y or yes to install):

sudo apt-get install git

Now we can clone the Lemmy-Easy-Deploy directory to our server.

To do that just:

git clone https://github.com/ubergeek77/Lemmy-Easy-Deploy

We can check out its there with ls which lists all our directories:

ls

If it has worked well it should show a './Lemmy-Easy-Deploy'

Now we enter into that folder with:

cd ./Lemmy-Easy-Deploy

Finally check out gits latest tags (to see if it is all up to date):

git checkout $(git describe --tags `git rev-list --tags --max-count=1`)

Configuring our lemmy instance

Now we setup some configuration settings to have our platform how we would like it. This can be a very complex thing or simple, depending on how deep you want to go, but for today we will just show you how to change the hostname, instance name and admin user name.

Lets have a look at our files

ls

You will see that there is an example conf called config.env.example. Firstly we need to copy the example config for us to then edit from.

To do this cp (copy and paste) the example config file to have the proper 'config.env' name:

cp ./config.env.example ./config.env

Now we need to use nano (a text editor) to update the settings in the config.env file to what we want.

To make sure we have nano try installing it incase:

sudo apt-get install nano

Now we can open the file with (-l means to show line numbers!):

sudo nano -l config.env

Now the file should open for you and you can navigate with the arrow keys (sometimes with a mouse). Now we will move through and edit the bits we need.

  1. To edit the url/web address edit line 4 where it says LEMMY_HOSTNAME and change example.com to your url.

  2. To edit the site name, edit line 12 where it says SETUP_SITE_NAME and change Lemmy to what you want to name your site.

  3. To edit admin user name edit line 15 where it says SETUP_SITE_NAME and change lemmy to the admin user name you want.

Once you are done you can then exit with cnrl s to save and then cntrl X to exit.

That is your config ready to roll :)

Let's Deploy!

Now everything is in place we can easily deploy with just:

./deploy.sh

it will ask you to agree to a few bits, read them and agree if you are comfy with them. It will then install a docker container hosting all of the lemmy elements easily for you.

Test it

To test you can either visit the url/domain you have setup for your server, or if it is run locally, you can visit http://localhost/ in your browser.

Well Done for getting here, If you do get stuck, do feel able to ask and I will see where I can help a bit.