# Create an upload keystore

If you have an existing keystore, skip to the next step. If not, create one using one of the following methods:

1. Follow the [Android Studio key generation steps](https://developer.android.com/studio/publish/app-signing#generate-key).
2. Run the following command at the command line:

   On macOS or Linux, use the following command:

   ```
   keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA \
           -keysize 2048 -validity 10000 -alias upload
   ```

   content\_copy

   On Windows, use the following command in PowerShell:

   ```
   keytool -genkey -v -keystore $env:USERPROFILE\upload-keystore.jks `
           -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 `
           -alias upload
   ```

   content\_copy

   This command stores the `upload-keystore.jks` file in your home directory. If you want to store it elsewhere, change the argument you pass to the `-keystore` parameter. **However, keep the `keystore` file private; don't check it into public source control!**

<mark style="color:yellow;">Note</mark>

* <mark style="color:yellow;">The</mark> <mark style="color:yellow;">`keytool`</mark> <mark style="color:yellow;">command might not be in your path—it's part of Java, which is installed as part of Android Studio. For the concrete path, run</mark> <mark style="color:yellow;">`flutter doctor -v`</mark> <mark style="color:yellow;">and locate the path printed after 'Java binary at:'. Then use that fully qualified path replacing</mark> <mark style="color:yellow;">`java`</mark> <mark style="color:yellow;">(at the end) with</mark> <mark style="color:yellow;">`keytool`</mark><mark style="color:yellow;">. If your path includes space-separated names, such as</mark> <mark style="color:yellow;">`Program Files`</mark><mark style="color:yellow;">, use platform-appropriate notation for the names. For example, on macOS and Linux use</mark> <mark style="color:yellow;">`Program\ Files`</mark><mark style="color:yellow;">, and on Windows use</mark> <mark style="color:yellow;">`"Program Files"`</mark><mark style="color:yellow;">.</mark>
* <mark style="color:yellow;">The</mark> <mark style="color:yellow;">`-storetype JKS`</mark> <mark style="color:yellow;">tag is only required for Java 9 or newer. As of the Java 9 release, the keystore type defaults to PKS12.</mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://orban-tech.gitbook.io/v2ray-vpn/app-guide/play-store-publishing/create-an-upload-keystore.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
