2017-01-25 19:20:49 +00:00
Running i2pd
============
Starting, stopping and reloading configuration
----------------------------------------------
2018-05-31 15:44:34 +00:00
This chapter explains how to start and manage the i2pd daemon under \*nix operation systems.
2017-01-25 19:20:49 +00:00
2018-05-31 15:44:34 +00:00
After you have built i2pd from source, just run the binary:
2017-01-25 19:20:49 +00:00
./i2pd
To display all available options:
./i2pd --help
2018-05-31 15:44:34 +00:00
i2pd can be controlled with signals. The process ID by is written to the file `~/.i2pd/i2pd.pid` or
`/var/run/i2pd/i2pd.pid` by default. You can use `kill` utility to send signals like this:
2017-01-25 19:20:49 +00:00
kill -INT $( cat /var/run/i2pd/i2pd.pid )
i2pd supports the following signals:
2018-05-31 15:44:34 +00:00
* INT - Graceful shutdown. i2pd will wait for up to 10 minutes and stop. Send a second INT signal to shutdown i2pd immediately.
2017-01-25 19:20:49 +00:00
* HUP - Reload configuration files.
### systemd unit
2018-05-31 15:44:34 +00:00
Some i2pd packages come with a systemd control unit, and for those that use systemd, it is possible to manage i2pd with it.
2017-01-25 19:20:49 +00:00
2018-05-31 15:44:34 +00:00
To start/stop i2pd:
2017-01-25 19:20:49 +00:00
sudo systemctl start i2pd.service
2018-01-26 22:15:51 +00:00
sudo systemctl stop i2pd.service --no-block
2018-05-31 15:44:34 +00:00
The stop command initiates a graceful shutdown process, i2pd stops after finishing to route transit tunnels (maximum 10 minutes).
2017-01-25 19:20:49 +00:00
2018-05-31 15:44:34 +00:00
To enable/disable autostart of i2pd upon bootup:
2017-01-25 19:20:49 +00:00
sudo systemctl enable i2pd.service
sudo systemctl disable i2pd.service
Recommended way to run i2pd built from source
---------------------------------------------
2018-06-04 04:47:52 +00:00
The following commands display the recommended way to run i2pd built from source, without a package manager. Installing i2pd this
2018-05-31 15:44:34 +00:00
way will ensure all i2pd-related files are stored at `$HOME/dist` .
2017-01-25 19:20:49 +00:00
mkdir $HOME/dist
cp i2pd $HOME/dist
cp -R contrib/certificates $HOME/dist
2017-03-01 20:10:35 +00:00
cp contrib/i2pd.conf $HOME/dist
2017-01-25 19:20:49 +00:00
cd $HOME/dist
ulimit -n 4096 # only on Linux, increasing open file limit
2018-05-31 15:44:34 +00:00
Then, to run i2pd, simply travel to the installation directory and type:
2017-01-25 19:20:49 +00:00
./i2pd --datadir .
2022-05-12 17:46:56 +00:00
Overriding systemd service parameters
-----
For overriding systemd service defaults create `/etc/systemd/system/i2pd.service.d/override.conf` file and place overriden options. Don't forget use option section.
```
mkdir -p /etc/systemd/system/i2pd.service.d/
touch /etc/systemd/system/i2pd.service.d/override.conf
```
Example content with enabled coredump and increased `nofile` limit
```
[Service]
LimitNOFILE=16386
LimitCORE=infinity
```