Self-hosting your Moralis server

Hi,

I haven’t imported ethAddress table to the new database yet. Those wallets that work, they can login without the ethAddress table :slight_smile:

Do we really need to import ethAddress table? I don’t see it is generated in the self-hosted server.

you don’t need to import it

any difference between a wallet that works and one that doesn’t work?
if you look in network tab do you see any difference?

1 Like

bro please can you help me im having the exact same issue
please

im having this issue when i self host my server i honestly dont know whats wrong already upgraded my account still im confussed

Is there a way to use the CLI with self hosted? We would like to be able to deploy our cloud code using the same system we use with Moralis hosted.

When you self host you can update directly the file that contains the cloud code as it is on the same server as where the self hosted server runs

can you help me bro with my server hosting error

did you look in logs to see if there is anything there?

did you set the environment variables?

So no? I can’t use CLI, I have to update the files directly in our repo to deploy?

I am also wondering if we have to update all our custom cloud functions to be typescript. I didn’t see anything in the guide about this, but the devs tell me its required. Is there a step we are missing that would allow us to upload our JS cloud functions so they work on self hosted?

you start from that repo and you can do you own repo after that the way you need it, there will be a file specific to cloud code that you can edit after that, and that you should edit after that in order to add your cloud functions

Yes I did I added everything still nothing works like man im so confused :confused: I have been trying for really long now :unamused:

Nothing I checked bro like it worked perfectly on my localhost but it doesn’t on my herokuapp

You can try automating it like with a script that does something similar - upload local file to your server, trigger rebuild / redeploy of server.

i basically been doing that since this morning idk what else to try like im this close to have it running i dont seem to be figuring out what the problem is

You are following this tutorial (last part) for deploying to Heroku?

i did everything in that tutorial like seriously lol i only added my cloud code thats all

2022-11-11T23:38:41.667689+00:00 app[web.1]: at emitErrorCloseNT (node:internal/streams/destroy:122:3)
2022-11-11T23:38:41.667689+00:00 app[web.1]: at processTicksAndRejections (node:internal/process/task_queues:83:21) {
2022-11-11T23:38:41.667690+00:00 app[web.1]: errno: -22,
2022-11-11T23:38:41.667690+00:00 app[web.1]: code: ‘EINVAL’,
2022-11-11T23:38:41.667690+00:00 app[web.1]: syscall: ‘connect’,
2022-11-11T23:38:41.667691+00:00 app[web.1]: address: ‘0.0.0.1’,
2022-11-11T23:38:41.667691+00:00 app[web.1]: port: 6379
2022-11-11T23:38:41.667691+00:00 app[web.1]: }
2022-11-11T23:38:41.880013+00:00 heroku[web.1]: Process exited with status 7
2022-11-11T23:38:41.949852+00:00 heroku[web.1]: State changed from starting to crashed

thats my console

Following the steps from that tutorial all works on my side - only one issue with express-unless when deploying (had to install @types/[email protected]). This repo is the one you used for your self hosted server?

What did you do exactly?

Can you outline all the steps you did for Heroku.

It looks like a redis connection that doesn’t work here