How to Set Up AccessNode

A step-by-step guide to deploying your own password manager on a local machine or Google Cloud VPS.

1. Prerequisites

Before you begin, make sure you have the following:

  • Node.js version 18 or later (download)
  • npm (comes with Node.js)
  • Git installed on your machine (download)
  • A Google Cloud Platform account (for VPS deployment)
  • A domain name pointing to your server (optional, but recommended for HTTPS)
Verify your Node.js installation:
Run node --version and npm --version in your terminal. You should see version numbers 18+ and 9+ respectively.

2. Local Setup

Get AccessNode running on your local machine first to verify everything works.

Step 1: Clone or Download

Terminal
git clone https://github.com/your-username/accessnode.git
cd accessnode

If you don't have the repository, download and extract the project files into a folder called accessnode.

Step 2: Install Dependencies

Terminal
npm install

This installs all required packages: Express, SQLite, bcrypt, JWT, and more. It may take 30-60 seconds.

Step 3: Configure Environment

Copy the example environment file and edit it with your settings:

Terminal
cp .env.example .env

Open .env in your editor and change the values:

.env
PORT=3000
JWT_SECRET=generate-a-random-string-here-at-least-32-chars
SESSION_EXPIRY=24h
Important: The JWT_SECRET must be a long, random string. Never use the default value in production. You can generate one with:
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"

Step 4: Start the Server

Terminal
npm start

You should see AccessNode running at http://localhost:3000. Open this URL in your browser. The SQLite database (accessnode.db) is created automatically on first run.

Quick test: Visit http://localhost:3000, click "Get Started Free", create an account with any email and password (min. 8 characters), and you'll be taken to your dashboard.

3. Create a Google Cloud VM

Deploy AccessNode on a Google Cloud VPS for 24/7 availability.

Step 1: Create a VM Instance

1

Go to the Google Cloud ConsoleCompute EngineVM Instances and click Create Instance.

2

Name: accessnode-server

3

Region & Zone: Choose one close to your users (e.g., us-central1-a)

4

Machine type: e2-micro or e2-small is sufficient (0.5-1 vCPU, 1-2 GB RAM)

5

Boot disk: Ubuntu 22.04 LTS, 20 GB standard persistent disk

6

Firewall: Check both Allow HTTP traffic and Allow HTTPS traffic

7

Click Create. Wait ~30 seconds for the VM to provision.

Step 2: Open Port 3000 in Firewall

AccessNode runs on port 3000 by default. Create a firewall rule to allow traffic:

1

Go to VPC NetworkFirewallCreate Firewall Rule

2

Name: allow-accessnode

Targets: All instances in the network

Source IP ranges: 0.0.0.0/0

Protocols and ports: tcp:3000,80,443

3

Click Create

Step 3: Reserve a Static External IP

Prevent your IP from changing on VM restart:

  • Go to VPC NetworkExternal IP addresses
  • Find the ephemeral IP assigned to your VM, change type to Static
  • Give it a name like accessnode-ip

4. Server Setup

SSH into your VM and install the required software.

Step 1: Connect via SSH

Terminal (your local machine)
gcloud compute ssh accessnode-server

Or use the SSH button in the Google Cloud Console next to your VM instance.

Step 2: Install Node.js

SSH Session — Ubuntu
# Add NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -

# Install Node.js and npm
sudo apt-get install -y nodejs

# Verify installation
node --version
npm --version

Step 3: Install Git (if not present)

SSH Session
sudo apt-get update
sudo apt-get install -y git

Step 4: Clone and Set Up AccessNode

SSH Session
cd /opt
sudo git clone https://github.com/your-username/accessnode.git
sudo chown -R $USER:$USER /opt/accessnode
cd /opt/accessnode
npm install

If you're uploading files directly instead of using git, use scp or the Google Cloud Console file upload.

Step 5: Configure Environment Variables

SSH Session
cp .env.example .env
nano .env

Generate a secure JWT_SECRET and update the .env file:

Generate a random secret
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"

Copy the output and paste it into your .env as the JWT_SECRET.

Production checklist: Make sure your .env file has:
  • A unique, long JWT_SECRET (never use the default)
  • NODE_ENV=production (enables stricter security)

Step 6: Test the Server

SSH Session
node server.js

You should see AccessNode running at http://localhost:3000. Press Ctrl+C to stop it after confirming it works.

Test from your browser at http://YOUR_VM_IP:3000. You should see the landing page.

5. Nginx Reverse Proxy

A reverse proxy lets you serve AccessNode on standard ports (80/443) and adds a layer of security.

Step 1: Install Nginx

SSH Session
sudo apt-get install -y nginx

Step 2: Create Nginx Configuration

SSH Session
sudo nano /etc/nginx/sites-available/accessnode

Paste the following configuration:

/etc/nginx/sites-available/accessnode
server {
    listen 80;
    server_name your-domain.com;

    client_max_body_size 10m;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        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;
        proxy_cache_bypass $http_upgrade;
    }
}

Replace your-domain.com with your actual domain or VM IP address.

Step 3: Enable the Site and Restart Nginx

SSH Session
sudo ln -s /etc/nginx/sites-available/accessnode /etc/nginx/sites-enabled/
sudo rm /etc/nginx/sites-enabled/default  # Remove default site
sudo nginx -t                              # Test configuration
sudo systemctl reload nginx               # Apply changes

Now you can access AccessNode at http://your-domain.com or http://YOUR_VM_IP without specifying a port.

6. SSL with Let's Encrypt

Enable HTTPS for secure, encrypted connections to your password manager.

Prerequisite: You need a domain name pointing to your VM's static IP address. If you don't have one, skip this section and use HTTP (not recommended for production).

Step 1: Install Certbot

SSH Session
sudo apt-get install -y certbot python3-certbot-nginx

Step 2: Obtain and Install Certificate

SSH Session
sudo certbot --nginx -d your-domain.com

Follow the prompts. Certbot will automatically update your Nginx config to use HTTPS and set up auto-renewal.

Step 3: Verify Auto-Renewal

SSH Session
sudo certbot renew --dry-run

If this succeeds, your certificates will auto-renew before expiry. Certbot adds a cron job for this automatically.

Step 4: Update Environment for HTTPS

After enabling SSL, update your .env to set the app URL so cookies and redirects use HTTPS:

.env
NODE_ENV=production

7. Process Management with PM2

PM2 keeps AccessNode running 24/7, auto-restarts on crashes, and starts on system boot.

Step 1: Install PM2 Globally

SSH Session
sudo npm install -g pm2

Step 2: Start AccessNode with PM2

SSH Session
cd /opt/accessnode
pm2 start server.js --name accessnode
pm2 save

Step 3: Enable Startup on Boot

SSH Session
pm2 startup systemd

PM2 will output a command to run as sudo. Copy and paste that command to enable auto-start on system boot.

Useful PM2 Commands

PM2 Cheat Sheet
pm2 status              # View running processes
pm2 logs accessnode      # View application logs
pm2 restart accessnode   # Restart the app
pm2 stop accessnode      # Stop the app
pm2 delete accessnode    # Remove from PM2
pm2 monit                # Real-time monitoring dashboard

8. Updating AccessNode

When new versions are released, update your deployment:

SSH Session
cd /opt/accessnode
git pull origin main
npm install              # Install any new dependencies
pm2 restart accessnode   # Restart with the new code
Backup first: Before updating, make a backup of your database file:
cp /opt/accessnode/accessnode.db /opt/accessnode/accessnode.db.backup

Backup Strategy

Set up a daily cron job to back up your encrypted database to Google Cloud Storage or another location:

Add to crontab (crontab -e)
# Daily backup at 2 AM
0 2 * * * cp /opt/accessnode/accessnode.db /opt/backups/accessnode-$(date +\%Y\%m\%d).db

9. Troubleshooting

Port Already in Use

SSH Session
# Find what's using the port
sudo lsof -i :3000

# Kill the process
sudo kill -9 <PID>

# Or use a different port in .env
PORT=3001

Can't Access from Browser

  • Verify the server is running: pm2 status
  • Check firewall rules in Google Cloud Console → VPC Network → Firewall
  • Verify Nginx is running: sudo systemctl status nginx
  • Check Nginx error logs: sudo tail -f /var/log/nginx/error.log

Database Corruption

If the SQLite database gets corrupted, restore from a backup:

SSH Session
pm2 stop accessnode
cp accessnode.db.backup accessnode.db
pm2 start accessnode

SSL Certificate Expired

SSH Session
sudo certbot renew
sudo systemctl reload nginx

App Crashes on Start

  • Check PM2 logs: pm2 logs accessnode --lines 50
  • Verify Node.js version is 18+: node --version
  • Reinstall dependencies: rm -rf node_modules && npm install
  • Check disk space: df -h

Ready to get started? Your vault is waiting.

Create Free Account