I would be lying if I gave you a number. I have never had to deal with many users, so I can’t really tell you at what point you can expect problems. It could be 50 active users at once, it could be 500, maybe even 5,000 - I really don’t know. Consider that uploaded images will fill up your SSD, and that multiple active users at once will go through your network connection.
But I really don’t know the limits. Someone else hopefully can chip in.
Try removing the lemmy.conf file from /etc/nginx/sites-enabled,
And then run:
sudo wget https://raw.githubusercontent.com/Kradyz/Tutorials/main/files/uebishe.conf /etc/nginx/sites-enabled/uebishe.conf
sudo systemctl restart nginx
Or, I have made an nginx config file that will work for you
If you already created an nginx configuration file, move it somewhere else. Then, get the new configuration file to the nginx folder, and then restart the nginx service by running these two commands:
sudo wget https://raw.githubusercontent.com/Kradyz/Tutorials/main/files/uebishe.conf /etc/nginx/sites-enabled/uebishe.conf
sudo systemctl restart nginx
Ah! So you skipped this step:
Now i skip old step about “wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx.conf -O lemmy.conf”
You need to have the lemm.conf file under /etc/nginx/sites-enabled, this is the file that tells nginx how to manage the connection. Don’t skip that step! Get that file and modify it by adding your domain name
Yes, you would be able to run all of those at the same time. Of course, there will be limits - if the lemmy and matrix instances grow, at some point this setup can become insufficient. But if the amount of users is kept manageable, you should be fine.
Power consumption can be something to consider since the server would ideally be running 24/7. I use a plug power meter to measure how much power my appliances use while running. A raspberry pi 4 8GB with a 1TB SSD can also run these instances and pulls < 10 W, so if you see that your server is pulling considerably more energy I would suggest looking into power management.
Sorry, I did not realize that these files had not yet been updated with the changes necessary for version 0.17.0, which are described here: https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md#lemmy-v0170-release-2023-01-31
I could not find an example of the files configured correctly in github, so I have uploaded some example files. You get them this way:
wget https://raw.githubusercontent.com/Kradyz/Tutorials/main/files/lemmy.hjson
wget https://raw.githubusercontent.com/Kradyz/Tutorials/main/files/docker-compose.yml
Then modify the variables inside {}, like the domain name and the database password.
Remove the following blocks from the docker-compose file:
networks:
# communication to web and clients
lemmyexternalproxy:
# communication between lemmy services
lemmyinternal:
driver: bridge
internal: true
proxy:
image: nginx:1-alpine
networks:
- lemmyinternal
- lemmyexternalproxy
ports:
# only ports facing any connection from outside
- 80:80
- 443:443
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
# setup your certbot and letsencrypt config
- ./certbot:/var/www/certbot
- ./letsencrypt:/etc/letsencrypt/live
restart: always
depends_on:
- pictrs
- lemmy-ui
And try again. Does it work?
Do you want to install a fresh instance, or do you want to upgrade an instance?
If you are installing fresh, most of that tutorial is still going to work out. But you now need to pull the config file this way:
wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/config/defaults.hjson lemmy.hjson
If you install the more recent docker version, you don’t have to install docker-compose the same way. Follow the instructions from the website, and use ‘docker compose’ instead of ‘docker-compose’.
The nginx configuration does not need to change.
What problems are you getting?
There is a newer version that fixes this: https://lemmy.ml/post/743037
An issue was opened for that three days ago:
https://github.com/LemmyNet/lemmy/issues/2678
I don’t think it is possible through the UI at the moment.
Also, did you change the variables in the Lemmy UI environment?
(Edit to specify, in the docker-compose.yml file the variables are now different)
The lemmy-ui environment variables have changed, and should now look like:
environment:
- LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
- LEMMY_UI_LEMMY_EXTERNAL_HOST={{ domain }}
- LEMMY_UI_HTTPS=true
There are also other instructions that you need to follow. Are you following the release note instructions?
See: https://github.com/LemmyNet/lemmy/blob/main/RELEASES.md#lemmy-v0170-release-2023-01-31
Great job figuring that out!
At some point it would be fun to work on some new guides anyway :-)