# Can't login when not started in root directory

**URL:** <https://forum.gitea.com/t/cant-login-when-not-started-in-root-directory/653>\
**Category:** General\
**Created:** [October 23, 2018, 8:45am UTC](https://forum.gitea.com/t/cant-login-when-not-started-in-root-directory/653 "2018-10-23T08:45:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andis59](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@andis59](https://forum.gitea.com/u/andis59)\
**Post date:** [October 23, 2018, 8:45am UTC](https://forum.gitea.com/t/cant-login-when-not-started-in-root-directory/653/1 "2018-10-23T08:45:05Z")

</div>

I have “just” installed Gitea 1.5.2 and starting the server from the Gitea root directory (E:\gitea) everything works, but if I start it from another directory or using the service I always get **Username or password is incorrect**

I’m using sqlite3 and I have set  
GITEA\_WORK\_DIR=E:\gitea  
GITEA\_CUSTOM=E:\gitea

I’m running on Windows 10 Pro version 1803

Ideas on what is wrong??

// Anders  
EDIT: If I start the server from the root directory this is displayed:

> E:\gitea\>e:\gitea\gitea.exe web  
> 2018/10/23 14:10:59 [T] AppPath: e:/gitea/gitea.exe  
> 2018/10/23 14:10:59 [T] AppWorkPath: E:/gitea  
> 2018/10/23 14:10:59 [T] Custom path: E:\gitea  
> 2018/10/23 14:10:59 [T] Log path: E:/gitea/log  
> 2018/10/23 14:10:59 [I] Gitea v7238bb3 built with: bindata, sqlite

The login is working

If I start from a different directory

> C:\WINDOWS\system32\>e:\gitea\gitea.exe web  
> 2018/10/23 14:10:13 [T] AppPath: e:/gitea/gitea.exe  
> 2018/10/23 14:10:13 [T] AppWorkPath: E:/gitea  
> 2018/10/23 14:10:13 [T] Custom path: E:\gitea  
> 2018/10/23 14:10:13 [T] Log path: E:/gitea/log

The pages work, i.e. the Home page and the login page, etc. BUT login will not work!  
In App.ini I have specified all paths as absolute paths, E.g.  
[database]  
…  
PATH = E:/gitea/data/gitea.db

I also tried to update to version 1.6 but the behavior is the same ☹

---

<div class="post-metadata">

**Author:** ![andis59](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@andis59](https://forum.gitea.com/u/andis59)\
**Post date:** [October 24, 2018, 7:13am UTC](https://forum.gitea.com/t/cant-login-when-not-started-in-root-directory/653/2 "2018-10-24T07:13:22Z")

</div>

OK, I have solved it!

I went to the Gogs documentation ([https://gogs.io/docs/installation/run\_as\_windows\_service](https://gogs.io/docs/installation/run_as_windows_service)) and there is said that I needed to add this in the App.ini

[server]  
APP\_DATA\_PATH = E:/gitea/data

Now everything(?) works!!!
