How to install Postgres inside the /home/user directory?

I need a Postgres database to run from inside a folder in the home/user/ directory.
Changing the default data directory doesn’t work, because of permission issues.

I haven’t got binding to work either.

Is there any way to install Postgres directly in the home/user/ directory?

A symlink should work.

mv /var/lib/pgdata /home/pgdata
ln -s /home/pgdata /var/lib/pgdata