Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gustav1105's avatar

Some advice on server setup

What would be the best server setup for the following, I am planning to use digital ocean with forge. I am starting with digital oean and picking my droplets, (As you can realise I have not done this before so any help will be valuable).

The application works like so , I have a website where users can log in and a website where managers can log in. On the users website the user will be able to do things concerning his or her own profile ex..

On the managers website the users will be able to do things concerning all the users of the users website,

Now thinking in terms of server I have come up with the following idea. I need a vps droplet for my websites all of them a droplet for my dataserver , then here is the question.

A user on the users website and on the managrs website both of them are users, but they depending on the application and privlages they can only do certain things, In my projects right now I have two different applications each with theyr own models and controllers, but If I change this to a sever based vps setup . I am hoping to have the following setup...

an application server that runs the things that are the same for a user or his roles no matter on which application he or she is, an application server for the specific users on users website or managers website,

is this possible , or am I barking up the wrong tree, I am still ignorant in the usages of differnet servers and what would be best practices, please help!

0 likes
1 reply
beetuco's avatar

To clarify, you have 2 codebases (2 separate projects) that will use the same database? You are hoping to have one server to run both websites and then a server for the database?

A server can be whatever you want it to be. It can host a database only, or database and applications (multiple applications with virtual hosts). Depending on what the applications resource cost will be and what your budget is you can have 1 VPS or many.

Best practice is to at least have the database and application separate (min of 2 servers). The only way to connect to the database server from your application is locally through a private network.

Please or to participate in this conversation.