Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Cloudron API Docu - Set Operators correction?

    Discuss api documentation
    4
    1
    0 Votes
    4 Posts
    111 Views
    jamesJ
    Hello @3246 With the cloudron cli you can run e.g: cloudron exec --app $APP -- fallocate -l 4M /app/data/4M See cloudron exec --help: Usage: cloudron exec [options] [cmd...] Exec a command in an application Options: -t,--tty Allocate tty --app <id/location> App id or location -h, --help display help for command Examples: $ cloudron exec --app myapp # run an interactive shell $ cloudron exec --app myapp ls # run command $ cloudron exec --app myapp -- ls -l # use -- to indicate end of options Was not sure if possible via the API but since I can debug the cloudron cli and see what it do I figured something out. Send the to /api/v1/apps/$APPID/exec # Command is an array `ls -lah /app/data` would become for each space ["ls", "-lah", "/app/data/"] curl "https://my.$DOMAIN.$TLD/api/v1/apps/$APPID/exec" \ -H 'Authorization: Bearer $APITOKEN' \ -H 'content-type: application/json' \ --data-raw '["ls", "-lah", "/app/data/"]' # this returns and id { "id": "a90bcfcec1d29f7a595638ea66c8ac0bb53b594047ac74fc80bf97f75fed0c19" } But getting the output of the executed command is. . . tricky. Just look at the source code for the cli for this part: const searchParams = new URLSearchParams({ rows: stdout.rows || 24, columns: stdout.columns || 80, access_token: token, tty }); const req = https.request({ hostname: adminFqdn, path: `/api/v1/apps/${app.id}/exec/${execId}/start?${searchParams.toString()}`, method: 'GET', headers: { 'Connection': 'Upgrade', 'Upgrade': 'tcp' }, rejectUnauthorized }, function handler(res) { if (res.statusCode === 403) exit('Unauthorized.'); // only admin or only owner (for docker addon) exit('Could not upgrade connection to tcp. http status:', res.statusCode); }); req.on('upgrade', function (resThatShouldNotBeUsed, socket /*, upgradeHead*/) { // do not use res here! it's all socket from here on socket.on('error', exit); socket.setNoDelay(true); socket.setKeepAlive(true); if (tty) { stdin.setRawMode(true); stdin.pipe(socket, { end: false }); // the remote will close the connection socket.pipe(stdout); // in tty mode, stdout/stderr is merged socket.on('end', exitWithCode); // server closed the socket } else { // create stdin process on demand if (typeof stdin === 'function') stdin = stdin(); stdin.on('data', function (d) { var buf = Buffer.alloc(4); buf.writeUInt32BE(d.length, 0 /* offset */); socket.write(buf); socket.write(d); }); stdin.on('end', function () { var buf = Buffer.alloc(4); buf.writeUInt32BE(0, 0 /* offset */); socket.write(buf); }); stdout.on('close', exitWithCode); // this is only emitted when stdout is a file and not the terminal demuxStream(socket, stdout, process.stderr); // can get separate streams in non-tty mode socket.on('end', function () { // server closed the socket if (typeof stdin.end === 'function') stdin.end(); // required for this process to 'exit' cleanly. do not call exit() because writes may not have finished . the type check is required for when stdin: 'ignore' in execSync, not sure why if (stdout !== process.stdout) stdout.end(); // for push stream socket.end(); // process._getActiveHandles(); process._getActiveRequests(); if (stdout === process.stdout) setImmediate(exitWithCode); // otherwise, we rely on the 'close' event above }); } }); req.on('error', exit); // could not make a request req.end(); // this makes the request From a little debugging I got the API path: /api/v1/apps/$APPID/exec/$EXECID/start?rows=21&columns=257&tty=false But when CURL'ing this: curl "https://my.$DOMAIN.TLD/api/v1/apps/$APPID/exec/$EXECID/start?rows=21&columns=257&tty=false" \ -H "Authorization: Bearer $APITOKEN" \ -H 'content-type: application/json' { "status": "Not Found", "message": "exec requires TCP upgrade" } And I am not sure how to "TCP upgrade" the curl request. I will ask the team.
  • 2 Votes
    6 Posts
    704 Views
    timconsidineT
    @LoudLemur surfer serves http content, so you can't (as it stands now) serve gemini files from it. You need the app from @DidierMalenfant or my agate+ app. Just making changes to agate+ app and releasing new version later today. Will try to publish an image for it to simplify testing.
  • Fider - first time use and documentation

    Fider fider documentation setup
    2
    2 Votes
    2 Posts
    368 Views
    girishG
    Right.. the manifest update is stuck. @vladimir.d is fixing it.
  • 0 Votes
    4 Posts
    609 Views
    nebulonN
    oh that is true, I forgot about Cloudron 7 not being supported/tested on Ubuntu 24. So then yes you have to first install Ubuntu 22, then restore Cloudron, then update Cloudron, then follow the guide at https://docs.cloudron.io/guides/upgrade-ubuntu-24/
  • 2FAuth - is a mystery...

    2FAuth 2fauth documentation how to
    9
    0 Votes
    9 Posts
    3k Views
    jdaviescoatesJ
    @LoudLemur said in 2FAuth - is a mystery...: Which Cloudron supported application could make use of 2Fauth? Any that support setting up 2FA, e.g. GitLab, probably loads of others. But it's not really the apps making use of it, it you using it to generate your 2FA codes to login to those apps.
  • MiroTalk - documentation page

    Solved MiroTalk mirotalk documentation
    4
    0 Votes
    4 Posts
    1k Views
    robiR
    It can be helpful to use docs.mirotalk.com for inspiration
  • 4 Votes
    2 Posts
    861 Views
    timconsidineT
    I occasionally use Mermaid in Trilium and it's nice. A dedicated app would be great.
  • Cloudron Documentation Ideas

    Discuss documentation feedback suggestion
    13
    1 Votes
    13 Posts
    4k Views
    L
    @timconsidine said in Cloudron Documentation Ideas: I find Cloudron documentation fine in its current form Cloudron has good quality documentation, I agree.
  • 2 Votes
    2 Posts
    2k Views
    ericdrgnE
    @LoudLemur If you go to the file manager for you PrivateBin app you can change line 41 to be what you want. https://github.com/PrivateBin/PrivateBin/wiki/Templates (same link the cloudron docs provide) the PrivateBin repo provides examples of templates so you can add those. Below is lines 40 and 41 if you want to use the bootstrap dark template do the same thing. ; template to include, default is "bootstrap" (tpl/bootstrap.php) template = "bootstrap-dark" The Cloudron docs then go into what you need to do if you want to create your own template to use with PrivateBin. You would create the custom.php template and add it to the file manager in /app/data/custom_template/custom.php and then go back into the conf.php file and change line 41 to be the below. template = "custom"
  • 0 Votes
    7 Posts
    2k Views
    L
    @girish said in [SOLVED] How to Embed Ackee's tracker.js script in the tracked website on Cloudron: @LoudLemur Ah so, the ackee code snipped has to be injected somehow into the app. This is dependent on the app and the app may also have no provision/feature to inject tracker scripts. For example, say Ghost, you have to use code injection feature to inject this tracker script - https://ghost.org/tutorials/use-code-injection-in-ghost/ . I don't know of immich/peertube/grav had code injection... One has to investigate each project separately. Thanks, I hope some words to this effect could be included in the relevant section of the Ackee documentation, along with the mention of some search-terms that might be helpful, for example: code-injection, ...
  • Typo - Mesure instead of Measure

    Solved Matomo docs documentation
    2
    2 Votes
    2 Posts
    843 Views
    girishG
    @jdaviescoates Fixed, thanks. That text was originally copied from matomo itself. I think they are a french company and thus the typo (as in, I think measure is mesure in french, maybe....)
  • Small page anchor error in docs

    Discuss documentation
    2
    0 Votes
    2 Posts
    820 Views
    girishG
    @zylstra thanks! fixed.
  • Search engine for the documentation

    Discuss documentation search
    6
    0 Votes
    6 Posts
    1k Views
    JOduMonTJ
    I know it is possible to index specific site with YaCy but, someone know if it's possible to embed it in a website ?