Testnet
1) Get an Invite code! — Register for the node and provide your contact information and geographic information where the PoP node will be located.
Airtable link: https://airtable.com/apph9N7T0WlrPqnyc/pagSLmmUFNFbnKVZh/form
Setup and Configuration Guide for POP Cache Node on Linux
This guide provides detailed instructions on how to set up and configure the POP Cache Node on Linux systems using the provided binaries.
1. System Requirements
Recommended specifications:
- 4+ CPU cores
- 16GB+ RAM
- SSD storage with 100GB+ available space
- 1Gbps+ network connection
2. Preparing Your System
Create a dedicated user (optional but recommended)
Install required dependencies
Optimize system settings for network performance
Run these commands to optimize TCP performance (as mentioned in build.rs):
Create a sysctl configuration file for POP Cache Node
net.ipv4.ip_local_port_range = 1024 65535
net.core.somaxconn = 65535
net.ipv4.tcp_low_latency = 1
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_wmem = 4096 65536 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216
net.core.wmem_max = 16777216 net.core.rmem_max = 16777216
Applying Configurations
To apply these settings, create a configuration file using the following command:
Make sure to reload the sysctl configuration
Apply the settings
sudo sysctl -p /etc/sysctl.d/99-popcache.conf
Increase file limits for performance
To set file limits for POP Cache Node, use the following configuration:
Log out and back in for these changes to take effect.
3. Installation
### Create installation directory
To create a directory named /opt/popcache
, use the following command sequence:
You'll need the invite code emailed to you.
```
4. Configuration
### Create a configuration file
To edit the config.json
file using Nano:
Open the terminal.
Type
nano config.json
and press Enter.Use the arrow keys to navigate and make changes.
Press
Ctrl + O
to save, thenEnter
to confirm.Use
Ctrl + X
to exit
Insert the following configuration, adjusting values as needed:
Configuration tips:
1. **Memory settings**:
- Set `memory_cache_size_mb` based on your available RAM (50-70% of total RAM is a good starting point)
- Example: For a 16GB RAM server, set to 8192-10240
2. **Disk settings**:
- Set `disk_cache_size_gb` based on your available disk space (leave at least 20% free)
- Example: For a 500GB disk, set to 350-400
3. **Worker settings**:
- For best performance, set `workers` to 0 which auto-detects the number of CPU cores
- For specific control, set to the number of CPU cores minus 1
4. **Network binding**:
- Set `server.host` to `0.0.0.0` to bind to all network interfaces
- For security in development, use `127.0.0.1` to only accept local connections
5. **Identity configuration**:
- All fields under `identity_config` are important for proper attribution
- The `solana_pubkey` field is required for receiving rewards
5. Creating a Systemd Service
Create a systemd service file for automatic startup and management:
To edit the popcache service configuration using the nano text editor, run the following command:
Add the following content:
```
[Unit]
Description=POP Cache Node
After=network.target
[Service]
Type=simple
User=popcache
Group=popcache
WorkingDirectory=/opt/popcache
ExecStart=/opt/popcache/pop
Restart=always
RestartSec=5
LimitNOFILE=65535
StandardOutput=append:/opt/popcache/logs/stdout.log
StandardError=append:/opt/popcache/logs/stderr.log
Environment=POP_CONFIG_PATH=/opt/popcache/config.json
[Install]
WantedBy=multi-user.target
```
Enable and start the service:
Make sure each command is on a separate line for clarity:
Check the service status:
6. Managing Logs
View logs in real-time:
Log rotation
Create a logrotate configuration:
To edit the configuration file for logrotate related to popcache, enter the command:
This command opens the popcache
logrotate configuration file in the Nano text editor with superuser permissions, allowing you to make necessary edits for log rotation settings.
Add the following content:
```
/opt/popcache/logs/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 0640 popcache popcache
sharedscripts
postrotate
systemctl reload popcache >/dev/null 2>&1 || true
endscript
}
```
7. Firewall Configuration
If you're using UFW (Uncomplicated Firewall):
If you're using iptables directly:
8. Monitoring the POP Cache Node
Basic monitoring with the built-in endpoints:
10. Troubleshooting
If the service fails to start:
1. Check logs for errors:
sudo journalctl -u popcache -n 100
2. Verify permissions:
3. Validate your configuration:
Check if ports 80 or 443 are already in use.
Last updated