Lascaux Node Setup Guide (v3)
This guide provides detailed instructions for setting up a Lascaux v3 Node. Running a node helps decentralize the Lascaux platform and participate in the testnet. Nodes host a database and API and are designed to be lightweight, independent, and easy to set up.
Nodes do not need to sync at this time, and they do not yet assist with AI moderation, making high availability unnecessary. However, your contribution helps pave the way for future updates, including incentives for node operators.
Why Run a Lascaux Node?
- Lightweight Design: Only a few CPU cores and a few GB of RAM are needed.
- Independent Operation: Nodes run independently, with no syncing required.
- Community Contribution: Decentralize the platform and prepare for future features.
- Future Incentives: Potential TLS rewards based on node usage.
Prerequisites
- Python: Version 3.10 or higher.
- Git: Install Git (opens in a new tab).
- Docker: Required to run the Cassandra database. Install Docker (opens in a new tab).
- Make Utility: For streamlined commands.
- Ports Open:
- Port 80: For HTTP traffic.
- Port 443: For HTTPS traffic (Certbot requirement).
- Router Access: For port forwarding if required.
Installation
1. Clone the Repository
git clone https://github.com/Telestai-Project/lascaux-backend.git
cd lascaux-backend
git checkout v3.0.0
2. Install Dependencies
Run the following make
command to install the necessary Python packages:
make install
3. Run the FastAPI Backend
Start the backend using the following command(This will start the backend and the Cassandra database):
make run_app
The backend will be accessible at http://127.0.0.1:8000
.
Setting Up Nginx for Public Access
To make your node accessible over HTTPS, configure Nginx as a reverse proxy.
Step 1: Install Nginx and Certbot
sudo apt update
sudo apt install nginx certbot python3-certbot-nginx
Step 2: Configure Nginx
Create a new Nginx configuration file:
sudo nano /etc/nginx/sites-available/lascaux-node.conf
Add the following configuration:
server {
listen 80;
server_name yourdomainhere.com;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name yourdomainhere.com;
ssl_certificate /etc/letsencrypt/live/yourdomainhere.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomainhere.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Step 3: Enable Nginx Configuration
Link the configuration file to the enabled sites directory:
sudo ln -s /etc/nginx/sites-available/lascaux-node.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Step 4: Set Up SSL with Certbot
Run Certbot to configure SSL:
sudo certbot --nginx -d yourdomainhere.com
Port Forwarding
If your node is behind a router, forward the following ports to your server:
- Port 80: For HTTP traffic and Certbot validation.
- Port 443: For HTTPS traffic.
Submit Your Node
To get your node listed on the Lascaux platform (opens in a new tab):
-
Ensure your node is running and accessible at
/healthcheck
. Verify with:curl https://yourdomainhere.com/healthcheck
A successful response will look like:
{ "status": "ok" }
-
Submit a pull request to the Lascaux Nodes Repository (opens in a new tab) with the following format:
{ "nodeURL": "https://yourdomainhere.com", "nodeName": "Your Node Name", "nodeImg": "https://yourdomainhere.com/logo.png", "nodeWallet": "Your Telestai Wallet Address", "nodeDescription": "Optional: A description of your node", "status": "public" }
Once approved, your node will appear on the Lascaux frontend.
Setting Up systemd for Automatic Restarts
To ensure your node runs continuously, create a systemd
service file:
sudo nano /etc/systemd/system/lascaux-node.service
Add the following:
[Unit]
Description=Lascaux Node
After=network.target
[Service]
Type=simple
WorkingDirectory=/path/to/your/repository
ExecStart=/usr/bin/make run_app
Restart=on-failure
User=your-username
Group=your-groupname
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl enable lascaux-node.service
sudo systemctl start lascaux-node.service
Additional Notes
- Node Incentives: Rewards for node operators (e.g., TLS payouts) are planned for future updates.
- AI Moderation: Currently handled on the frontend; nodes may assist in future versions.
- Data Integrity: Nodes do not sync yet, you are running your own social media database, any information you post on your node is your own.