Where is the project options file stored?

My Projects_Options is suddenly blank. I am trying to locate the options file so I can restore it from backup. Where is that data stored? Hoping I can recover it from backup data.

The directory is hidden by default and its located in your Project root directory, remember to set show hidden files and folders, within the directory you will find your targets directory and the project.json file which contains your Project information:

.wappler

  • targets
  • project.json
2 Likes

Perfect. Thank you.

1 Like

OK, but how do I restore the project.json file?
I probably have to copy the contents of the hidden file, but then what?

Firstly copy the existing file somewhere so you have a backup of it. Things can and do go wrong so account for that. Also the file will only contain variables you saved and is not a magic fix. So if the file you are using to 'fix' an issue may not work unless the file itself was working correctly the last time you saved it.

By the sounds of it you just want to copy the existing structure from a working example and paste it in to the broken version, yes? In that case you're just going to open the working file and copy the entire contents and paste it in to the broken file. Or you can just rename the existing (broken file) broken-project.json, and paste in the working version...

As for 'restoring it' this all depends if you have a working example to restore of course?

That is all there is to it @Marzio But like I said it is not a magic fix...

Thank you.
I actually have a Node.js site that's been working flawlessly on Cloud Hetzner for a while.
Now I need to make a small change to some pages, but due to some changes on my computer, I can no longer connect to a production target, and after many attempts, my local performance has even gotten a bit worse.
I also connected the remote server with FileZilla, which would allow me to fix the changes, but I still haven't found where the site pages are located.
I'll try again.
Thanks for your reply.

1 Like

You can SSH in to the server and try running: find / -name index.ejs 2>/dev/null and this will let you know the location of the file (or replace index.js with a known page from your application). Which will probably be located in the /opt/PROJECT_NAME directory, or more specifically, Wappler deploys to /opt/node_app if my memory serves me correctly...?

Thanks
I'll try tomorrow

1 Like

Before messing everything up I'm trying to restore the project sections somehow, because when I create a target it's ok with green light, but I can't save it because the general data and frameworks of the project options are gone and I can't recreate them (starting with the project name

The above will only work if the file you want to use to replace the broken file is a working example. This is why a BACKUP is so incredibly important. Every time you start to work on a Project back it up first (even if you just copy the Project directory to your desktop). It is very difficult to help @Marzio. We do not know anything about your Project.

After some corrections, I was able to configure the remote target, and I can now view the list of site files remotely.

Although I don't understand why there's still a red flag on Web Server, I'm still having some problems with the Development target.

Schermata 2026-06-17 alle 07.04.02

1 Like

The red flag on the Web Server means no project is running on the target server. Is it a Docker project?

Project nodejs docker on Cloud server /ubuntu Hetxner

It looks like you have a couple of posts about setting up a remote server on Hertzner. I included a link in your other post to guide you in setting up a remote server in Resource Manager.

If you have any questions about setting up a remote server, please post them in the other post, as that is more directly related to what you need.

1 Like
  Something strange is happening.
I configured both the remote target and the development target.
Both passed the test.
But if I try running the tests again, they crash, and I have to restart Wappler.
And then, if I select the remote target, the light is green.
While the development target shows a red light.

I think the problem is related to Docker Desktop.

I wouldn't be too distracted by the red/green dots. Is the Project working locally? If so then you can ignore the red dot. We see it all the time despite the Project running fine (if we deploy to remote then the development seems to switch to green for some bizarre reason and has always done this our side).

The target development ok test, but select target error launching Services

This Resources Manager

I think there's a problem with Docker desktop.
Do you know how Docker should be configured?

index.js is missing which is a critical file for the application.

Do you see it in the root directory of your Project?

Here is a copy of mine:

**if (process.env.NODE_ENV !== 'production') {
    require('dotenv').config();
}

const server = require('./lib/server');
const config = require('./lib/setup/config');
const debug = require('debug')('server-connect:start');

const port = config.port || 3000;
const httpsOptions = config.https && config.https.enabled ? config.https.options : null;

if (httpsOptions) {
  // Load SSL files
  const fs = require('fs');
  if (httpsOptions.key) {
    httpsOptions.key = fs.readFileSync(__dirname + '/certs/' + httpsOptions.key);
  }
  if (httpsOptions.cert) {
    httpsOptions.cert = fs.readFileSync(__dirname + '/certs/' + httpsOptions.cert);
  }
  if (httpsOptions.ca) {
    httpsOptions.ca = fs.readFileSync(httpsOptions.ca);
  }
}

if (config.cluster) {
  debug('Starting in cluster mode');

  const cluster = require('cluster');
  const totalCPUs = require('os').cpus().length;

  if (cluster.isMaster) {
      debug(`Number of CPUs is ${totalCPUs}`);
      debug(`Master ${process.pid} is running`);

      for (let i = 0; i < totalCPUs; i++) {
          cluster.fork();
      }

      cluster.on('exit', (worker, code, signal) => {
          debug(`worker ${worker.process.pid} died`);
          debug('Starting another worker');
          cluster.fork();
      });
  } else {
      debug(`Worker ${process.pid} started`);
      server.start({ port, httpsOptions });
  }

  return;
}

server.start({ port, httpsOptions });**

As far as I can tell it is generic... IF YOU DON'T SEE THE FILE IN THE ROOT OF YOUR PROJECT CREATE THIS FILE index.js and PASTE THE ABOVE IN TO IT AND SAVE. Rebuild and deploy again.

IF IT DOES EXIST copy it and put it somewhere safe as a BACKUP. And try the above. Maybe your file has become corrupted in some way?

BACKUP BACKUP BACKUP BACKUP before making changes like this (even if you just copy the Project directory to your desktop),