This guide is going to focus on the Pleroma federation aspect. The actual installation is neatly explained in the official documentation, and more likely to remain up-to-date.
It might be added to this guide if there will be a need for that.
Notice: The stop command initiates a graceful shutdown process, i2pd stops after finishing to route transit tunnels (maximum 10 minutes).
Now you'll have to find your address.
To do that you can download and use I2PD tools.1
Or you'll need to access your web-console on localhost:7070.
If you don't have a GUI, you'll have to SSH tunnel into it like this:
ssh -L 7070:127.0.0.1:7070 user@ip -p port.
Now you can access it at localhost:7070.
Go to I2P tunnels page. Look for Server tunnels and you will see an address that ends with .b32.i2p next to "pleroma".
This is your site's address.
If creating an I2P-only instance, open config/prod.secret.exs and under "config :pleroma, Pleroma.Web.Endpoint," edit "https" and "port: 443" to the following:
In addition to that, replace the existing nginx config's contents with the example below.
Existing Instance (Clearnet Instance)
If not an I2P-only instance, add the nginx config below to your existing config at /etc/nginx/sites-enabled/pleroma.nginx.
And for both cases, disable CSP in Pleroma's config (STS is disabled by default) so you can define those yourself seperately from the clearnet (if your instance is also on the clearnet).
Copy the following into the config/prod.secret.exs in your Pleroma folder (/home/pleroma/pleroma/):