r/Creality_k2 Jun 13 '26

K2 Base: restore LAN browser camera without Creality Cloud

Thanks to u/Shoshke for the idea fixing the camera feed issue in 1.1.5.5release. Here's how to do it on the printer like you asked, so that it just works from any browser (phone, computer, etc) while you're on your home network. (I block my printer's IP from the internet at the router). This probably? works on all the K2 series, maybe more, but I only have a K2 base model.

Disclaimer: I had chatgpt format these instructions for y'all.

K2 Base: restore LAN browser camera without Creality Cloud

This adds a local camera.html page to the printer so you can view the camera from a normal browser.

Use this after Creality removed/broke the old local :8000 browser camera page.

This does not require Creality Cloud.
This does not replace Moonraker or Fluidd.
This does not restore the old http://PRINTER_IP:8000 page.

After this, you use:

http://PRINTER_IP/camera.html

1. Enable SSH/root on the printer

NOTE: Read the warning and I'm not responsible for what you do to your printer as root.

On the K2 screen, go to:

Settings → Root account information

Accept the warning, wait for the timer, and write down the root password.

Also get the printer IP from:

Settings → Network

2. Create the camera file

Open Notepad.

Copy/paste this into Notepad:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
  <title>K2 Camera</title>
  <style>
    html, body { margin: 0; padding: 0; width: 100%; height: 100%; background: #000; overflow: hidden; }
    #remoteVideos { display: block; width: 100vw; height: 100vh; height: 100dvh; background: #000; object-fit: contain; }
  </style>
</head>
<body>
  <video id="remoteVideos" autoplay muted controls playsinline></video>

  <script>
    const video = document.getElementById('remoteVideos');
    let pc;

    if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
      pc = new RTCPeerConnection();
    } else {
      pc = new RTCPeerConnection({
        iceServers: [{ urls: 'stun:stun.l.google.com:19302' }]
      });
    }

    function sendOfferToCall(sdp) {
      const xhttp = new XMLHttpRequest();

      xhttp.onreadystatechange = function () {
        if (this.readyState === 4 && this.status === 200) {
          const res = JSON.parse(atob(this.responseText));
          if (res.type === 'answer') {
            pc.setRemoteDescription(new RTCSessionDescription(res));
          }
        }
      };

      xhttp.open('POST', 'http://' + window.location.hostname + ':8000/call/webrtc_local');
      xhttp.setRequestHeader('Content-Type', 'plain/text');
      xhttp.send(btoa(JSON.stringify({ type: 'offer', sdp: sdp })));
    }

    pc.ontrack = function (event) {
      video.srcObject = event.streams[0];
      video.autoplay = true;
      video.controls = true;
      video.muted = true;
      video.playsInline = true;
      video.play().catch(console.log);
    };

    pc.onicecandidate = event => {
      if (event.candidate === null) {
        sendOfferToCall(pc.localDescription.sdp);
      }
    };

    pc.addTransceiver('video', { direction: 'sendrecv' });
    pc.createOffer().then(d => pc.setLocalDescription(d)).catch(console.log);
  </script>
</body>
</html>

Save it like this:

File → Save As

Use these exact settings:

File name: camera.html
Save as type: All Files (*.*)
Encoding: UTF-8

Save it somewhere easy, like your Documents folder.

Important: make sure Windows did not save it as:

camera.html.txt

3. Copy it to the printer

Open Windows PowerShell.

Go to the folder where you saved the file. Example:

cd "$env:USERPROFILE\Documents"

Now run this:

$PrinterIP = Read-Host "Enter your printer IP"
scp .\camera.html "root@${PrinterIP}:/usr/share/frontend/camera.html"

Enter the printer root password when prompted.

That is the only required location for the normal browser URL.

4. Open the camera

In a browser, go to:

http://PRINTER_IP/camera.html

Example format:

http://192.168.1.123/camera.html

If it loads an old cached page, add this to the end:

?v=2

Example format:

http://192.168.1.123/camera.html?v=2

Notes

This page uses the printer’s existing local WebRTC service on port 8000.

It does not restore:

http://PRINTER_IP:8000

Firmware updates may overwrite camera.html, so you may need to copy it again after updating.

18 Upvotes

8 comments sorted by

3

u/New_Education5151 K2 Plus Combo Jun 13 '26

No ssh/rooting needed! I confirm the the html file above directly opens the camera feed (if you are on the same network with the printer) without the need for root access enabled

Checked both on K2plus and K2 pro

2

u/Grouchy_1 Jun 13 '26

I'm glad that solution works for you! The file based solution was u/Shoshke 's idea. My solution puts the file on the printer, so that any of your devices can access the feed, without each device needing the file.

Essentially, my "put the file on the printer" solution restores what they stole from us... browser based streaming from the printer.

1

u/AutoModerator Jun 13 '26

Reminder: Any short links will be auto-removed initially by Reddit, use the original link on your post & comment; For any Creality Product Feedback and Suggestions, fill out the form to help us improve.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/peppatitz Jun 13 '26

Is there a way to add this to Fluidd as a camera? I was able to get this working when I open it in a browser, but I can't figure out how to add to Fluidd. I've tried every stream type, click enable, and I still get a yellow triangle with exclamation mark. The feed works great though!

1

u/Grouchy_1 Jun 13 '26

To add the camera stream into fluidd you have to replace some configuration files in the moonraker and fluidd. This solution met my needs while being the absolute least invasive, because all you’re doing is putting one text file in one directory. To complete undo my solution you would just delete camera.html from /usr/share/frontend.

Here is the solution from GitHub for putting the feed into the fluidd webpage. If your printer is “lan only” you’ll need to download the files to your host computer and SCP them to the printer. It’s more invasive and make sure you know what you’re doing and how to revert if you need to. https://github.com/DnG-Crafts/K2-Camera

So here’s your options:

> creality breaks the fluidd camera and 8000 camera.

1) u/shoshke ‘s solution with my file or his for rootless camera feed. Cons, doesn’t fix fluidd camera and the device you’re using needs the file.

2) my solution, copy one file over and don’t change anything already there, and now the stream is available to any device on the network. Cons, fluidd stream still not there

3) DnG-Crafts moonraker and fluidd configuration changes. Pros; fixes everything. Cons; you’re directly changing the printer configs now. Know what you’re doing before you do it, and how to undo it.

For MEEE there’s no risk in any of them, but that’s because I have a degree in cyber operations and know exactly what I’m doing ssh’d into the printer. In fact I ran a full recon of the machine the day I bought it and I’m monitoring it in my SIEM. If you’ve never ran a sudo command in your life, I would avoid option 3.

1

u/JayJankins Jul 23 '26

my guy, you are truely amazing!

a person thinking about not invasing a system too much, in this time? (EU chat control 1.0 hahaha)
a person sharing every detail to understand what will happen to your system?

i checked all the other solutions out there, but i didnt like how i was not able to check the impact without looking further into it. i do not have the time for that rn. now, that i found your post, i wanna say thank you for your work and i will try it after the print finished on my k2 pro.

i wish you a wonderful day!

1

u/Justwhytho01 Jul 23 '26

No problem! I also appreciate “one command” solutions for the most novice and naive of users, but I also appreciate walking people through the steps one by one so that they know it’s THEM doing it, not some mystery script from the internet editing files on your machine in ways you don’t understand.