How to setup redis on custom server

Anybody knows how to setup & use redis for custom vps?

If you have direct access to the VPS you can use wappler resource manager, add existing or create a new server and then clicking on services, add service, database and redis. You then will be able to selected that database on your target options! :slight_smile:

1 Like

I've tried all the methods to connect my server in resource manager, but I can't connect because the port which is used by wappler is 22 but the server has different port.
There is no such option to choose port while ssh connection

Hi Priya,

It is unclear as to whether the issue is with setting up of Redis (you can install Redis on the server after you have established a connection) or the custom VPS itself. Have you uploaded SSH key (public key) from your local computer to the new server?

As you can see, redis is installed on my server

Screenshot 2025-07-27 144509

I'm able to access SSH from Terminus as well as from PuTTY.

But I can't login from Wapppler.

You can always connect to Redis via redis connection settings:

you can simply hard code them or use the env variable for the connection string redis://...

2 Likes

Probably because Redis is only set to accept connections from the machines local IP. KEEP IT THIS WAY. If you need to connect externally, setup a VPN.

Alternatively (but I recommended using the VPN method) make sure the firewall is setup correctly, set a Redis password, and whitelist your IP

Actually I've never used this. I'll appreciate if someone can provide GUI guide to do this in Wappler.

Thanks.... :handshake:

Once you have installed Redis as a service via Resources Manager, enabled Redis in Project Settings > Targets and Server Connect Settings > Redis, then the docker-compose.yml file will contain the required information to use Redis that has already been installed on the remote server.

I'm assuming that you're deploying the project via Docker on the remote server. If your project is being setup and deployed differently, then please describe what you are trying to setup.

I'm stuck here only. I'm unable to setup my remote server in resource manager.

I'm using scalahosting vps. Not Docker

Was Redis installed directly on the server?

Are you deploying the project via Docker (selected as a Server Type = Docker in the project settings) or publishing via FTP?

redis was installed directly on server via ssh & I'm deploying via ftp.

If you're doing this all manually (e.g, installing Redis, Apache/NGINX, etc), basically forget about the Wappler server manager. It's not really of any use to you.

If you have Redis installed on your VPS, you just need to enter the connection details as mentioned by @Evaldas

With that said, as I mentioned before, Redis is not something you should expose to the outside world, and as such it doesn't come configured that way when you install it via your package manager.

You've therefore got two options:

  1. Install Redis locally on your PC, which you can then use as a dev environment. You need to enter the connection details like mentioned above, and Wappler saves theses per target. So for your dev target, you would use your local Redis server, and for your production target, the Redis install on your VPS (keep in mind you won't be able to connect locally to the production target redis, but it should work once running on the VPS itself)

  2. You can use Redis installed on your VPS by installing a VPN on your VPS and using a bridge, so that you can access Redis remotely. You can follow any tutorial for this. Here's one as an example. (Adjust network steps as required - Configure network bridge/Install OpenVPN/Adjust Firewall steps).

--

Just a couple words of friendly advice here, if this is your first time using Linux to do this sort of thing, you should take the time to read guides on hardening your setup. Enable SSH keys, make sure you have a good firewall setup, etc, etc.

Alternatively, you can just use the Wappler server manager which will handle everything for you, including SSH keys and deployment, if you use one of the built-in providers.

The VPS I'm using is managed by service provider team. They only take care of firewall and security. I've only some basic access of SSH.

Thanks everyone for the support. I think I should stick with In-Memory sessions instead of redis for the moment. I'll consider redis later.... :grinning:

I agree with @Digo. If you're not deploying your project via Redis/Docker, then Resources Manager functionality will not work for you.

If you are setting up a VPS and have already imported it in Wappler as a custom server, then why not try deploying your projects in a Docker. Wappler's Resources Manager provides excellent functionality to install Redis, deploy / redeploy projects.

Of course, if you want to try Docker, then you will need to install Docker Desktop on the local laptop and also deploy local dev projects on the local Docker while developing and testing. Additionally, you will need to reinstall the remote server OS so that Redis, Traefik etc. can be managed via Resources Manager.

If you need any assistance with Docker, then don't hesitate to reach out.