How to Install Pump.io on Debian Latest?
Pump.io is an open-source social networking engine that allows users to run a decentralized social network on their own server. In this tutorial, we will learn how to install Pump.io on Debian latest.
Prerequisites
Before you get started, make sure you have the following:
- A Debian latest version installed on your system
- A domain name pointing to your server's IP address
- Access to the terminal as the root user or a user with sudo privileges
Step 1: Update System
Update the system to the latest version by running the following command:
sudo apt-get update && sudo apt-get upgrade
Step 2: Install Node.js
Pump.io requires Node.js version 12.x or higher. You can install it by running:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
Verify that Node.js is installed by running:
node --version
Step 3: Create a Non-root User
For security reasons, it's recommended to run Pump.io as a non-root user. You can create a new user by running:
sudo adduser pumpio
Step 4: Install MongoDB
Pump.io requires MongoDB for data storage. You can install it by running:
sudo apt-get install mongodb
Start and enable the MongoDB service by running:
sudo systemctl enable mongodb
sudo systemctl start mongodb
Step 5: Install Pump.io
First, switch to the pumpio user by running:
su - pumpio
Then, clone the Pump.io repository by running:
git clone https://github.com/pump-io/pump.io.git pumpio
cd pumpio
Install the dependencies by running:
npm install
Next, copy the config.json.example file to config.json and edit it to suit your needs. For example:
cp config.json.example config.json
nano config.json
Configure the server field to your domain name, set your MongoDB database name, and configure the site's email address.
{
"driver": "mongodb",
"params": {
"host": "localhost",
"port": "27017",
"dbname": "pumpio"
},
"server": {
"url": "https://example.com",
"port": 443,
"key": "/etc/letsencrypt/live/example.com/privkey.pem",
"cert": "/etc/letsencrypt/live/example.com/fullchain.pem",
"hostname": "example.com",
"nologger": false,
"bodyLimit": "1mb",
"noreplyEmail": "[email protected]",
"email": {
"type": "smtp",
"relay": {
"host": "smtp.gmail.com",
"port": 465,
"secure": true,
"auth": {
"user": "[email protected]",
"pass": "password"
}
}
}
}
}
Save and close the file.
Step 6: Start Pump.io
You're now ready to start Pump.io! Run the following commands to start the server:
export NODE_ENV=production
npm start
You can also use a process manager like PM2 to manage Pump.io:
npm install -g pm2
pm2 start app.js --name "pumpio"
pm2 save
pm2 startup
Step 7: Access Pump.io
Now that Pump.io is running, you can access it by opening your web browser and visiting your domain name. You should see the Pump.io login page.
Congratulations! You have successfully installed Pump.io on Debian latest.