-
Notifications
You must be signed in to change notification settings - Fork 69
Proton Server Setup Guide(with configuration guide)
Updated on: 2024/02/23
Welcome to the Proton Server Setup Guide. This document provides step-by-step instructions for getting started with Proton Server, ranging from a simple binary setup to more advanced configurations using Docker and configuration files. Use the links below to navigate to the relevant section for your setup needs:
Easily start the Proton Server with the default settings.
-
Download the binary:
curl https://install.timeplus.com | sh
-
Start the server:
Default data storage is in the
./proton server start
./proton-data
folder.
Customize settings within Docker for the Proton Server.
-
Launch Proton Docker:
docker run -it --name proton ghcr.io/timeplus-io/proton:latest
-
Modify Configuration (optional):
- Access the container:
docker exec -it proton bash
- Install vim (optional) for easier editing:
apt update && apt install vim -y
- Edit or directly modify
config.yaml
:sed -i 's/telemetry_enabled: true/telemetry_enabled: false/' /etc/proton-server/config.yaml
- Access the container:
-
Restart the container:
docker restart proton
Set up a new Proton Server instance with advanced configuration files.
-
Download Configuration Files:
wget https://raw.githubusercontent.com/timeplus-io/proton/develop/programs/server/config.yaml wget https://raw.githubusercontent.com/timeplus-io/proton/develop/programs/server/users.yaml
-
Customize Configuration (optional):
- For example, to adjust the max record size:
log_max_record_size: 10485760 => log_max_record_size: 104857600
- For example, to adjust the max record size:
-
Switching Storage Paths (must):
- Adjust the default path to suit common usage:
sed -i "s|/var/|$(pwd)/proton-data/var/|g" config.yaml
- Adjust the default path to suit common usage:
-
Launch Server with Custom Config:
./proton server start --config-file ./config.yaml
Most Complex One: Starting with Binary then Switching to Config File
For detailed control without losing existing data.
- Prepare Configuration Files: Follow steps in Part 3.
-
Modify Storage Paths to Retain Data (must):
sed -i "s|/var/lib/proton/|$(pwd)/proton-data/|g" config.yaml sed -i "s|/var/log|$(pwd)/proton-data|g" config.yaml
-
Reboot Server with New Config:
- Ensure
users.yaml
is alongsideconfig.yaml
../proton server start --config-file ./config.yaml
- Ensure
Optimize your Proton Server's performance and functionality by customizing the config.yaml
file. This guide highlights common configurations and their adjustments to address specific server needs.
To manage the load effectively, you might need to set limits on concurrent queries. The default settings are as follows:
max_concurrent_queries: 100
max_concurrent_select_queries: 100
max_concurrent_insert_queries: 100
Adjust these settings based on your server's workload and performance requirements.
The default maximum size for a single record is set to 10MiB. Increasing this limit can accommodate larger records but may impact performance:
log_max_record_size: 10485760 # 10MiB
# Increase to 100MiB
log_max_record_size: 104857600
To prevent Proton Server from consuming all available memory, a hard limit is set by default to 90% of system RAM. This limit can be adjusted to better suit your server's memory availability and usage needs:
max_server_memory_usage_to_ram_ratio: 0.9 # Default setting
# Reduce to use only 60% of system RAM
max_server_memory_usage_to_ram_ratio: 0.6
Encountering issues with your Proton Server setup? We're here to help. For support:
- Report Issues: Encounter a bug or a problem? Open a GitHub issue to get assistance.
- Join Discussions: Have questions or want to share insights? Participate in our GitHub discussions for community support.
- Slack Channel: Prefer real-time interaction? Join our Slack channel to connect with the Proton Server community and team.