This package provides a comprehensive guide for setting up a Ceramic node for both development and production environments on a Linux server. The guide includes the necessary configuration files, Docker Compose files, and Nginx server configuration for both environments.
Before you begin, ensure that you have:
- Access to a Linux server with root access
- Command-line interface
The package contains the following files and directories:
.env.example- Example file containing environment variables for configuration.development-server- Directory containing files for the development environment setup.production-server- Directory containing files for the production environment setup.
Follow these steps to install and configure the Ceramic node:
- Access your Linux server and update the package list by running:
sudo apt update
- Install Node Version Manager (nvm) by following the instructions on the nvm GitHub repository.
- Install Node.js and Yarn by running:
nvm install node
npm install -g pnpm
- Install Ceramic CLI by running:
pnpm i -g @ceramicnetwork/cli
- Install Golang by following the instructions on the official Golang website.
- Build go-ipfs with additional plugins by following the instructions on the go-ipfs GitHub repository.
- Install Docker and Docker Compose by following the instructions on the official Docker documentation and Docker Compose documentation.
- Install and configure Nginx by running:
sudo apt install nginx
Then, follow the instructions on the official Nginx documentation to set up firewall rules.
- Transfer files to your Linux server by copying the relevant files from the
development-serverorproduction-serverdirectory on this repository to your Linux server. Create a directory namedceramicin your home folder (~/ceramic) and place the files there. For example, you can use thescpcommand to copy the files from your local machine to the server:
scp -r development-server/* user@your_server_ip:~/ceramic
- Configure Ceramic daemon and Docker Compose files by following the provided configuration files in the
development-serverandproduction-serverdirectories. - Update environment variables in
.env.exampleas needed, replacing placeholders (e.g.,mydomain.com,eg_infura_endpoint) with appropriate values. - Set up Nginx for Ceramic by copying the
ceramic-nginx.conffile from the respective environment directory to the Nginx configuration directory and creating a symlink to enable the configuration:
sudo cp ~/ceramic/ceramic-nginx.conf /etc/nginx/sites-available/ceramic
sudo ln -s /etc/nginx/sites-available/ceramic /etc/nginx/sites-enabled/
- Install Certbot and obtain SSL certificates by following the instructions on the official Certbot website for your domain.
- Automate SSL certificate renewal by setting up a daily cron job as instructed in the official Certbot documentation.
- Restart Nginx to apply the changes and enable the Ceramic configuration:
sudo systemctl restart nginx
- Test your Ceramic node by accessing it via your domain (e.g.,
https://mydomain.com). You should see a response indicating that the Ceramic node is running.
That's it! You've now set up a Ceramic node for development or production environments on your Linux server. Remember to periodically update your packages and monitor the server to ensure it's running smoothly.