Try a PLC free — no signup

OpenPLC Troubleshooting & Default Credentials

The most common OpenPLC issues, in the order they typically occur during a first install. If you're stuck on the login screen, scroll to Default Credentials below.

Default credentials

After fresh install, the OpenPLC web interface (port 8080) accepts:

  • • Username: openplc
  • • Password: openplc

Change them in Users settings before exposing the device on any non-isolated network.

Cannot log in — recover credentials

If you changed the password and lost it, reset by editing the SQLite database directly:

# On Raspberry Pi / Linux
cd ~/OpenPLC_v3/webserver
sudo systemctl stop openplc
sqlite3 openplc.db
> UPDATE Users SET password='openplc' WHERE username='openplc';
> .quit
sudo systemctl start openplc

On Windows the database is at C:\OpenPLC_v3\webserver\openplc.db. Use DB Browser for SQLite.

Compile errors

  • "Variable not declared" — Check the global Configuration variables match what your POU references. %IX0.0 in code requires a Configuration variable mapped to %IX0.0.
  • "Type mismatch" — Common when assigning DINT to INT or REAL to DINT without explicit conversion. Use DINT_TO_INT(), REAL_TO_DINT().
  • "Function not found" — OpenPLC supports a subset of IEC 61131-3 functions. Check the ST reference for what is supported.
  • "Sketch too big" (Arduino targets) — Arduino Uno has only 32 KB flash. Switch to Mega 2560 or use an ESP32.

Runtime not starting

  • Linux service failed — Check sudo systemctl status openplc and journalctl -u openplc -n 100 for errors.
  • Port 8080 in use — Another service is using port 8080. Stop it or change OpenPLC port in webserver/scripts/scripts.cfg.
  • Permission denied on GPIO — On Raspberry Pi, OpenPLC must run as root (or with proper GPIO permissions). The default install handles this; manual installs need sudo.
  • Compile succeeded but program won't start — Check openplc.log in the webserver folder for runtime errors.

Modbus client cannot connect

  • Port 502 — verify firewall allows TCP 502. sudo ufw allow 502/tcp on Ubuntu.
  • Slave ID — OpenPLC defaults to slave ID 1. Some clients ignore it for TCP but it must match for serial Modbus.
  • Address mapping — OpenPLC %QX0.0 (output bit 0) maps to Modbus coil 1 (1-indexed). Off-by-one is the most common bug.
  • PLC not running — The Modbus server only responds when the PLC is in RUN mode. Click Start PLC on the Dashboard.

Where to find logs

  • Linux/Raspberry Pi: ~/OpenPLC_v3/webserver/openplc.log
  • Windows: C:\OpenPLC_v3\webserver\openplc.log
  • Web interface: Logs section in the left navigation
  • Service logs (Linux systemd): journalctl -u openplc -f

Related guides

Free PLC simulator

Practise the logic before you set up OpenPLC

Run motor, timer and counter logic in your browser with nothing to install, then rebuild it in OpenPLC. Free to try — no signup.

Try it in your browser — no signup →

Opens plcsimulationsoftware.com — same team