# Auto logon for local user

**URL:** <https://community.openenergymonitor.org/t/auto-logon-for-local-user/30715>\
**Category:** Emoncms\
**Created:** [15 November 2026 03:20 UTC](https://community.openenergymonitor.org/t/auto-logon-for-local-user/30715 "2026-11-15T03:20:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wt29](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/w/a587f6/32.png) [@wt29](https://community.openenergymonitor.org/u/wt29)\
**Post date:** [15 November 2026 03:20 UTC](https://community.openenergymonitor.org/t/auto-logon-for-local-user/30715/1 "2026-11-15T03:20:58Z")

</div>

I’ve had EMONCMS running since, I think about 2018. Originally it was on an AWS server but about 3 years ago I migrated it to a local Pi4 with a SATA hat to stop crashing SD cards.

Its been great and fulfills my needs. Anyway - I always objected to needing to logon locally but was really too lazy to figure out the PHP code to implement. I also use a CloudFlared tunnel so I can see what’s happening when away from home. Cue Claude Code…

Here is Claude’s implementation to a single file /var/www/emoncms/Modules/user/user\_model.php that not only allows me direct (no logon) local access but also recognises a tunnel logon and prompts for the UN/Password. The only gotcha is you will need to stuff your username into $local\_autologin\_user = ‘xxxx’; line. FYI - this might break any EMONCMS updates but I think the login modules are pretty stable

[user\_model.zip](https://community.openenergymonitor.org/uploads/short-url/Ahu0DkGME8J8iQt070yWzbhvUrr.zip) (7.6 KB)

This might be of use to someone. BTW Claude Code is truly scary. It updated my shit personal webpage in under 15 minutes to something that suits me fine.

/Tony

---

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [15 November 2026 11:41 UTC](https://community.openenergymonitor.org/t/auto-logon-for-local-user/30715/2 "2026-11-15T11:41:24Z")

</div>

> [@wt29](#):
>
> this might break any EMONCMS updates…

I think this is a certainty. I know almost nothing about Git, however I believe there are magical incantations which you can invoke to ameliorate the problem.

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [15 November 2026 21:35 UTC](https://community.openenergymonitor.org/t/auto-logon-for-local-user/30715/3 "2026-11-15T21:35:32Z")

</div>

If your system is available on the web, make sure Emocnms is running latest version and the Linux system is fully patched to ensure security.
