# Where is IPATool's Configuration Directory Located?

> Find IPATool's configuration directory easily. Learn where IPATool stores its settings on macOS, Linux, and Windows to manage your preferences efficiently.

- Repository: [Majd/ipatool](https://github.com/majd/ipatool)
- Tags: how-to-guide
- Published: 2026-09-04

---

**IPATool stores its configuration files in a hidden `.ipatool` directory inside the current user's home folder, resolving to `$HOME/.ipatool` on macOS/Linux and `%USERPROFILE%\.ipatool` on Windows.**

The open-source iOS app downloader `majd/ipatool` persists authentication tokens, search history, and tool preferences in a local configuration directory created dynamically at runtime. Understanding where IPATool stores these files is essential for troubleshooting, backups, or manual configuration edits.

## Default Configuration Directory Location

IPATool creates a dedicated configuration folder named `.ipatool` inside the user's home directory. The tool determines this path at runtime using OS-specific home directory resolution.

### macOS and Linux Paths

On Unix-like systems, the configuration directory resolves to:

```bash
$HOME/.ipatool

```

This translates to `/Users/<username>/.ipatool` on macOS or `/home/<username>/.ipatool` on most Linux distributions.

### Windows Path

On Windows systems, the path uses the `USERPROFILE` environment variable:

```powershell
%USERPROFILE%\.ipatool

```

This typically resolves to `C:\Users\<username>\.ipatool`.

## How IPATool Builds the Config Path

According to the `majd/ipatool` source code, the configuration directory path is constructed dynamically using Go's `filepath` package. In [`cmd/common.go`](https://github.com/majd/ipatool/blob/main/cmd/common.go), the tool assembles the full path by joining the user's home directory with a constant directory name:

```go
configDirectoryPath := filepath.Join(machine.HomeDirectory(), ConfigDirectoryName)

```

The `ConfigDirectoryName` constant is defined in [`cmd/constants.go`](https://github.com/majd/ipatool/blob/main/cmd/constants.go) as the string literal `.ipatool`. The `machine.HomeDirectory()` function abstracts the operating-system-specific logic for locating the user's home folder, checking environment variables like `$HOME` or `%USERPROFILE%` depending on the platform.

## Directory Creation and Permissions

If the `.ipatool` directory does not exist when the tool runs, IPATool creates it automatically with restricted permissions. The initialization code in [`cmd/common.go`](https://github.com/majd/ipatool/blob/main/cmd/common.go) sets the directory mode to `0700` (read, write, and execute permissions for the owner only), ensuring that configuration files remain inaccessible to other users on the system.

## Practical Examples

You can verify and interact with the IPATool configuration directory using standard shell commands or by inspecting the source implementation.

### Locating the Directory in Your Shell

After running IPATool for the first time, confirm the directory exists:

```bash

# macOS/Linux

ls -ld ~/.ipatool

# Windows PowerShell

Get-Item -Path "$env:USERPROFILE\.ipatool"

```

### Programmatically Accessing the Path

If you are extending IPATool or building complementary tools in Go, you can replicate the path resolution logic:

```go
package main

import (
    "fmt"
    "path/filepath"
    
    "github.com/mitchellh/go-homedir"
)

func getIPAToolConfigPath() (string, error) {
    home, err := homedir.Dir()
    if err != nil {
        return "", err
    }
    return filepath.Join(home, ".ipatool"), nil
}

func main() {
    path, err := getIPAToolConfigPath()
    if err != nil {
        panic(err)
    }
    fmt.Println("IPATool configuration directory:", path)
}

```

## Summary

- **IPATool's configuration directory** is named `.ipatool` and lives in the user's home folder.
- **Cross-platform paths**: `$HOME/.ipatool` on macOS/Linux and `%USERPROFILE%\.ipatool` on Windows.
- **Source implementation**: Path construction occurs in [`cmd/common.go`](https://github.com/majd/ipatool/blob/main/cmd/common.go) using `machine.HomeDirectory()` and the `ConfigDirectoryName` constant from [`cmd/constants.go`](https://github.com/majd/ipatool/blob/main/cmd/constants.go).
- **Security**: The directory is created with `0700` permissions if missing.
- **No manual setup required**: IPATool initializes this directory automatically on first run.

## Frequently Asked Questions

### Can I change the location of IPATool's configuration directory?

No, the configuration directory path is hardcoded in the source at [`cmd/constants.go`](https://github.com/majd/ipatool/blob/main/cmd/constants.go) as the constant `.ipatool`. To use a different location, you would need to fork the repository and modify the `ConfigDirectoryName` value, then rebuild the binary from source.

### What files does IPATool store in the `.ipatool` directory?

IPATool stores authentication cookies, search cache, and tool preferences within this directory. The exact filenames and structures are managed internally by the tool and may vary between versions.

### Why does IPATool use a hidden directory?

The directory name starts with a dot (`.ipatool`) following Unix convention for hidden files and directories. This prevents the configuration folder from cluttering standard directory listings while keeping it easily accessible for advanced users who need to debug or clear cached credentials.

### How do I reset IPATool's configuration?

To reset the tool to its default state, delete the `.ipatool` directory from your home folder. The next time you run IPATool, it will recreate the directory with fresh configuration files:

```bash
rm -rf ~/.ipatool

```