Merge pull request #23 from LemmyNet/add-new-pages

Add pages "troubleshooting" and "other installation methods"
This commit is contained in:
Dessalines 2021-02-10 13:45:25 -05:00 committed by GitHub
commit 755b3abd91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 81 additions and 2 deletions

View file

@ -8,7 +8,9 @@
- [Administration](administration/administration.md) - [Administration](administration/administration.md)
- [Install with Docker](administration/install_docker.md) - [Install with Docker](administration/install_docker.md)
- [Install with Ansible](administration/install_ansible.md) - [Install with Ansible](administration/install_ansible.md)
- [Other Installation Methods](administration/other_installation_methods.md)
- [Configuration](administration/configuration.md) - [Configuration](administration/configuration.md)
- [Troubleshooting](administration/troubleshooting.md)
- [Backup and Restore](administration/backup_and_restore.md) - [Backup and Restore](administration/backup_and_restore.md)
- [Federation](federation/federation.md) - [Federation](federation/federation.md)
- [Federation Overview](federation/overview.md) - [Federation Overview](federation/overview.md)

View file

@ -6,6 +6,6 @@ Information for Lemmy instance admins, and those who want to run a server.
Lemmy has two primary installation methods, [manually with Docker](install_docker.md), and [automated with Ansible](install_ansible.md). We recommend using Ansible, because it simplifies the installation and also makes updating easier. Lemmy has two primary installation methods, [manually with Docker](install_docker.md), and [automated with Ansible](install_ansible.md). We recommend using Ansible, because it simplifies the installation and also makes updating easier.
### Manual install (without Docker) ## Other installation methods
Manual installs are *possible*, but not preferred, since Lemmy is dependent on other local services: The [lemmy-ui](https://github.com/LemmyNet/lemmy-ui), [a Postgresql Database](https://www.postgresql.org/), [pict-rs](https://git.asonix.dog/asonix/pict-rs/) for images, and [iframely](https://iframely.com/) for embeds. To see how these are wired together, look at the docker-compose.yml files. Due to the complexity of different systems, we will not support manual installs. In some cases, it might be necessary to use [different installation methods](other_installation_methods.md). But we don't recommend this, and can't provide support for them.

View file

@ -0,0 +1,15 @@
# Other Installation Methods
Disclaimer: these installation methods are not recommended by the Lemmy developers. If you have any problems, you need to solve them yourself or ask the respective authors. If you notice any Lemmy bugs on an instance installed like this, please mention it in the bug report.
## Installing Lemmy without Docker
Instructions for installing Lemmy natively, without relying on Docker.
[https://lemmy.ca/post/1066](https://lemmy.ca/post/1066)
## Installing on Amazon Web Services (AWS)
This contains the necessary infrastructure definitions to deploy Lemmy to [AWS](https://aws.amazon.com/) using their [Cloud Development Kit](https://docs.aws.amazon.com/cdk/latest/guide/home.html).
[https://github.com/jetbridge/lemmy-cdk](https://github.com/jetbridge/lemmy-cdk)

View file

@ -0,0 +1,62 @@
# Troubleshooting
Different problems that can occur on a new instance, and how to solve them.
Many Lemmy features depend on a correct reverse proxy configuration. Make sure yours is equivalent to our [nginx config](https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/nginx.conf).
## General
### Various problems
Use `docker-compose logs -f lemmy` in your installation folder on the server to view the logs. You can also do `docker-compose logs -f lemmy lemmy-ui pictrs` to get logs from different services.
If that doesn't give enough info, try changing the line `RUST_LOG=error` in `docker-compose.yml` to `RUST_LOG=info` or `RUST_LOG=verbose`, then do `docker-compose restart lemmy`.
### Creating admin user doesn't work
Make sure that websocket is working correctly, by checking the browser console for errors. In nginx, the following headers are important for this:
```
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
```
### Rate limit error when many users access the site
Check that the headers `X-Real-IP` and `X-Forwarded-For` are sent to Lemmy by the reverse proxy. Otherwise, it will count all actions towards the rate limit of the reverse proxy's IP. In nginx it should look like this:
```
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
```
## Federation
### Other instances can't fetch local objects (community, post, etc)
Your reverse proxy (eg nginx) needs to forward requests with header `Accept: application/activity+json` to the backend. This is handled by the following lines:
```
set $proxpass "http://0.0.0.0:{{ lemmy_ui_port }}";
if ($http_accept = "application/activity+json") {
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
}
if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
set $proxpass "http://0.0.0.0:{{ lemmy_port }}";
}
proxy_pass $proxpass;
```
You can test that it works correctly by running the following commands, all of them should return valid JSON:
```
curl -H "Accept: application/activity+json" https://your-instance.com/u/some-local-user
curl -H "Accept: application/activity+json" https://your-instance.com/c/some-local-community
curl -H "Accept: application/activity+json" https://your-instance.com/post/123 # the id of a local post
curl -H "Accept: application/activity+json" https://your-instance.com/comment/123 # the id of a local comment
```
### Fetching remote objects works, but posting/commenting in remote communities fails
Check that [federation is allowed on both instances](../federation/administration.md#instance-allowlist-and-blocklist).
Also ensure that the time is accurately set on your server. Activities are signed with a timestamp, and will be discarded if it is off by more than 10 seconds.