Skip to content

Installing on Linux

This guide covers installing Moneta Pay POS on a Linux server. The installer downloads binaries, creates symlinks, and sets up systemd services.

Prerequisites

  • Ubuntu 20.04+, Debian 10+, or any modern Linux distribution (64-bit x86)
  • Root access — the installer uses sudo
  • Internet connection — to download binaries
  • PostgreSQL 14+ — must be installed separately (see below)
  • 2 GB RAM minimum (4 GB recommended)

Step 1: Install PostgreSQL

If PostgreSQL is not already installed:

bash
sudo apt update
sudo apt install -y postgresql postgresql-contrib
sudo systemctl enable postgresql
sudo systemctl start postgresql
bash
sudo dnf install -y postgresql-server postgresql-contrib
sudo postgresql-setup --initdb
sudo systemctl enable postgresql
sudo systemctl start postgresql

Set a password for the postgres superuser:

bash
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'your-secure-password';"

TIP

Remember this password — you'll need it during the Setup Wizard.

Step 2: Install WireGuard

Optional but recommended for the Remote Access feature:

bash
sudo apt install -y wireguard
bash
sudo dnf install -y wireguard-tools

Step 3: Run the Installer

bash
curl -fsSL https://get.moneta-pay.app/scripts/install.sh | sudo bash

You'll see output like:

  __  __                  _          ____   ___  ____
 |  \/  | ___  _ __   ___| |_ __ _  |  _ \ / _ \/ ___|
 | |\/| |/ _ \| '_ \ / _ \ __/ _` | | |_) | | | \___ \
 | |  | | (_) | | | |  __/ || (_| | |  __/| |_| |___) |
 |_|  |_|\___/|_| |_|\___|\__\__,_| |_|    \___/|____/

[+] Fetching latest version...
[+] Latest version: v0.27.2
[+] Downloading moneta-pos-v0.27.2-linux-amd64.tar.gz...
[+] Verifying checksum...
[+] Checksum verified
[+] Installing to /opt/moneta-pos...
[+] Creating symlinks in /usr/local/bin/...

[+] Moneta POS v0.27.2 installed successfully!

  Install directory: /opt/moneta-pos
  Binaries:
    dashboard-server
    event-esd-digitax-worker
    event-esd-rabbitmq-worker
    event-print-worker
    moneta-license-tool
    moneta-pos-server

Install a Specific Version

bash
curl -fsSL https://get.moneta-pay.app/scripts/install.sh | sudo bash -s -- --version v0.27.2

What the Installer Does

  1. Downloads the latest release archive from the Moneta Pay CDN
  2. Verifies the SHA256 checksum
  3. Stops running Moneta services (safe for upgrades)
  4. Extracts binaries to /opt/moneta-pos
  5. Creates symlinks in /usr/local/bin/ so binaries are available system-wide
  6. Sets up nginx reverse proxy on port 80 (proxies to dashboard on port 3000)
  7. Creates the moneta service user and config directories
  8. Installs and enables systemd services (POS server, dashboard, print worker, ESD worker)
  9. Restarts all services

ESD Worker

The moneta-pos-esd-worker service is installed but disabled by default. To activate fiscal compliance on a site, enable it manually:

bash
sudo systemctl enable --now moneta-pos-esd-worker

See Tax & Fiscal Compliance for setup details.

Log Rotation

The installer configures logrotate to rotate logs in /opt/moneta-pos/logs/ daily with 14-day retention. If you installed before this was added, create the config manually:

bash
sudo tee /etc/logrotate.d/moneta-pos > /dev/null << 'EOF'
/opt/moneta-pos/logs/*.log {
    daily
    rotate 14
    compress
    delaycompress
    missingok
    notifempty
    copytruncate
}
EOF

Ensure logrotate is installed (sudo apt install logrotate or sudo yum install logrotate).

Upgrades

The installer is idempotent — running it again on an existing installation safely upgrades binaries while preserving your configuration, license, and database.

Step 4: Run the Setup Wizard

Automated

Note: This is automatically handled by the installer script

Start the dashboard server to launch the wizard:

bash
dashboard-server --port 3000 --api-url http://localhost:8080 --data-dir /etc/moneta_pay

Open your browser to http://localhost:3000 (or http://<server-ip>:3000 from another machine) and complete the Setup Wizard.

Step 5: Configure Systemd Services

Automated

Note: This is automatically handled by the installer script

After the wizard creates config.yaml, set up systemd services for automatic startup.

Create a service user

bash
sudo useradd -r -s /usr/sbin/nologin moneta
sudo mkdir -p /etc/moneta_pay
sudo chown moneta:moneta /etc/moneta_pay

POS Server service

bash
sudo tee /etc/systemd/system/moneta-pos-server.service > /dev/null << 'EOF'
[Unit]
Description=Moneta POS Server
After=network.target postgresql.service
Wants=postgresql.service

[Service]
Type=simple
User=moneta
Group=moneta
WorkingDirectory=/opt/moneta-pos
ExecStart=/usr/local/bin/moneta-pos-server -config /etc/moneta_pay/server.yaml
Restart=always
RestartSec=5
StandardOutput=append:/opt/moneta-pos/logs/moneta-pos-server.log
StandardError=append:/opt/moneta-pos/logs/moneta-pos-server.log
Environment=HOME=/home/moneta

[Install]
WantedBy=multi-user.target
EOF

Dashboard service

bash
sudo tee /etc/systemd/system/moneta-pos-dashboard.service > /dev/null << 'EOF'
[Unit]
Description=Moneta POS Dashboard
After=network.target moneta-pos-server.service
Wants=moneta-pos-server.service

[Service]
Type=simple
User=moneta
Group=moneta
WorkingDirectory=/opt/moneta-pos
ExecStart=/usr/local/bin/dashboard-server --port 3000 --api-url http://localhost:8080 --data-dir /etc/moneta_pay
Restart=always
RestartSec=5
StandardOutput=append:/opt/moneta-pos/logs/dashboard-server.log
StandardError=append:/opt/moneta-pos/logs/dashboard-server.log
Environment=HOME=/home/moneta

[Install]
WantedBy=multi-user.target
EOF
bash
sudo tee /etc/systemd/system/moneta-pos-print-worker.service > /dev/null << 'EOF'
[Unit]
Description=Moneta POS Print Worker
After=network.target postgresql.service
Wants=postgresql.service

[Service]
Type=simple
User=moneta
Group=moneta
WorkingDirectory=/opt/moneta-pos
ExecStart=/usr/local/bin/event-print-worker --config=/etc/moneta_pay/server.yaml --api-url=http://localhost:8080
Restart=always
RestartSec=5
StandardOutput=append:/opt/moneta-pos/logs/print-worker.log
StandardError=append:/opt/moneta-pos/logs/print-worker.log
Environment=HOME=/home/moneta

[Install]
WantedBy=multi-user.target
EOF

ESD Worker service (installed disabled)

The ESD worker handles fiscal receipt submission to the tax authority via Digitax. It is installed but not enabled by default — activate it only on sites that require fiscal compliance.

bash
sudo tee /etc/systemd/system/moneta-pos-esd-worker.service > /dev/null << 'EOF'
[Unit]
Description=Moneta POS ESD RabbitMQ Worker
After=network.target postgresql.service
Wants=postgresql.service

[Service]
Type=simple
User=moneta
Group=moneta
WorkingDirectory=/opt/moneta-pos
ExecStart=/usr/local/bin/event-esd-rabbitmq-worker --config=/etc/moneta_pay/server.yaml
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
Environment=HOME=/home/moneta

[Install]
WantedBy=multi-user.target
EOF

Enable and start

bash
sudo systemctl daemon-reload
sudo systemctl enable moneta-pos-server moneta-pos-dashboard moneta-pos-print-worker
sudo systemctl start moneta-pos-server moneta-pos-dashboard moneta-pos-print-worker

# Enable ESD worker only if fiscal compliance is needed:
# sudo systemctl enable --now moneta-pos-esd-worker

Step 6: Configure Firewall

The installer sets up nginx on port 80 as a reverse proxy to the dashboard. You only need port 80 open for web access and port 8080 for POS clients on the local network.

bash
sudo ufw allow 80/tcp comment "Moneta Dashboard (nginx)"
sudo ufw allow 8080/tcp comment "Moneta POS API"
bash
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload

Verifying the Installation

bash
# Check services are running
sudo systemctl status moneta-pos-server
sudo systemctl status moneta-pos-dashboard
sudo systemctl status moneta-pos-print-worker

# Test the API
curl http://localhost:8080/health

# Test the dashboard (via nginx)
curl -s http://localhost/ | head -5

Open http://localhost (or http://<server-ip>) in your browser and log in with the admin credentials from the wizard.

Managing Services

bash
# Status
sudo systemctl status moneta-pos-server
sudo systemctl status moneta-pos-dashboard
sudo systemctl status moneta-pos-print-worker

# Logs (systemd journal)
sudo journalctl -u moneta-pos-server -f
sudo journalctl -u moneta-pos-dashboard -f
sudo journalctl -u moneta-pos-print-worker -f

# Logs (application log files)
tail -f /opt/moneta-pos/logs/moneta-pos-server.log
tail -f /opt/moneta-pos/logs/dashboard-server.log
tail -f /opt/moneta-pos/logs/print-worker.log

# Stop / Start / Restart
sudo systemctl restart moneta-pos-server
sudo systemctl restart moneta-pos-dashboard
sudo systemctl restart moneta-pos-print-worker

# ESD worker (if enabled)
sudo systemctl status moneta-pos-esd-worker
sudo journalctl -u moneta-pos-esd-worker -f
sudo systemctl restart moneta-pos-esd-worker

Updating

bash
curl -fsSL https://get.moneta-pay.app/scripts/install.sh | sudo bash

The installer automatically stops running services before replacing binaries, then restarts them. Your configuration (/etc/moneta_pay/), license file, and database are preserved. No manual service restart needed.

Uninstalling

bash
# Stop and disable services
sudo systemctl stop moneta-pos-server moneta-pos-dashboard moneta-pos-print-worker moneta-pos-esd-worker
sudo systemctl disable moneta-pos-server moneta-pos-dashboard moneta-pos-print-worker moneta-pos-esd-worker
sudo rm /etc/systemd/system/moneta-pos-*.service
sudo systemctl daemon-reload

# Remove binaries
sudo rm -rf /opt/moneta-pos
sudo rm -f /usr/local/bin/{moneta-pos-server,pypos-server,dashboard-server,event-print-worker,event-esd-*,moneta-license-tool,pypos-license-tool}

# Remove config (careful — this deletes your configuration)
sudo rm -rf /etc/moneta_pay

# Remove service user
sudo userdel moneta

Optionally remove PostgreSQL: sudo apt remove postgresql

Troubleshooting

Services won't start

bash
# Check logs for errors
sudo journalctl -u moneta-pos-server -n 50 --no-pager

# Run manually to see full output
sudo -u moneta moneta-pos-server -config /etc/moneta_pay/server.yaml

PostgreSQL connection refused

bash
# Is PostgreSQL running?
sudo systemctl status postgresql

# Can the moneta user connect?
sudo -u moneta psql -h localhost -U moneta_pos -d moneta_pos -c "SELECT 1"

Check pg_hba.conf if authentication fails — ensure md5 or scram-sha-256 auth is enabled for local TCP connections.

Permission errors

bash
# Fix ownership of config directory
sudo chown -R moneta:moneta /etc/moneta_pay

# Fix license file permissions
sudo chmod 600 /etc/moneta_pay/license.json

VPN / Remote Access issues

See the Remote Access troubleshooting guide, or check the basics:

bash
# WireGuard installed?
which wg

# Tunnel active?
sudo wg show wg0

# Check firewall
sudo iptables -L -n | grep 10.100

# DNS resolution via VPN
dig @10.100.0.1 your-slug.wg.moneta-pay.app

Next Steps

Moneta Pay POS — Built for African Restaurants