# Railway

***

1. Click the following prebuilt [template](https://railway.app/template/pn4G8S?referralCode=WVNPD9)
2. Click Deploy Now

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-59122a4fab21ce91a895ac8cfe274ac8f8494e0e%2Fimage%20(1)%20(1)%20(2)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

3. Change to your preferred repository name and click Deploy

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-29ffc492734d41a3ea5c69f23a1c547ac6f8b185%2Fimage%20(2)%20(1)%20(2)%20(1).png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

4. If succeeds, you should be able to see a deployed URL

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-bc3c865545b206586fa3ab15b45ebefa13f54faf%2Fimage%20(2)%20(2).png?alt=media" alt=""><figcaption></figcaption></figure>

5. To add authorization, navigate to Variables tab and add:

* FLOWISE\_USERNAME
* FLOWISE\_PASSWORD

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-42e43e050d0adab9b10fe686547e7386de16f549%2Fimage%20(15)%20(2)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

6. There are list of env variables you can configure. Refer to [environment-variables](https://docs.flowiseai.com/configuration/environment-variables "mention")

That's it! You now have a deployed Flowise on Railway [🎉](https://emojipedia.org/party-popper/)[🎉](https://emojipedia.org/party-popper/)

## Persistent Volume

The default filesystem for services running on Railway is ephemeral. Flowise data isn’t persisted across deploys and restarts. To solve this issue, we can use [Railway Volume](https://docs.railway.app/reference/volumes).

To ease the steps, we have a Railway template with volume mounted: <https://railway.app/template/nEGbjR>

Just click Deploy and fill in the Env Variables like below:

* DATABASE\_PATH - `/opt/railway/.flowise`
* APIKEY\_PATH - `/opt/railway/.flowise`
* LOG\_PATH - `/opt/railway/.flowise/logs`
* SECRETKEY\_PATH - `/opt/railway/.flowise`
* BLOB\_STORAGE\_PATH - `/opt/railway/.flowise/storage`

<figure><img src="https://823733684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F00tYLwhz5RyR7fJEhrWy%2Fuploads%2Fgit-blob-3d01ff6edc109b5285e8c250bbbad4b746237c15%2Fimage%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1).png?alt=media" alt="" width="420"><figcaption></figcaption></figure>

Now try creating a flow and save it in Flowise. Then try restarting service or redeploy, you should still be able to see the flow you have saved previously.
