Skip to content
Persistent Volume Initialization and PostgreSQL Network Isolation on Hobby Plan
vowsyn
OP

2 hours ago

I am currently on the Hobby plan and preparing a private application deployment.

I need to initialize an existing persistent storage volume as root, assign ownership to UID/GID 1000, and subsequently run the application without root privileges.

During initialization, I need to prevent network access to the existing PostgreSQL service.

What is the recommended approach for achieving this on Railway?

Can this be accomplished on the Hobby plan, or does it require a higher subscription tier?

Please also confirm whether an existing volume can be initialized within an isolated environment without losing its contents.

Awaiting User Response

1 Reply

Railway
BOT

2 hours ago

Volumes are mounted as root when the container starts. They are not mounted during the build or the pre-deploy command, so any chown of the mount path to UID/GID 1000 has to happen in your start command, before your process drops to the non-root user. If your image already sets a non-root user, setting RAILWAY_RUN_UID=0 on the service makes it run as root so that step can happen.

Private networking is isolated per project and per environment. Services in a different environment can't reach your PostgreSQL service over the private network, but every service in the same environment can. Nothing described here is limited to a higher plan than Hobby.

We can't confirm that an existing volume can be moved into a separate environment and keep its contents. Before you rely on that, take a backup of the volume and test the process in a non-production environment.


Status changed to Awaiting User Response Railway • about 2 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...