]> Untitled Git - lemmy.git/blob - docs/src/administration_install_docker.md
Updating docs to setup lemmy.hjson beforehand.
[lemmy.git] / docs / src / administration_install_docker.md
1 # Docker Installation
2
3 Make sure you have both docker and docker-compose(>=`1.24.0`) installed. On Ubuntu, just run `apt install docker-compose docker.io`. Next, 
4
5 ```bash
6 # create a folder for the lemmy files. the location doesnt matter, you can put this anywhere you want
7 mkdir /lemmy
8 cd /lemmy
9 # download default config files
10 wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
11 wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/lemmy.hjson
12 wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/iframely.config.local.js
13 ```
14
15 After this, have a look at the [config file](administration_configuration.md) named `lemmy.hjson`, and adjust it, in particular the hostname, and possibly the db password. Then run:
16
17 `docker-compose up -d`
18
19 To make Lemmy available outside the server, you need to setup a reverse proxy, like Nginx. [A sample nginx config](https://raw.githubusercontent.com/dessalines/lemmy/master/ansible/templates/nginx.conf), could be setup with:
20
21 ```bash
22 wget https://raw.githubusercontent.com/dessalines/lemmy/master/ansible/templates/nginx.conf
23 # Replace the {{ vars }}
24 sudo mv nginx.conf /etc/nginx/sites-enabled/lemmy.conf
25 ```
26
27 You will also need to setup TLS, for example with [Let's Encrypt](https://letsencrypt.org/). After this you need to restart Nginx to reload the config.
28
29 ## Updating
30
31 To update to the newest version, you can manually change the version in `docker-compose.yml`. Alternatively, fetch the latest version from our git repo:
32
33 ```bash
34 wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
35 docker-compose up -d
36 ```