Please note: This guide expects you to have at least some basic hosting knowledge.
This guide does not cover configuring or development.
Additionally, this guide only provides extremely basic Nginx configuration files that are not necessarily production ready, and assumes you already have Nginx installed and working!
This guide uses GNU nano
, assuming you are editing code directly from console on a VPS or server.
This guide also uses nginx as a proxy manager. This guide does not provide a production ready nginx configuration!
Before you begin, ensure you have:
git clone https://github.com/sleepingami/linkpen.git
cd linkpen
or alternatively, if you want to clone to the current directory:
git clone https://github.com/sleepingami/linkpen.git .
npm install
To correctly configure your instance, you must modify the global-variables.json
file.
{
"rootDomain": "http://your-domain.com",
"hostPort": "5500",
"siteTitle": "LinkPen",
"discordInvite": "https://discord.gg/your-invite-link",
"database_key": "your_database_secret_key",
"isPublic": false
}
If you want to modify the frontend code, you can freely do so with:
npm run dev
Alternatively,
npm run start
NOTICE: After creating the first (admin) account, you will need to restart the app to see the dashboard.
We recommend using pm2 to keep your process alive.
Assuming you have Nginx installed and setup
Open the Nginx Configuration file (nano creates the file if it doesn’t exist):
nano /etc/nginx/sites-available/linkpen
Write out the file. Replace server_name
with your root domain (no http://), and replace proxy_pass
with your port (proxy_pass
requires http://). We use 5500
in this example.
server {
server_name linkpen.domain;
listen 80;
server_name your.domain.xyz;
location / {
proxy_pass http://localhost:5500;
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;
}
}
Create symlink to sites-enabled:
sudo ln -s /etc/nginx/sites-available/linkpen /etc/nginx/sites-enabled/
Check Configuration (Nginx default healthcheck command):
nginx -t
Reload Nginx to apply updates:
systemctl reload nginx