Open Mitchellpkt opened 6 years ago
Ideally the unified script would extend SerHack's install script:
map
(with sudo privileges?)/usr/bin/monero
directorymonerod-archive
patch/opt
subdir for output, and sets up monerod-archive
as a service)@neptuneresearch has ideas for a firewall and more advanced security measures?
Just to let you know that I've been working on:
Tokyo Setup FYI you can check firewall configuration:
sudo ufw status verbose
The daemon start command on Tokyo is now:
sudo ~/map/launch-v7-sudo.sh
This starts the archive daemon in the same way the systemd service will, which is (1) as root user (2) with the Monero conf file located at
/etc/monerod-archive.conf
Per the new Monero conf file, the daemon log is now located at:
/var/log/monerod-archive.log
Definitive solution and documentation is forthcoming.
Note that the temp setup above switches Monerod over to running as root, I think under systemd it would run as root too? but we've proven it works under "map" non-root account, so maybe final solution should be non-root.
wherein, I think we would just need to add permissions for "map" to the files it uses:
/usr/bin/monero
/etc/monerod-archive.conf
/var/log/monerod-archive.log
/opt/monerodarchive/archive.log
monerod-archive
as service
SSH
Log rotate
Mostly done
https://github.com/Mitchellpkt/monero_archival_project/wiki/MAP-VPS-Setup
TODO: logrotated configuration
@Mitchellpkt I'm just wondering why you did not assign me that ;) haha!
As soon as we have logrotated configuration, I could set up a time where I can do some maintenance. So every VPS will have the same configuration!
Logrotate for monerod: I found monerod already rotates its logs by itself.
I have added max-log-files=0
option to /map_vps_setup_files/monerod-archive.conf
so that this rotation never ends, as the default value for this option is 50.
That should be it. The default log file size (monerod option max-log-file-size
) is 104,850,000 bytes. @IsthmusCrypto Is that OK or is a different size limit desired?
Logrotate for the archive output file: 90% done
Logrotate for monerod: I forgot we still need compression. Maybe monerod rotation + logrotated compression, i.e. logrotate targets another location, and the prerotate script initializes it by moving monerod's rotated logs in.
When current
MAP_VPS_setup.sh
script is executed on a fresh Debian install, Usermap
is not added to sudoers (maybe this is intentional, but configuringmonerod-archive
requires a sudo to write in/opt
It would be ideal if the
MAP_VPS_setup
also pulls down and places themonerod-archive
binary in the appropriate location.The MAP_VPS_setup.sh could also
wget
the archival daemon configuration script to create the directory and configuremonerod-archive
as an auto start service, as mentioned in #36